Skip to content

Commit

Permalink
fixup! fixup! fix(cypress): use updated file row selector
Browse files Browse the repository at this point in the history
  • Loading branch information
max-nextcloud committed Aug 22, 2023
1 parent dbfe0b9 commit f197ff7
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions cypress/e2e/mixins/oddname.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ Cypress.on('fail', (error, runnable) => {
export default function(file, type, sidebar = false) {
const placedName = naughtyFileName(file)

// We'll escape all the characters in the name to match it with css
const placedNameCss = CSS.escape(placedName)

const folderName
= 'Nextcloud "%27%22%60%25%21%23" >`⛰️<' + file + "><` e*'rocks!#?#%~"

Expand Down Expand Up @@ -115,10 +112,9 @@ export default function(file, type, sidebar = false) {
}

it(`See ${file} as ${placedName} in the list`, function() {
cy.get(`[data-cy-files-list] tr[data-cy-files-list-row-name="${placedNameCss}"]`, {
timeout: 10000,
})
.should('contain', placedName.replace(/(.*)\./, '$1 .'))
// cy.getFile will escape all the characters in the name to match it with css
cy.getFile(placedName, { timeout: 10000 })
.should('contain', placedName.replace(/(.*)\./, '$1 .'))
})

it('Open the viewer on file click', function() {
Expand Down

0 comments on commit f197ff7

Please sign in to comment.