2023-06-22 15:38:12 -07:00
|
|
|
import { 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-06-22 15:38:12 -07:00
|
|
|
cy.request('POST', `${BASE_URL}/rest/e2e/reset`, {
|
|
|
|
owner: INSTANCE_OWNER,
|
|
|
|
members: INSTANCE_MEMBERS,
|
|
|
|
});
|
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
|
|
|
});
|