Skip to content

Commit

Permalink
fix(cy): adjust selectors for filepicker
Browse files Browse the repository at this point in the history
basename and extension are now split.

Signed-off-by: Max <[email protected]>
  • Loading branch information
max-nextcloud committed Aug 27, 2023
1 parent 51b66dc commit 9b40663
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions cypress/e2e/attachments.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ describe('Test all attachment insertion methods', () => {
cy.log('Go to sub folder (a)')
cy.get('.file-picker__main .file-picker__file-name[title="sub"]').click()
cy.get('.file-picker__main .file-picker__file-name[title="a"]').click()
cy.get('.file-picker__main .file-picker__file-name[title="a.png"]').click()
cy.get('.file-picker__main .file-picker__file-name[title="a"]').click()

cy.get('.dialog__actions button.button-vue--vue-primary').click()

Expand All @@ -191,12 +191,13 @@ describe('Test all attachment insertion methods', () => {
const requestAlias = 'insertPathRequest-b'
cy.intercept({ method: 'POST', url: '**/filepath' }).as(requestAlias)

cy.log('Go back to sub folder')
cy.get('#oc-dialog-filepicker-content .dirtree [data-dir="/sub"] a').click()
cy.log('Go back from home to sub folder')
cy.get('.file-picker__breadcrumbs a[title="Home"]').click()
cy.get('.file-picker__main .file-picker__file-name[title="sub"]').click()

cy.log('Go to sub folder (b)')
cy.get('.file-picker__main .file-picker__file-name[title="b"]').click()
cy.get('.file-picker__main .file-picker__file-name[title="b.png"]').click()
cy.get('.file-picker__main .file-picker__file-name[title="b"]').click()

cy.get('.dialog__actions button.button-vue--vue-primary').click()

Expand All @@ -210,10 +211,10 @@ describe('Test all attachment insertion methods', () => {
cy.intercept({ method: 'POST', url: '**/filepath' }).as(requestAlias)

cy.log('Go back to home')
cy.get('#oc-dialog-filepicker-content .dirtree .crumb:first-child').click()
cy.get('.file-picker__breadcrumbs a[title="Home"]').click()

cy.log('Select the file in the filepicker')
cy.get('.file-picker__main .file-picker__file-name[title="github.png"]').click()
cy.get('.file-picker__main .file-picker__file-name[title="github"]').click()
cy.log('Click OK in the filepicker')
cy.get('.dialog__actions button.button-vue--vue-primary').click()

Expand Down

0 comments on commit 9b40663

Please sign in to comment.