@@ -7,39 +7,37 @@ expect.extend(matchers);
7
7
const chk = '+ label > .ms-Checkbox-checkbox > .ms-Checkbox-checkmark' //dom hack to get to the checkbox
8
8
9
9
test ( 'networkpolicy-test-defaul-is-azure' , async ( { page } ) => {
10
-
10
+
11
11
await page . goto ( 'http://localhost:3000/Aks-Construction' ) ;
12
-
12
+
13
13
//Is the CLI textarea there and visible?
14
14
const cliboxvis = await page . isVisible ( '[data-testid="deploy-deploycmd"]' ) ;
15
15
expect ( cliboxvis ) . toBeTruthy ( ) ;
16
-
17
- //It shouldn't yet contain the bastion text
16
+
17
+ //Check settings is there for default config
18
18
await page . waitForSelector ( '[data-testid="deploy-deploycmd"]' )
19
19
const clitextbox = await page . $ ( '[data-testid="deploy-deploycmd"]' )
20
20
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' )
24
22
await expect ( clitextbox ) . toContainText ( 'enable_aad=true' )
25
23
26
- // Click the 2nd Tab in the portal Navigation Pivot (cluster details)
24
+ // Click the 2nd Tab in the portal Navigation Pivot (cluster details)
27
25
await page . click ( '[data-testid="portalnav-Pivot"] > button:nth-child(2)' )
28
26
29
27
//Inspect the checkbox
30
28
await page . waitForSelector ( '[data-testid="cluster-localaccounts-Checkbox"]' )
31
29
const checkbox = await page . $ ( '[data-testid="cluster-localaccounts-Checkbox"]' )
32
- await expect ( checkbox ) . not . toBeChecked ( ) ;
30
+ await expect ( checkbox ) . toBeChecked ( ) ;
33
31
await expect ( checkbox ) . toBeVisible ( ) ;
34
32
35
- //Enable Checkbox
33
+ //Disable the Checkbox
36
34
await page . click ( '[data-testid="cluster-localaccounts-Checkbox"]' + chk )
37
- await expect ( checkbox ) . toBeChecked ( ) ;
38
-
35
+ await expect ( checkbox ) . not . toBeChecked ( ) ;
36
+
39
37
//Go back to the deploy tab.
40
38
await page . click ( '[data-testid="portalnav-Pivot"] > button:nth-child(1)' )
41
39
42
- //The setting for bastion should be there now
40
+ //The setting should have disappeared now
43
41
const clitextboxrevisted = await page . $ ( '[data-testid="deploy-deploycmd"]' )
44
- await expect ( clitextboxrevisted ) . toContainText ( 'aksDisableLocalAccounts' ) ;
42
+ await expect ( clitextboxrevisted ) . not . toContainText ( 'aksDisableLocalAccounts' ) ;
45
43
} ) ;
0 commit comments