Validate URL protocol before opening from Visual Editor tooltip (#18393)
GitOrigin-RevId: 1da255d3e8ccd91e8c8774d140ec663906be948f
This commit is contained in:
+4
-4
@@ -54,8 +54,8 @@ describe('<CodeMirrorEditor/> command tooltip in Visual mode', function () {
|
||||
// open the link
|
||||
cy.findByRole('button', { name: 'Go to page' }).click()
|
||||
cy.get('@window-open').should(
|
||||
'have.been.calledOnceWithExactly',
|
||||
'https://example.com',
|
||||
'have.been.calledWithMatch',
|
||||
Cypress.sinon.match.has('href', 'https://example.com/'),
|
||||
'_blank'
|
||||
)
|
||||
|
||||
@@ -112,8 +112,8 @@ describe('<CodeMirrorEditor/> command tooltip in Visual mode', function () {
|
||||
// open the link
|
||||
cy.findByRole('button', { name: 'Go to page' }).click()
|
||||
cy.get('@window-open').should(
|
||||
'have.been.calledOnceWithExactly',
|
||||
'https://example.com',
|
||||
'have.been.calledWithMatch',
|
||||
Cypress.sinon.match.has('href', 'https://example.com/'),
|
||||
'_blank'
|
||||
)
|
||||
})
|
||||
|
||||
+4
-4
@@ -42,8 +42,8 @@ describe('<CodeMirrorEditor/> tooltips in Visual mode', function () {
|
||||
})
|
||||
cy.findByRole('button', { name: 'Go to page' }).click()
|
||||
cy.get('@open-window').should(
|
||||
'have.been.calledOnceWithExactly',
|
||||
'https://example.com/foo',
|
||||
'have.been.calledWithMatch',
|
||||
Cypress.sinon.match.has('href', 'https://example.com/foo'),
|
||||
'_blank'
|
||||
)
|
||||
cy.findByRole('button', { name: 'Remove link' }).click()
|
||||
@@ -62,8 +62,8 @@ describe('<CodeMirrorEditor/> tooltips in Visual mode', function () {
|
||||
})
|
||||
cy.findByRole('button', { name: 'Go to page' }).click()
|
||||
cy.get('@open-window').should(
|
||||
'have.been.calledOnceWithExactly',
|
||||
'https://example.com',
|
||||
'have.been.calledWithMatch',
|
||||
Cypress.sinon.match.has('href', 'https://example.com/'),
|
||||
'_blank'
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user