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

Change some element selectors to fix a few Cypress tests #4014

Merged
merged 1 commit into from
Sep 19, 2024
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
5 changes: 3 additions & 2 deletions cypress/e2e/share-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ describe('Public sharing of office documents', function() {
},
})

cy.get('tr[data-file="document.odt"] a.name').click()
cy.get('button[data-cy-files-list-row-name-link=""]')
.click()

cy.waitForViewer()
cy.waitForCollabora()
Expand All @@ -109,7 +110,7 @@ describe('Public sharing of office documents', function() {
},
})

cy.get('tr[data-file="document.odt"] a.name').click()
cy.get('button[data-cy-files-list-row-name-link=""]').click()

cy.inputCollaboraGuestName(guestName)
cy.waitForViewer()
Expand Down
14 changes: 8 additions & 6 deletions cypress/e2e/templates.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('Create new office files from templates', function() {
it('Create a new file from a user template', function() {
cy.visit('/apps/files')

cy.get('.files-list__header div[menu-title="New"] button')
cy.get('[data-cy-upload-picker=""]')
.should('be.visible')
.as('newFileMenu')

Expand All @@ -41,7 +41,7 @@ describe('Create new office files from templates', function() {
cy.login(randUser)
cy.visit('/apps/files')

cy.get('.files-list__header div[menu-title="New"] button')
cy.get('[data-cy-upload-picker=""]')
.should('be.visible')
.as('newFileMenu')

Expand All @@ -59,7 +59,9 @@ describe('Create new office files from templates', function() {
cy.waitForCollabora()
})

it('Create a file from a system template as guest', () => {
// FIXME: Unskip once server API for new menu entries works on public shares
// https://github.com/nextcloud/richdocuments/issues/3170
it.skip('Create a file from a system template as guest', () => {
cy.uploadSystemTemplate()
cy.createFolder(randUser, '/my-share')

Expand All @@ -70,7 +72,7 @@ describe('Create new office files from templates', function() {
},
})

cy.get('.files-controls .button.new')
cy.get('[data-cy-upload-picker=""]')
.should('be.visible')
.click()

Expand Down Expand Up @@ -110,7 +112,7 @@ describe('Create templates with fields', () => {
cy.visit('/apps/files')

// Create a templates folder
cy.get('.files-list__header div[menu-title="New"] button')
cy.get('[data-cy-upload-picker=""]')
.should('be.visible')
.as('newFileMenu')

Expand All @@ -134,7 +136,7 @@ describe('Create templates with fields', () => {
cy.visit('/apps/files')

// Create a new document
cy.get('.files-list__header div[menu-title="New"] button')
cy.get('[data-cy-upload-picker=""]')
.should('be.visible')
.as('newFileMenu')

Expand Down
Loading