refactor: Set up Cypress as pnpm workspace (no-changelog) (#6049)

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
Iván Ovejero
2024-06-10 15:49:50 +02:00
committed by GitHub
parent bc3dcf706f
commit af3ac2db28
79 changed files with 435 additions and 315 deletions

View File

@@ -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');