diff --git a/frontend-e2e/cypress/e2e/experimental.cy.js b/frontend-e2e/cypress/e2e/experimental.cy.js index f2f8876c..0765cdba 100644 --- a/frontend-e2e/cypress/e2e/experimental.cy.js +++ b/frontend-e2e/cypress/e2e/experimental.cy.js @@ -54,7 +54,7 @@ describe('addStemma and deleteStemma with login, passes in headless mode despite cy.get('#delete-stemma-button-link').wait(500).click(); // DELETE method cy.contains('Yes, delete it').wait(500).click(); - cy.logoutViaUi(admin); + cy.logoutViaUi(); }); }); diff --git a/frontend-e2e/cypress/e2e/role_admin/homepage.cy.js b/frontend-e2e/cypress/e2e/role_admin/homepage.cy.js index cb8f2b23..5a69f9f0 100644 --- a/frontend-e2e/cypress/e2e/role_admin/homepage.cy.js +++ b/frontend-e2e/cypress/e2e/role_admin/homepage.cy.js @@ -9,11 +9,11 @@ beforeEach(() => { cy.visit(`${Cypress.env('CY_STEMMAWEB_FRONTEND_URL')}/`); cy.viewport(1600, 900); test_traditions.sort( (tradition_a, tradition_b) => tradition_a.title.localeCompare( tradition_b.title ) ); - cy.loginViaUi(admin); // TODO: also for headless mode + cy.loginViaUi(admin); }); afterEach(() => { - cy.logoutViaUi(admin); // TODO: also for headless mode + cy.logoutViaUi(); }); // on the homepage, the admin should see all traditions listed diff --git a/frontend-e2e/cypress/e2e/role_admin/stemwebdialog.cy.js b/frontend-e2e/cypress/e2e/role_admin/stemwebdialog.cy.js index 021e5224..d915e93a 100644 --- a/frontend-e2e/cypress/e2e/role_admin/stemwebdialog.cy.js +++ b/frontend-e2e/cypress/e2e/role_admin/stemwebdialog.cy.js @@ -291,7 +291,7 @@ describe('stemma editing error feedback in message console works properly', () = it('passes', () => { // needs login if (Cypress.env('CY_MODE') === 'headed') { // only log in if headed. dont run this test headless because it needs to be logged in // TODO: also for headless mode // TODO: when fitted also for healess mode, merge with previous test (partly duplicate) - cy.loginViaUi(admin); // TODO: also for headless mode + cy.loginViaUi(admin); // To do: assert that the message console lists unexpected errors // when editing a stemma and e.g. removing [class=extant] after one of the nodes, @@ -398,7 +398,7 @@ describe('stemma editing error feedback in message console works properly', () = // Test also the CANCEL button }); - cy.logoutViaUi(admin); // TODO: also for headless mode + cy.logoutViaUi(); } }); }); diff --git a/frontend-e2e/cypress/support/commands.js b/frontend-e2e/cypress/support/commands.js index acc69b0e..2491f3d9 100644 --- a/frontend-e2e/cypress/support/commands.js +++ b/frontend-e2e/cypress/support/commands.js @@ -39,7 +39,7 @@ Cypress.Commands.add('loginViaUi', (userObj) => { }); // Logout via user interface -Cypress.Commands.add('logoutViaUi', (userObj) => { +Cypress.Commands.add('logoutViaUi', () => { cy.log("Cypress.env('CY_MODE'): " + Cypress.env('CY_MODE')); cy.contains('header a', 'Sign out').click(); cy.contains('header a', 'Sign in');