diff --git a/cypress/e2e/collective-share.spec.js b/cypress/e2e/collective-share.spec.js index 6e9a15939..bb0525117 100644 --- a/cypress/e2e/collective-share.spec.js +++ b/cypress/e2e/collective-share.spec.js @@ -97,7 +97,11 @@ describe('Collective Share', function() { cy.visit(shareUrl) // Do some handstands to ensure that new page with editor is loaded before we edit the title cy.intercept('POST', '**/_api/p/*/_pages/*').as('createPage') - cy.intercept('PUT', '**/apps/text/public/session/create').as('textCreateSession') + if (['stable25', 'stable26', 'stable27'].includes(Cypress.env('ncVersion'))) { + cy.intercept('PUT', '**/apps/text/public/session/create').as('textCreateSession') + } else { + cy.intercept('PUT', '**/apps/text/public/session/*/create').as('textCreateSession') + } cy.contains('.app-content-list-item', 'Share me') .find('button.action-button-add') .click() diff --git a/cypress/e2e/page-details.spec.js b/cypress/e2e/page-details.spec.js index 34249b501..78dea1859 100644 --- a/cypress/e2e/page-details.spec.js +++ b/cypress/e2e/page-details.spec.js @@ -76,7 +76,11 @@ describe('Page details', function() { describe('Displaying backlinks', function() { it('Lists backlinks for a page', function() { - cy.intercept('PUT', '**/apps/text/session/create').as('textCreateSession') + if (['stable25', 'stable26', 'stable27'].includes(Cypress.env('ncVersion'))) { + cy.intercept('PUT', '**/apps/text/session/create').as('textCreateSession') + } else { + cy.intercept('PUT', '**/apps/text/session/*/create').as('textCreateSession') + } cy.openPage('Day 1') cy.wait('@textCreateSession') cy.get('button.action-item .icon-menu-sidebar').click() diff --git a/cypress/e2e/pages.spec.js b/cypress/e2e/pages.spec.js index 982501bd1..df5c8cae5 100644 --- a/cypress/e2e/pages.spec.js +++ b/cypress/e2e/pages.spec.js @@ -110,7 +110,11 @@ describe('Page', function() { it('New page has template content', function() { // Do some handstands to ensure that new page with editor is loaded before we edit the title cy.intercept('POST', '**/_api/*/_pages/*').as('createPage') - cy.intercept('PUT', '**/apps/text/session/create').as('textCreateSession') + if (['stable25', 'stable26', 'stable27'].includes(Cypress.env('ncVersion'))) { + cy.intercept('PUT', '**/apps/text/session/create').as('textCreateSession') + } else { + cy.intercept('PUT', '**/apps/text/session/*/create').as('textCreateSession') + } cy.contains('.app-content-list-item', 'Our Garden') .find('button.action-button-add') .click() @@ -137,7 +141,11 @@ describe('Page', function() { it('Shows the title in the enabled titleform and full path in browser title', function() { // Do some handstands to ensure that new page with editor is loaded before we edit the title cy.intercept('POST', '**/_api/*/_pages/*').as('createPage') - cy.intercept('PUT', '**/apps/text/session/create').as('textCreateSession') + if (['stable25', 'stable26', 'stable27'].includes(Cypress.env('ncVersion'))) { + cy.intercept('PUT', '**/apps/text/session/create').as('textCreateSession') + } else { + cy.intercept('PUT', '**/apps/text/session/*/create').as('textCreateSession') + } cy.contains('.app-content-list-item', '#% special chars') .find('button.action-button-add') .click({ force: true }) @@ -327,18 +335,18 @@ describe('Page', function() { describe('Using the search providers to search for a page', function() { it('Search for page title', function() { - cy.get('.unified-search a, .unified-search button').click() - cy.get('.unified-search__form input') + cy.get('.unified-search a, .unified-search button, button.global-search__button').click() + cy.get('.unified-search__form input, .global-search-modal input') .type('Day') - cy.get('.unified-search__results-collectives-pages') + cy.get('.unified-search__results-collectives-pages, .global-search-modal__results') .should('contain', 'Day 1') }) it('Search for page content', function() { - cy.get('.unified-search a, .unified-search button').click() - cy.get('.unified-search__form input') + cy.get('.unified-search a, .unified-search button, button.global-search__button').click() + cy.get('.unified-search__form input, .global-search-modal input') .type('share your thoughts') - cy.get('.unified-search__results-collectives-page-content') + cy.get('.unified-search__results-collectives-page-content, .global-search-modal__results') .should('contain', 'your thoughts that really matter') }) })