-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(global-writes): add e2e tests COMPASS-8441 (#6430)
* global writes tests * clean up confirmation action * rename func * cr feedback * timeout * fix doc * cr feedback * clean up * sensable selector * use timeout for wait condition as well * chore(e2e): use different collection names between tests * chore(e2e): temporarily skip failing test * update test after incomplete sharding status * try to re-enable the test * remove comment --------- Co-authored-by: Sergey Petushkov <[email protected]> Co-authored-by: Paula Stachova <[email protected]>
- Loading branch information
1 parent
25ac91d
commit 5a3fe53
Showing
18 changed files
with
279 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
packages/compass-e2e-tests/helpers/commands/click-confirmation-action.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import type { CompassBrowser } from '../compass-browser'; | ||
import * as Selectors from '../selectors'; | ||
|
||
export async function clickConfirmationAction( | ||
browser: CompassBrowser, | ||
actionButtonSelector: string, | ||
confirmationText?: string, | ||
screenshot?: string | ||
) { | ||
await browser.clickVisible(actionButtonSelector); | ||
|
||
const confirmationModal = await browser.$(Selectors.ConfirmationModal); | ||
await confirmationModal.waitForDisplayed(); | ||
|
||
if (confirmationText) { | ||
await browser.setValueVisible( | ||
Selectors.ConfirmationModalInput, | ||
confirmationText | ||
); | ||
} | ||
|
||
if (screenshot) { | ||
await browser.screenshot(screenshot); | ||
} | ||
|
||
await browser.clickVisible(Selectors.confirmationModalConfirmButton()); | ||
await confirmationModal.waitForDisplayed({ reverse: true }); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.