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

fix(cy): use flexible selector for file list in Nextcloud 25-28 #851

Merged
merged 1 commit into from
Sep 4, 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
2 changes: 1 addition & 1 deletion cypress/e2e/apps.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('The apps', function() {

it('Renders the default files list', function() {
cy.login('jane', { route: 'apps/files' })
cy.get('.files-fileList tr').should('contain', 'welcome.txt')
cy.get('.files-fileList tr, .files-list__tbody tr').should('contain', 'welcome.txt')
})

})
Expand Down
15 changes: 8 additions & 7 deletions cypress/e2e/collective.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,16 @@ describe('Collective', function() {
cy.login('bob', { route: '/apps/files' })
})
it('has a matching folder', function() {
const fileListSelector = '.files-fileList'
const controlsSelector = '.files-controls'
const fileListSelector = '.files-fileList a, [data-cy-files-list-row] a'
const breadcrumbsSelector = '.files-controls .breadcrumb, [data-cy-files-content-breadcrumbs] a'
cy.get(fileListSelector).should('contain', 'Collectives')
cy.get(`${fileListSelector} a`).contains('Collectives').click()
cy.get(`${controlsSelector} .breadcrumb`).should('contain', 'Collectives')
cy.get(fileListSelector).contains('Collectives').click()
cy.get(breadcrumbsSelector).should('contain', 'Collectives')
cy.get(fileListSelector).should('contain', 'Preexisting Collective')
cy.get(`${fileListSelector} a`).contains('Preexisting Collective').click()
cy.get(`${controlsSelector} .breadcrumb`).should('contain', 'Preexisting Collective')
cy.get(fileListSelector).should('contain', 'Readme.md')
cy.get(fileListSelector).contains('Preexisting Collective').click()
cy.get(breadcrumbsSelector).should('contain', 'Preexisting Collective')
cy.get(fileListSelector).should('contain', 'Readme')
cy.get(fileListSelector).should('contain', '.md')
cy.get('.filelist-collectives-wrapper')
.should('contain', 'The content of this folder is best viewed in the Collectives app.')
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/settings.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ describe('Settings', function() {
.click()
cy.get('input[name="userFolder"]')
.click()
cy.get('[data-dir=""] > a')
cy.get('[data-dir=""] > a, a[title="Home"]')
.click()
cy.get('tr[data-entryname="Collectives"]')
.click()
Expand Down
Loading