mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 06:34:05 -08:00
008fd5a917
## Summary Follow-up to https://github.com/n8n-io/n8n/pull/8240 Adds e2e tests for the template credential setup in workflow editor ## Related tickets and issues https://linear.app/n8n/issue/ADO-1463/feature-enable-users-to-close-and-re-open-the-setup
28 lines
708 B
TypeScript
28 lines
708 B
TypeScript
import { INSTANCE_OWNER } from '../constants';
|
|
import './commands';
|
|
|
|
before(() => {
|
|
cy.resetDatabase();
|
|
|
|
Cypress.on('uncaught:exception', (err) => {
|
|
return !err.message.includes('ResizeObserver');
|
|
});
|
|
});
|
|
|
|
beforeEach(() => {
|
|
if (!cy.config('disableAutoLogin')) {
|
|
cy.signin({ email: INSTANCE_OWNER.email, password: INSTANCE_OWNER.password });
|
|
}
|
|
|
|
cy.intercept('GET', '/rest/settings').as('loadSettings');
|
|
cy.intercept('GET', '/types/nodes.json').as('loadNodeTypes');
|
|
|
|
// 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' },
|
|
},
|
|
});
|
|
});
|