Skip to content

Commit daf64ca

Browse files
committed
update e2e tests
1 parent 2970a30 commit daf64ca

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

packages/compass-e2e-tests/helpers/commands/set-validation.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ export async function setValidationWithinValidationTab(
55
browser: CompassBrowser,
66
value: string
77
): Promise<void> {
8+
// enter edit mode if not already entered
9+
const enableEditBtn = browser.$(Selectors.EnableEditValidationButton);
10+
if (await enableEditBtn.isExisting()) {
11+
await browser.clickVisible(enableEditBtn);
12+
}
13+
14+
// change value
815
await browser.setCodemirrorEditorValue(Selectors.ValidationEditor, value);
916

1017
// it should eventually detect that the text changed

packages/compass-e2e-tests/tests/collection-import.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ describe('Collection import', function () {
509509
await toastElement.waitForDisplayed({ reverse: true });
510510
});
511511

512-
context('with validation', function () {
512+
context.only('with validation', function () {
513513
beforeEach(async function () {
514514
const FAILING_VALIDATOR =
515515
'{ $jsonSchema: { bsonType: "object", required: [ "abcdefgh" ] } }';
@@ -605,7 +605,6 @@ describe('Collection import', function () {
605605
const toastElement = browser.$(Selectors.ImportToast);
606606
await toastElement.waitForDisplayed();
607607
const errorText = await toastElement.getText();
608-
console.log({ errorText });
609608
expect(errorText).to.include('Document failed validation');
610609
expect(errorText).to.include('VIEW LOG');
611610

0 commit comments

Comments
 (0)