File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
packages/compass-e2e-tests/tests Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -165,13 +165,25 @@ describe('Atlas Login', function () {
165
165
166
166
const acceptTOSToggle = browser . $ ( Selectors . AcceptTOSToggle ) ;
167
167
168
- expect ( await acceptTOSToggle . getAttribute ( 'aria-checked' ) ) . to . eq ( 'false' ) ;
168
+ expect ( await acceptTOSToggle . getAttribute ( 'aria-checked' ) ) . to . eq (
169
+ 'false' ,
170
+ 'Expected TOS toggle to be unchecked'
171
+ ) ;
169
172
170
173
await browser . clickVisible ( acceptTOSToggle ) ;
171
174
172
175
await browser . clickVisible ( Selectors . AgreeAndContinueButton ) ;
173
176
174
- expect ( await acceptTOSToggle . getAttribute ( 'aria-checked' ) ) . to . eq ( 'true' ) ;
177
+ // We are not just waiting here, this is asserting that toggle was
178
+ // switched on, indicating that TOS was accepted
179
+ await browser . waitUntil (
180
+ async ( ) => {
181
+ return (
182
+ ( await acceptTOSToggle . getAttribute ( 'aria-checked' ) ) === 'true'
183
+ ) ;
184
+ } ,
185
+ { timeoutMsg : 'Expected TOS toggle to be checked' }
186
+ ) ;
175
187
} ) ;
176
188
177
189
it ( 'should sign out user when "Disconnect" clicked' , async function ( ) {
You can’t perform that action at this time.
0 commit comments