Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -675,8 +675,13 @@ describe('Collection aggregations tab', function () {
await errorDetailsJson.waitForDisplayed();

// exit details
// leafygreen autofocus triggers a tooltip on the error code element,
// "Tab" to remove the focus
await browser.keys('Tab');
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All three e2e tests failing after the update were caused by the leafygreen autofocus first thing in the modal behavior. The way of dealing with it is the same everywhere and it's more than two places, but I still didn't feel like it warrants a shared helper of some kind. Tell me if you have a different opinion on this

// now click the close button
await browser.clickVisible(Selectors.confirmationModalConfirmButton());
await errorElement.waitForDisplayed();
// wait for the modal to go away
await errorDetailsJson.waitForDisplayed({ reverse: true });
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -731,8 +731,13 @@ FindIterable<Document> result = collection.find(filter);`);
await errorDetailsJson.waitForDisplayed();

// exit details
// leafygreen autofocus triggers a tooltip on the error code element,
// "Tab" to remove the focus
await browser.keys('Tab');
// now click the close button
await browser.clickVisible(Selectors.confirmationModalConfirmButton());
await errorElement.waitForDisplayed();
// wait for the modal to go away
await errorDetailsJson.waitForDisplayed({ reverse: true });
});

describe('Editing', function () {
Expand Down
6 changes: 6 additions & 0 deletions packages/compass-e2e-tests/tests/collection-import.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,13 @@ describe('Collection import', function () {
expect(await errorDetailsJson.getText()).to.include(
'schemaRulesNotSatisfied'
);
// leafygreen autofocus triggers a tooltip on the error code element,
// "Tab" to remove the focus
await browser.keys('Tab');
// now click the close button
await browser.clickVisible(Selectors.confirmationModalConfirmButton());
// wait for the modal to go away
await errorDetailsJson.waitForDisplayed({ reverse: true });
});

it('with CSV + abort on error unchecked, it includes the details in a file', async function () {
Expand Down