mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
ci: Refactor e2e tests to be less flaky (no-changelog) (#9695)
This commit is contained in:
committed by
GitHub
parent
bc35e8c33d
commit
3d0393c739
@@ -1,5 +1,6 @@
|
||||
import 'cypress-real-events';
|
||||
import FakeTimers from '@sinonjs/fake-timers';
|
||||
import type { IN8nUISettings } from 'n8n-workflow';
|
||||
import { WorkflowPage } from '../pages';
|
||||
import {
|
||||
BACKEND_BASE_URL,
|
||||
@@ -66,9 +67,9 @@ Cypress.Commands.add('signin', ({ email, password }) => {
|
||||
);
|
||||
});
|
||||
|
||||
Cypress.Commands.add('signinAsOwner', () => {
|
||||
cy.signin({ email: INSTANCE_OWNER.email, password: INSTANCE_OWNER.password });
|
||||
});
|
||||
Cypress.Commands.add('signinAsOwner', () => cy.signin(INSTANCE_OWNER));
|
||||
Cypress.Commands.add('signinAsAdmin', () => cy.signin(INSTANCE_ADMIN));
|
||||
Cypress.Commands.add('signinAsMember', (index = 0) => cy.signin(INSTANCE_MEMBERS[index]));
|
||||
|
||||
Cypress.Commands.add('signout', () => {
|
||||
cy.request({
|
||||
@@ -79,8 +80,9 @@ Cypress.Commands.add('signout', () => {
|
||||
cy.getCookie(N8N_AUTH_COOKIE).should('not.exist');
|
||||
});
|
||||
|
||||
Cypress.Commands.add('interceptREST', (method, url) => {
|
||||
cy.intercept(method, `${BACKEND_BASE_URL}/rest${url}`);
|
||||
export let settings: Partial<IN8nUISettings>;
|
||||
Cypress.Commands.add('overrideSettings', (value: Partial<IN8nUISettings>) => {
|
||||
settings = value;
|
||||
});
|
||||
|
||||
const setFeature = (feature: string, enabled: boolean) =>
|
||||
|
||||
Reference in New Issue
Block a user