Skip to content

Commit 90c9075

Browse files
authored
test: realign properties generator smoke selectors (#941)
## Summary - exercise the current click-to-add property-row interaction in SHAFT smoke tests - keep custom-property copy coverage on the current scoped Copy control - preserve TestNG.properties grouping coverage through generated output Closes #937 ## Verification - focused RED on `origin/master`: 2 tests run, 2 expected stale-selector failures - focused GREEN: 2 tests run, 2 passed - `yarn test:shaft` with `SHAFT_DOCS_BASE_URL=https://shafthq.github.io`: 27 passed, 0 failures, 0 errors, 0 skipped (confirmed from Surefire XML) - post-merge focused rerun: 2 passed - `git diff --check` ## Review Independent adversarial review of the implementation diff returned zero blocking and zero non-blocking findings.
2 parents 37f2ba4 + cf00b32 commit 90c9075

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

tests/shaft/src/test/java/net/shaftengine/docs/SiteRenderTest.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -236,13 +236,12 @@ public void propertiesGeneratorCopiesCustomProperties() {
236236

237237
visible(By.xpath("//*[contains(@aria-label,'Generated file destination') and .//*[normalize-space()='src/main/resources/properties/']]"));
238238
browser.findElement(By.cssSelector("input[placeholder='Property name, section, or description']")).sendKeys("headlessExecution");
239-
WebElement row = visible(By.cssSelector("[data-property-key='headlessExecution']"));
240-
click(By.cssSelector("[data-property-key='headlessExecution'] input[type='checkbox']"));
239+
click(By.cssSelector("[data-property-key='headlessExecution']"));
241240
selectValue(By.cssSelector("[data-property-key='headlessExecution'] select"), "true");
242241

243242
WebElement output = visible(By.cssSelector("[aria-label='Generated properties files']"));
244243
wait.until(ExpectedConditions.textToBePresentInElement(output, "headlessExecution=true"));
245-
click(By.cssSelector("button[aria-label='Download and copy custom.properties']"));
244+
click(By.xpath("//*[@aria-label='Generated properties files']//button[normalize-space()='Copy']"));
246245
wait.until(driver -> clipboardText().contains("headlessExecution=true"));
247246
}
248247

@@ -251,9 +250,7 @@ public void propertiesGeneratorGroupsTestNgOutputSeparately() {
251250
navigate("/docs/reference/properties/custom-properties-generator");
252251

253252
browser.findElement(By.cssSelector("input[placeholder='Property name, section, or description']")).sendKeys("setParallel");
254-
WebElement row = visible(By.cssSelector("[data-property-key='setParallel']"));
255-
SHAFT.Validations.assertThat().object(attribute(row, "data-target-file")).isEqualTo("TestNG.properties");
256-
click(By.cssSelector("[data-property-key='setParallel'] input[type='checkbox']"));
253+
click(By.cssSelector("[data-property-key='setParallel']"));
257254
selectValue(By.cssSelector("[data-property-key='setParallel'] select"), "METHODS");
258255

259256
WebElement output = visible(By.cssSelector("[aria-label='Generated properties files']"));

0 commit comments

Comments
 (0)