mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-26 21:19:43 -08:00
24dfc95974
**Before:** <img width="657" alt="image" src="https://github.com/n8n-io/n8n/assets/6179477/0bcced2b-9d3a-43b3-80d7-3c72619941fa"> **After:** <img width="660" alt="image" src="https://github.com/n8n-io/n8n/assets/6179477/e74e0bbf-bf33-49b4-ae11-65f640405ac8">
31 lines
842 B
TypeScript
31 lines
842 B
TypeScript
import { BACKEND_BASE_URL, INSTANCE_MEMBERS, INSTANCE_OWNER } from '../constants';
|
|
import './commands';
|
|
|
|
before(() => {
|
|
cy.request('POST', `${BACKEND_BASE_URL}/rest/e2e/reset`, {
|
|
owner: INSTANCE_OWNER,
|
|
members: INSTANCE_MEMBERS,
|
|
});
|
|
|
|
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' },
|
|
},
|
|
});
|
|
});
|