Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
test(cy): add test for using "Open link" button in link bubble
Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed Jul 26, 2025
commit 2a6cf30de14d0c79eb464a2de0ec91f1a5c3319c
12 changes: 11 additions & 1 deletion cypress/e2e/nodes/Links.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('test link marks', function() {
cy.get('.link-view-bubble .widget-default', { timeout: 10000 })
.find('.widget-default--name')
.contains('Nextcloud')
.click({ force: true })
.click()
})

it('shows a link preview in the bubble after browsing to link', () => {
Expand All @@ -64,6 +64,16 @@ describe('test link marks', function() {
.contains('Nextcloud')
})

it('open button opens a new tab', () => {
const link = 'https://nextcloud.com/'
cy.insertLine(link)
clickLink(link)

cy.get('.link-view-bubble button[title="Open link"]').click()

cy.get('@winOpen').should('have.been.calledOnce')
})

it('closes the link bubble when clicking elsewhere', () => {
const link = 'https://nextcloud.com/'
cy.insertLine(link)
Expand Down
Loading