2023-07-21 02:48:23 -07:00
|
|
|
import { BACKEND_BASE_URL, INSTANCE_MEMBERS, INSTANCE_OWNER } from '../constants';
|
2022-12-15 07:39:59 -08:00
|
|
|
import './commands';
|
2023-02-03 04:14:59 -08:00
|
|
|
|
2023-05-26 08:15:06 -07:00
|
|
|
before(() => {
|
2023-07-21 02:48:23 -07:00
|
|
|
cy.request('POST', `${BACKEND_BASE_URL}/rest/e2e/reset`, {
|
2023-06-22 15:38:12 -07:00
|
|
|
owner: INSTANCE_OWNER,
|
|
|
|
members: INSTANCE_MEMBERS,
|
|
|
|
});
|
2023-07-28 00:51:07 -07:00
|
|
|
|
|
|
|
Cypress.on('uncaught:exception', (err) => {
|
|
|
|
return !err.message.includes('ResizeObserver');
|
|
|
|
});
|
2023-05-26 08:15:06 -07:00
|
|
|
});
|
|
|
|
|
2023-02-03 04:14:59 -08:00
|
|
|
beforeEach(() => {
|
2023-06-22 15:38:12 -07:00
|
|
|
if (!cy.config('disableAutoLogin')) {
|
|
|
|
cy.signin({ email: INSTANCE_OWNER.email, password: INSTANCE_OWNER.password });
|
|
|
|
}
|
|
|
|
|
2023-03-10 07:54:54 -08:00
|
|
|
cy.intercept('GET', '/rest/settings').as('loadSettings');
|
2023-02-03 04:14:59 -08:00
|
|
|
|
2023-03-10 07:54:54 -08:00
|
|
|
// 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' },
|
2023-05-26 08:15:06 -07:00
|
|
|
},
|
2023-03-10 07:54:54 -08:00
|
|
|
});
|
2023-05-26 08:15:06 -07:00
|
|
|
});
|