Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(editor): Prevent node view unload by default in e2e run #6787

Merged
Merged
Show file tree
Hide file tree
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
5 changes: 0 additions & 5 deletions cypress/e2e/14-data-transformation-expressions.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ const ndv = new NDV();
describe('Data transformation expressions', () => {
beforeEach(() => {
wf.actions.visit();

cy.window().then((win) => {
// @ts-ignore
win.preventNodeViewBeforeUnload = true;
});
});

it('$json + native string methods', () => {
Expand Down
5 changes: 0 additions & 5 deletions cypress/e2e/14-mapping.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ const ndv = new NDV();
describe('Data mapping', () => {
beforeEach(() => {
workflowPage.actions.visit();

cy.window().then((win) => {
// @ts-ignore
win.preventNodeViewBeforeUnload = true;
});
});

it('maps expressions from table header', () => {
Expand Down
5 changes: 0 additions & 5 deletions cypress/e2e/16-webhook-node.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,6 @@ const simpleWebhookCall = (options: SimpleWebhookCallOptions) => {
describe('Webhook Trigger node', async () => {
beforeEach(() => {
workflowPage.actions.visit();

cy.window().then((win) => {
// @ts-ignore
win.preventNodeViewBeforeUnload = true;
});
});

it('should listen for a GET request', () => {
Expand Down
5 changes: 0 additions & 5 deletions cypress/e2e/25-stickies.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ function checkStickiesStyle(
describe('Canvas Actions', () => {
beforeEach(() => {
workflowPage.actions.visit();

cy.window().then((win) => {
// @ts-ignore
win.preventNodeViewBeforeUnload = true;
});
});

it('adds sticky to canvas with default text and position', () => {
Expand Down
6 changes: 5 additions & 1 deletion cypress/pages/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,13 @@ export class WorkflowPage extends BasePage {
editorTabButton: () => cy.getByTestId('radio-button-workflow'),
};
actions = {
visit: () => {
visit: (preventNodeViewUnload = true) => {
cy.visit(this.url);
cy.waitForLoad();
cy.window().then((win) => {
// @ts-ignore
win.preventNodeViewBeforeUnload = preventNodeViewUnload;
});
},
addInitialNodeToCanvas: (nodeDisplayName: string, { keepNdvOpen } = { keepNdvOpen: false }) => {
this.getters.canvasPlusButton().click();
Expand Down
Loading