Skip to content

Commit

Permalink
inits blank state for specific tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mfacar committed Apr 17, 2024
1 parent e83499a commit 84ab4d5
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cypress/e2e/settings/account.b.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { clearCookiesAndLogin } from '../helpers/login';

describe('Account', () => {
before(() => {
const env = { DATABASE_NAME: 'uwazi_e2e', INDEX_NAME: 'uwazi_e2e' };
cy.exec('yarn blank-state --force', { env });
clearCookiesAndLogin('admin', 'change this password now');
cy.get('.only-desktop a[aria-label="Settings"]').click();
cy.injectAxe();
Expand Down
2 changes: 2 additions & 0 deletions cypress/e2e/settings/custom-uploads.b.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { clearCookiesAndLogin } from '../helpers/login';

describe('customization', () => {
before(() => {
const env = { DATABASE_NAME: 'uwazi_e2e', INDEX_NAME: 'uwazi_e2e' };
cy.exec('yarn blank-state --force', { env });
clearCookiesAndLogin('admin', 'change this password now');
cy.injectAxe();
cy.contains('a', 'Settings').click();
Expand Down
2 changes: 2 additions & 0 deletions cypress/e2e/settings/customization.b.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Cypress.on('window:before:load', win => {

describe('customization', () => {
before(() => {
const env = { DATABASE_NAME: 'uwazi_e2e', INDEX_NAME: 'uwazi_e2e' };
cy.exec('yarn blank-state --force', { env });
clearCookiesAndLogin('admin', 'change this password now');
cy.injectAxe();
cy.contains('a', 'Settings').click();
Expand Down
2 changes: 2 additions & 0 deletions cypress/e2e/settings/information-extraction.b.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ const editPropertyForExtractor = (

describe('Information Extraction', () => {
before(() => {
const env = { DATABASE_NAME: 'uwazi_e2e', INDEX_NAME: 'uwazi_e2e' };
cy.exec('yarn blank-state --force', { env });
cy.exec('yarn ix-config', { env });
clearCookiesAndLogin();
});
Expand Down
2 changes: 2 additions & 0 deletions cypress/e2e/settings/menu.b.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { clearCookiesAndLogin } from '../helpers/login';

describe('Menu configuration', () => {
before(() => {
const env = { DATABASE_NAME: 'uwazi_e2e', INDEX_NAME: 'uwazi_e2e' };
cy.exec('yarn blank-state --force', { env });
clearCookiesAndLogin('admin', 'change this password now');
cy.get('.only-desktop a[aria-label="Settings"]').click();
cy.injectAxe();
Expand Down
2 changes: 2 additions & 0 deletions cypress/e2e/settings/mobile-settings-menu.b.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ describe('Settings mobile menu', () => {
});

it('should login', () => {
const env = { DATABASE_NAME: 'uwazi_e2e', INDEX_NAME: 'uwazi_e2e' };
cy.exec('yarn blank-state --force', { env });
clearCookiesAndLogin('admin', 'change this password now');
});

Expand Down
2 changes: 2 additions & 0 deletions cypress/e2e/settings/relationship-types.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { clearCookiesAndLogin } from '../helpers/login';

describe('Relationship Types configuration', () => {
before(() => {
const env = { DATABASE_NAME: 'uwazi_e2e', INDEX_NAME: 'uwazi_e2e' };
cy.exec('yarn blank-state --force', { env });
clearCookiesAndLogin('admin', 'change this password now');
cy.get('.only-desktop a[aria-label="Settings"]').click();
cy.injectAxe();
Expand Down
2 changes: 2 additions & 0 deletions cypress/e2e/settings/thesauri.b.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { clearCookiesAndLogin } from '../helpers/login';

describe('Thesauri configuration', () => {
before(() => {
const env = { DATABASE_NAME: 'uwazi_e2e', INDEX_NAME: 'uwazi_e2e' };
cy.exec('yarn blank-state --force', { env });
clearCookiesAndLogin('admin', 'change this password now');
cy.get('.only-desktop a[aria-label="Settings"]').click();
cy.injectAxe();
Expand Down

0 comments on commit 84ab4d5

Please sign in to comment.