Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions packages/compass-e2e-tests/tests/atlas-login.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,25 @@ describe('Atlas Login', function () {

const acceptTOSToggle = browser.$(Selectors.AcceptTOSToggle);

expect(await acceptTOSToggle.getAttribute('aria-checked')).to.eq('false');
expect(await acceptTOSToggle.getAttribute('aria-checked')).to.eq(
'false',
'Expected TOS toggle to be unchecked'
);

await browser.clickVisible(acceptTOSToggle);

await browser.clickVisible(Selectors.AgreeAndContinueButton);

expect(await acceptTOSToggle.getAttribute('aria-checked')).to.eq('true');
// We are not just waiting here, this is asserting that toggle was
// switched on, indicating that TOS was accepted
await browser.waitUntil(
async () => {
return (
(await acceptTOSToggle.getAttribute('aria-checked')) === 'true'
);
},
{ timeoutMsg: 'Expected TOS toggle to be checked' }
);
});

it('should sign out user when "Disconnect" clicked', async function () {
Expand Down