mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
refactor: Set up Cypress as pnpm workspace (no-changelog) (#6049)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -16,9 +16,7 @@ Cypress.Commands.add('createFixtureWorkflow', (fixtureKey, workflowName) => {
|
||||
const workflowPage = new WorkflowPage();
|
||||
|
||||
// We need to force the click because the input is hidden
|
||||
workflowPage.getters
|
||||
.workflowImportInput()
|
||||
.selectFile(`cypress/fixtures/${fixtureKey}`, { force: true });
|
||||
workflowPage.getters.workflowImportInput().selectFile(`fixtures/${fixtureKey}`, { force: true });
|
||||
|
||||
cy.waitForLoad(false);
|
||||
workflowPage.actions.setWorkflowName(workflowName);
|
||||
@@ -46,7 +44,7 @@ Cypress.Commands.add('waitForLoad', (waitForIntercepts = true) => {
|
||||
});
|
||||
|
||||
Cypress.Commands.add('signin', ({ email, password }) => {
|
||||
Cypress.session.clearAllSavedSessions();
|
||||
void Cypress.session.clearAllSavedSessions();
|
||||
cy.session([email, password], () =>
|
||||
cy.request({
|
||||
method: 'POST',
|
||||
@@ -128,7 +126,7 @@ Cypress.Commands.add('paste', { prevSubject: true }, (selector, pastePayload) =>
|
||||
});
|
||||
|
||||
Cypress.Commands.add('drag', (selector, pos, options) => {
|
||||
const index = options?.index || 0;
|
||||
const index = options?.index ?? 0;
|
||||
const [xDiff, yDiff] = pos;
|
||||
const element = typeof selector === 'string' ? cy.get(selector).eq(index) : selector;
|
||||
element.should('exist');
|
||||
|
||||
@@ -4,8 +4,8 @@ import './commands';
|
||||
before(() => {
|
||||
cy.resetDatabase();
|
||||
|
||||
Cypress.on('uncaught:exception', (err) => {
|
||||
return !err.message.includes('ResizeObserver');
|
||||
Cypress.on('uncaught:exception', (error) => {
|
||||
return !error.message.includes('ResizeObserver');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Load type definitions that come with Cypress module
|
||||
/// <reference types="cypress" />
|
||||
|
||||
import { Interception } from 'cypress/types/net-stubbing';
|
||||
import type { Interception } from 'cypress/types/net-stubbing';
|
||||
|
||||
interface SigninPayload {
|
||||
email: string;
|
||||
@@ -18,7 +18,7 @@ declare global {
|
||||
config(key: keyof SuiteConfigOverrides): boolean;
|
||||
getByTestId(
|
||||
selector: string,
|
||||
...args: (Partial<Loggable & Timeoutable & Withinable & Shadow> | undefined)[]
|
||||
...args: Array<Partial<Loggable & Timeoutable & Withinable & Shadow> | undefined>
|
||||
): Chainable<JQuery<HTMLElement>>;
|
||||
findChildByTestId(childTestId: string): Chainable<JQuery<HTMLElement>>;
|
||||
createFixtureWorkflow(fixtureKey: string, workflowName: string): void;
|
||||
@@ -36,7 +36,7 @@ declare global {
|
||||
readClipboard(): Chainable<string>;
|
||||
paste(pastePayload: string): void;
|
||||
drag(
|
||||
selector: string | Cypress.Chainable<JQuery<HTMLElement>>,
|
||||
selector: string | Chainable<JQuery<HTMLElement>>,
|
||||
target: [number, number],
|
||||
options?: { abs?: boolean; index?: number; realMouse?: boolean; clickToFinish?: boolean },
|
||||
): void;
|
||||
@@ -45,8 +45,11 @@ declare global {
|
||||
shouldNotHaveConsoleErrors(): void;
|
||||
window(): Chainable<
|
||||
AUTWindow & {
|
||||
innerWidth: number;
|
||||
innerHeight: number;
|
||||
preventNodeViewBeforeUnload?: boolean;
|
||||
featureFlags: {
|
||||
override: (feature: string, value: any) => void;
|
||||
override: (feature: string, value: unknown) => void;
|
||||
};
|
||||
}
|
||||
>;
|
||||
|
||||
Reference in New Issue
Block a user