Skip to content

Commit 3a6a460

Browse files
author
Gordon Byers
authored
changed default - fixing test.
1 parent 6cd67ad commit 3a6a460

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

helper/.playwrighttests/helper-test-disablelocalaccounts-checkbox-clicommand.spec.js

+12-14
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,37 @@ expect.extend(matchers);
77
const chk = '+ label > .ms-Checkbox-checkbox > .ms-Checkbox-checkmark' //dom hack to get to the checkbox
88

99
test('networkpolicy-test-defaul-is-azure', async ({ page }) => {
10-
10+
1111
await page.goto('http://localhost:3000/Aks-Construction');
12-
12+
1313
//Is the CLI textarea there and visible?
1414
const cliboxvis = await page.isVisible('[data-testid="deploy-deploycmd"]');
1515
expect(cliboxvis).toBeTruthy();
16-
17-
//It shouldn't yet contain the bastion text
16+
17+
//Check settings is there for default config
1818
await page.waitForSelector('[data-testid="deploy-deploycmd"]')
1919
const clitextbox = await page.$('[data-testid="deploy-deploycmd"]')
2020
await expect(clitextbox).toBeVisible()
21-
await expect(clitextbox).not.toContainText('aksDisableLocalAccounts');
22-
23-
//But i am expecting enable_aad to be there
21+
await expect(clitextbox).toContainText('aksDisableLocalAccounts')
2422
await expect(clitextbox).toContainText('enable_aad=true')
2523

26-
// Click the 2nd Tab in the portal Navigation Pivot (cluster details)
24+
// Click the 2nd Tab in the portal Navigation Pivot (cluster details)
2725
await page.click('[data-testid="portalnav-Pivot"] > button:nth-child(2)')
2826

2927
//Inspect the checkbox
3028
await page.waitForSelector('[data-testid="cluster-localaccounts-Checkbox"]')
3129
const checkbox = await page.$('[data-testid="cluster-localaccounts-Checkbox"]')
32-
await expect(checkbox).not.toBeChecked();
30+
await expect(checkbox).toBeChecked();
3331
await expect(checkbox).toBeVisible();
3432

35-
//Enable Checkbox
33+
//Disable the Checkbox
3634
await page.click('[data-testid="cluster-localaccounts-Checkbox"]' + chk)
37-
await expect(checkbox).toBeChecked();
38-
35+
await expect(checkbox).not.toBeChecked();
36+
3937
//Go back to the deploy tab.
4038
await page.click('[data-testid="portalnav-Pivot"] > button:nth-child(1)')
4139

42-
//The setting for bastion should be there now
40+
//The setting should have disappeared now
4341
const clitextboxrevisted = await page.$('[data-testid="deploy-deploycmd"]')
44-
await expect(clitextboxrevisted).toContainText('aksDisableLocalAccounts');
42+
await expect(clitextboxrevisted).not.toContainText('aksDisableLocalAccounts');
4543
});

0 commit comments

Comments
 (0)