n8n/cypress/support/e2e.ts
कारतोफ्फेलस्क्रिप्ट™ 7a7b884793
ci: Reset DB only once per e2e test (no-changelog) (#6216)
2023-05-26 17:15:06 +02:00

35 lines
1,000 B
TypeScript

// ***********************************************************
// This example support/e2e.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************
import './commands';
before(() => {
cy.resetAll();
});
// Load custom nodes and credentials fixtures
beforeEach(() => {
cy.intercept('GET', '/rest/settings').as('loadSettings');
cy.intercept('GET', '/rest/login').as('loadLogin');
// Always intercept the request to test credentials and return a success
cy.intercept('POST', '/rest/credentials/test', {
statusCode: 200,
body: {
data: { status: 'success', message: 'Tested successfully' },
},
});
});