OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
API
/
swagger-ui-5.17.14
/
test
/
e2e-cypress
/
e2e
/
bugs
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/07/2024 04:34:14 AM
rwxr-xr-x
📄
4442.cy.js
1.12 KB
08/07/2024 04:34:12 AM
rw-r--r--
📄
4641.cy.js
3.36 KB
08/07/2024 04:34:12 AM
rw-r--r--
📄
4838.cy.js
338 bytes
08/07/2024 04:34:12 AM
rw-r--r--
📄
4865.cy.js
722 bytes
08/07/2024 04:34:12 AM
rw-r--r--
📄
4867.cy.js
474 bytes
08/07/2024 04:34:12 AM
rw-r--r--
📄
4943.cy.js
572 bytes
08/07/2024 04:34:12 AM
rw-r--r--
📄
5043.cy.js
977 bytes
08/07/2024 04:34:12 AM
rw-r--r--
📄
5060.cy.js
678 bytes
08/07/2024 04:34:12 AM
rw-r--r--
📄
5070.cy.js
1 KB
08/07/2024 04:34:12 AM
rw-r--r--
📄
5072.cy.js
785 bytes
08/07/2024 04:34:12 AM
rw-r--r--
📄
5129.cy.js
3.83 KB
08/07/2024 04:34:12 AM
rw-r--r--
📄
5138.cy.js
283 bytes
08/07/2024 04:34:12 AM
rw-r--r--
📄
5164.cy.js
606 bytes
08/07/2024 04:34:12 AM
rw-r--r--
📄
5188.cy.js
660 bytes
08/07/2024 04:34:12 AM
rw-r--r--
📄
5452.cy.js
1.33 KB
08/07/2024 04:34:12 AM
rw-r--r--
📄
5453.cy.js
406 bytes
08/07/2024 04:34:12 AM
rw-r--r--
📄
5455.cy.js
433 bytes
08/07/2024 04:34:12 AM
rw-r--r--
📄
5458.cy.js
703 bytes
08/07/2024 04:34:12 AM
rw-r--r--
📄
5660.cy.js
680 bytes
08/07/2024 04:34:12 AM
rw-r--r--
📄
6016.cy.js
1.71 KB
08/07/2024 04:34:12 AM
rw-r--r--
📄
6158.cy.js
1.79 KB
08/07/2024 04:34:12 AM
rw-r--r--
📄
6183.cy.js
1.47 KB
08/07/2024 04:34:12 AM
rw-r--r--
📄
6276.cy.js
1.52 KB
08/07/2024 04:34:12 AM
rw-r--r--
📄
6351.cy.js
507 bytes
08/07/2024 04:34:12 AM
rw-r--r--
📄
6369.cy.js
1.86 KB
08/07/2024 04:34:12 AM
rw-r--r--
📄
6442.cy.js
1.1 KB
08/07/2024 04:34:13 AM
rw-r--r--
📄
6475.cy.js
1.89 KB
08/07/2024 04:34:13 AM
rw-r--r--
📄
6540.cy.js
735 bytes
08/07/2024 04:34:13 AM
rw-r--r--
📄
6627.cy.js
455 bytes
08/07/2024 04:34:13 AM
rw-r--r--
📄
7996.cy.js
592 bytes
08/07/2024 04:34:13 AM
rw-r--r--
📄
8217.cy.js
894 bytes
08/07/2024 04:34:13 AM
rw-r--r--
📄
editor-1868.cy.js
675 bytes
08/07/2024 04:34:13 AM
rw-r--r--
📄
swos-63.cy.js
1.1 KB
08/07/2024 04:34:13 AM
rw-r--r--
Editing: 4641.cy.js
Close
const clickTryItOutAndExecute = () => { return cy .get(".btn.try-out__btn") // expand "try it out" .click() .get(".btn.execute") // execute request .click() } const fillInApiKeyAndAuthorise = apiKey => () => { return cy .get("section>input") // type api key into input .type(apiKey) .get(".auth-btn-wrapper > .authorize") // authorise button .click() } const clickLogoutAndReauthorise = () => { return cy .get(".auth-btn-wrapper button:nth-child(1)") // logout button .click() .get(".auth-btn-wrapper > .authorize") // authorise button .click() } describe("#4641: The Logout button in Authorize popup not clearing API Key", () => { beforeEach(() => { cy.intercept("GET", "/4641*", { body: "OK", }).as("request") }) it("should include the given api key in requests", () => { cy .visit("/?url=/documents/bugs/4641.yaml") .get("button.btn.authorize") // open authorize popup .click() .get(".modal-ux-content > :nth-child(1)") // only deal with api_key_1 for this test .within(fillInApiKeyAndAuthorise("my_api_key")) .get(".close-modal") // close authorise popup button .click() .get("#operations-default-get_4641_1") // expand the route details onClick .click() .within(clickTryItOutAndExecute) .wait("@request") .its("request") .then((req) => { expect(req.headers, "request headers").to.have.property("api_key_1", "my_api_key") }) }) it("should not remember the previous auth value when you logout and reauthorise", () => { cy .visit("/?url=/documents/bugs/4641.yaml") .get("button.btn.authorize") // open authorize popup .click() .get(".modal-ux-content > :nth-child(1)") // only deal with api_key_1 for this test .within(fillInApiKeyAndAuthorise("my_api_key")) .get(".modal-ux-content > :nth-child(1)") // only deal with api_key_1 for this test .within(clickLogoutAndReauthorise) .get(".close-modal") // close authorise popup button .click() .get("#operations-default-get_4641_1") // expand the route details onClick .click() .within(clickTryItOutAndExecute) .wait("@request") .its("request") .then((req) => { expect(req.headers, "request headers").not.to.have.property("api_key_1") }) }) it("should only forget the value of the auth the user logged out from", () => { cy .visit("/?url=/documents/bugs/4641.yaml") .get("button.btn.authorize") // open authorize popup .click() .get(".modal-ux-content > :nth-child(1)") // deal with api_key_1 .within(fillInApiKeyAndAuthorise("my_api_key")) .get(".modal-ux-content > :nth-child(2)") // deal with api_key_2 .within(fillInApiKeyAndAuthorise("my_second_api_key")) .get(".modal-ux-content > :nth-child(1)") // deal with api_key_1 again .within(clickLogoutAndReauthorise) .get(".close-modal") // close authorise popup button .click() .get("#operations-default-get_4641_2") // expand the route details onClick .click() .within(clickTryItOutAndExecute) .wait("@request") .its("request") .then((req) => { expect(req.headers, "request headers").not.to.have.property("api_key_1") expect(req.headers, "request headers").to.have.property("api_key_2", "my_second_api_key") }) }) })