chore(deps-dev): update cypress to v12 (#8889)
This update required changing the configuration and test directory structure. Some tests needed to be amended as well to compensate for new Cypress APIs.
This commit is contained in:
23
test/e2e-cypress/e2e/security/oauth2.cy.js
Normal file
23
test/e2e-cypress/e2e/security/oauth2.cy.js
Normal file
@@ -0,0 +1,23 @@
|
||||
describe("XSS: OAuth2 authorizationUrl sanitization", () => {
|
||||
it("should filter out a javascript URL", () => {
|
||||
cy.visit("/?url=/documents/security/xss-oauth2.yaml")
|
||||
.window()
|
||||
.then(win => {
|
||||
let args = null
|
||||
const stub = cy.stub(win, "open", (...callArgs) => {
|
||||
args = callArgs
|
||||
}).as("windowOpen")
|
||||
|
||||
cy.get(".authorize")
|
||||
.click()
|
||||
.get(".modal-btn.authorize")
|
||||
.click()
|
||||
.wait(100)
|
||||
.then(() => {
|
||||
console.log(args)
|
||||
expect(args[0]).to.match(/^about:blank/)
|
||||
})
|
||||
|
||||
})
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user