mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
test(editor): Prevent node view unload by default in e2e run (#6787)
Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
@@ -6,11 +6,6 @@ const ndv = new NDV();
|
|||||||
describe('Data transformation expressions', () => {
|
describe('Data transformation expressions', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
wf.actions.visit();
|
wf.actions.visit();
|
||||||
|
|
||||||
cy.window().then((win) => {
|
|
||||||
// @ts-ignore
|
|
||||||
win.preventNodeViewBeforeUnload = true;
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('$json + native string methods', () => {
|
it('$json + native string methods', () => {
|
||||||
|
|||||||
@@ -12,11 +12,6 @@ const ndv = new NDV();
|
|||||||
describe('Data mapping', () => {
|
describe('Data mapping', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
workflowPage.actions.visit();
|
workflowPage.actions.visit();
|
||||||
|
|
||||||
cy.window().then((win) => {
|
|
||||||
// @ts-ignore
|
|
||||||
win.preventNodeViewBeforeUnload = true;
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('maps expressions from table header', () => {
|
it('maps expressions from table header', () => {
|
||||||
|
|||||||
@@ -79,11 +79,6 @@ const simpleWebhookCall = (options: SimpleWebhookCallOptions) => {
|
|||||||
describe('Webhook Trigger node', async () => {
|
describe('Webhook Trigger node', async () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
workflowPage.actions.visit();
|
workflowPage.actions.visit();
|
||||||
|
|
||||||
cy.window().then((win) => {
|
|
||||||
// @ts-ignore
|
|
||||||
win.preventNodeViewBeforeUnload = true;
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should listen for a GET request', () => {
|
it('should listen for a GET request', () => {
|
||||||
|
|||||||
@@ -23,11 +23,6 @@ function checkStickiesStyle(
|
|||||||
describe('Canvas Actions', () => {
|
describe('Canvas Actions', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
workflowPage.actions.visit();
|
workflowPage.actions.visit();
|
||||||
|
|
||||||
cy.window().then((win) => {
|
|
||||||
// @ts-ignore
|
|
||||||
win.preventNodeViewBeforeUnload = true;
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('adds sticky to canvas with default text and position', () => {
|
it('adds sticky to canvas with default text and position', () => {
|
||||||
|
|||||||
@@ -115,9 +115,13 @@ export class WorkflowPage extends BasePage {
|
|||||||
editorTabButton: () => cy.getByTestId('radio-button-workflow'),
|
editorTabButton: () => cy.getByTestId('radio-button-workflow'),
|
||||||
};
|
};
|
||||||
actions = {
|
actions = {
|
||||||
visit: () => {
|
visit: (preventNodeViewUnload = true) => {
|
||||||
cy.visit(this.url);
|
cy.visit(this.url);
|
||||||
cy.waitForLoad();
|
cy.waitForLoad();
|
||||||
|
cy.window().then((win) => {
|
||||||
|
// @ts-ignore
|
||||||
|
win.preventNodeViewBeforeUnload = preventNodeViewUnload;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
addInitialNodeToCanvas: (nodeDisplayName: string, { keepNdvOpen } = { keepNdvOpen: false }) => {
|
addInitialNodeToCanvas: (nodeDisplayName: string, { keepNdvOpen } = { keepNdvOpen: false }) => {
|
||||||
this.getters.canvasPlusButton().click();
|
this.getters.canvasPlusButton().click();
|
||||||
|
|||||||
Reference in New Issue
Block a user