mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 20:54:07 -08:00
c461025f70
## Summary Extend existing user types in the E2E database. Currently, we have only owner and member but we need also admin --------- Co-authored-by: Val <68596159+valya@users.noreply.github.com>
32 lines
883 B
TypeScript
32 lines
883 B
TypeScript
import { BACKEND_BASE_URL, INSTANCE_ADMIN, INSTANCE_MEMBERS, INSTANCE_OWNER } from '../constants';
|
|
import './commands';
|
|
|
|
before(() => {
|
|
cy.request('POST', `${BACKEND_BASE_URL}/rest/e2e/reset`, {
|
|
owner: INSTANCE_OWNER,
|
|
members: INSTANCE_MEMBERS,
|
|
admin: INSTANCE_ADMIN,
|
|
});
|
|
|
|
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' },
|
|
},
|
|
});
|
|
});
|