Skip to content

Commit

Permalink
use Cypress.browser.isHeaded instead of env to determine headed vs he…
Browse files Browse the repository at this point in the history
…adless mode
  • Loading branch information
schiwaa committed Jan 22, 2025
1 parent 6851788 commit 67aebb3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion frontend-e2e/cypress/e2e/role_admin/homepage.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ describe('Assert that only one tradition is highlighted in the sidebar menu: \
});

describe('message console logs errors and successes', () => {
if (Cypress.env('CY_MODE') === 'headed') {
if (Cypress.browser.isHeaded) {
it('passes', () => { // Login needed to add a stemma. Skip in headless mode for now.
const stemma_added_marker = 'Stemma added';
const stemma_deleted_marker = 'Deleted';
Expand Down
2 changes: 1 addition & 1 deletion frontend-e2e/cypress/e2e/role_admin/stemwebdialog.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ describe('stemma editor tools and svg work properly', () => {

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
// if (Cypress.browser.isHeaded) { // 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);

Expand Down
3 changes: 0 additions & 3 deletions frontend-e2e/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ const CY_STEMMAREST_ENDPOINT =
'http://localhost:8080/stemmarest';
/* 'http://127.0.0.1:8080/stemmarest'; */

// const CY_MODE = process.env.CY_STEMMAWEB_FRONTEND_URL ? 'headless' : 'headed';

module.exports = {
// CY_MODE,
CY_STEMMAWEB_FRONTEND_URL,
CY_STEMMAWEB_MIDDLEWARE_URL,
CY_STEMMAREST_ENDPOINT
Expand Down

0 comments on commit 67aebb3

Please sign in to comment.