@@ -17,8 +17,8 @@ describe('/components/accordion', () => {
17
17
18
18
const numberOfExampleSections = 2
19
19
20
- for ( var i = 0 ; i < numberOfExampleSections ; i ++ ) {
21
- var isContentVisible = await page . waitForSelector ( '.govuk-accordion .govuk-accordion__section:nth-of-type(' + ( i + 1 ) + ') .govuk-accordion__section-content' ,
20
+ for ( let i = 0 ; i < numberOfExampleSections ; i ++ ) {
21
+ const isContentVisible = await page . waitForSelector ( '.govuk-accordion .govuk-accordion__section:nth-of-type(' + ( i + 1 ) + ') .govuk-accordion__section-content' ,
22
22
{ visible : true , timeout : 1000 }
23
23
)
24
24
expect ( isContentVisible ) . toBeTruthy ( )
@@ -44,7 +44,7 @@ describe('/components/accordion', () => {
44
44
45
45
const numberOfExampleSections = 2
46
46
47
- for ( var i = 0 ; i < numberOfExampleSections ; i ++ ) {
47
+ for ( let i = 0 ; i < numberOfExampleSections ; i ++ ) {
48
48
const sectionHeaderButtonExpanded = await page . evaluate ( function ( i ) {
49
49
return document . body . querySelector ( '.govuk-accordion .govuk-accordion__section:nth-of-type(' + ( 2 + i ) + ') .govuk-accordion__section-button' ) . getAttribute ( 'aria-expanded' )
50
50
} , i )
@@ -86,7 +86,7 @@ describe('/components/accordion', () => {
86
86
87
87
const numberOfExampleSections = 2
88
88
89
- for ( var i = 0 ; i < numberOfExampleSections ; i ++ ) {
89
+ for ( let i = 0 ; i < numberOfExampleSections ; i ++ ) {
90
90
const sectionHeaderButtonExpanded = await page . evaluate ( function ( i ) {
91
91
return document . body . querySelector ( '.govuk-accordion .govuk-accordion__section:nth-of-type(' + ( 2 + i ) + ') .govuk-accordion__section-button' ) . getAttribute ( 'aria-expanded' )
92
92
} , i )
0 commit comments