diff --git a/cypress/e2e/attachments.spec.js b/cypress/e2e/attachments.spec.js index 58420b55e14..13b188d459e 100644 --- a/cypress/e2e/attachments.spec.js +++ b/cypress/e2e/attachments.spec.js @@ -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() @@ -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() @@ -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() diff --git a/cypress/e2e/nodes/Links.spec.js b/cypress/e2e/nodes/Links.spec.js index 1fe5ccd729e..7a5a54c5589 100644 --- a/cypress/e2e/nodes/Links.spec.js +++ b/cypress/e2e/nodes/Links.spec.js @@ -139,7 +139,8 @@ describe('test link marks', function() { // Helper to reduce duplicated code, checking inserting with and without selected text const checkLinkFile = (filename, text) => { cy.getSubmenuEntry('insert-link', 'insert-link-file').click() - cy.get(`.file-picker__main .file-picker__file-name[title="${filename}"]`).click() + const basename = filename.replace(/(.*)\./, '$1') + cy.get(`.file-picker__main .file-picker__file-name[title="${basename}"]`).click() cy.get('.dialog__actions button.button-vue--vue-primary').click() return cy.getContent()