Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(ci): Adjust URL glob for text sessions to also match Nextcloud 28 #1036

Merged
merged 2 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cypress/e2e/collective-share.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
6 changes: 5 additions & 1 deletion cypress/e2e/page-details.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
24 changes: 16 additions & 8 deletions cypress/e2e/pages.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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 })
Expand Down Expand Up @@ -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')
})
})
Expand Down
Loading