Skip to content
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ environments.js
CLAUDE.md
.claude
.opencode
cypress.local.js
10 changes: 10 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ if (activeEnvironment && !environments[activeEnvironment]) {
);
}

let cypressLocal = {};
try {
// eslint-disable-next-line global-require, import/extensions
cypressLocal = require('./cypress.local.js');
} catch (e) {
// cypress.local.js is gitignored and optional
}

/**
* Chains after:spec handlers to ensure both TestRail and flaky marker handlers execute.
* Since Cypress's on() overwrites previous handlers (except for 'task'), we need to intercept
Expand Down Expand Up @@ -186,6 +194,7 @@ module.exports = defineConfig({

// HTTP tasks (axios requests in Node.js context)
...httpTasks,
...cypressLocal.tasks?.(on, config),
});

// keep Cypress running until the ReportPortal reporter is finished. this is a
Expand Down Expand Up @@ -223,4 +232,5 @@ module.exports = defineConfig({
baseUrl: envOverrides.baseUrl || 'https://folio-etesting-cypress-diku.ci.folio.org',
testIsolation: false,
},
...cypressLocal.cypress,
});
8 changes: 8 additions & 0 deletions cypress/support/e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,11 @@ Cypress.on('fail', (err) => {
beforeEach(() => {
cy.intercept('POST', '/authn/refresh').as('/authn/refresh');
});

// cypress.local.js support hooks (gitignored, local-only)
try {
// eslint-disable-next-line global-require, import/extensions
require('../../cypress.local.js').support?.();
} catch (e) {
// cypress.local.js is optional
}
Loading