OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
API
/
swagger-ui-5.17.14
/
test
/
e2e-cypress
/
e2e
/
features
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/07/2024 04:34:14 AM
rwxr-xr-x
📄
auth-bearer-flow.cy.js
1.31 KB
08/07/2024 04:34:13 AM
rw-r--r--
📄
auth-code-flow-pkce-without-secret.cy.js
1.48 KB
08/07/2024 04:34:13 AM
rw-r--r--
📄
deep-linking.cy.js
9.43 KB
08/07/2024 04:34:13 AM
rw-r--r--
📄
default-model-rendering.cy.js
1.31 KB
08/07/2024 04:34:13 AM
rw-r--r--
📄
dynamic-default-oauth.cy.js
1.32 KB
08/07/2024 04:34:13 AM
rw-r--r--
📄
external-docs.cy.js
3.9 KB
08/07/2024 04:34:13 AM
rw-r--r--
📄
info.cy.js
2.53 KB
08/07/2024 04:34:13 AM
rw-r--r--
📄
license.cy.js
3.55 KB
08/07/2024 04:34:13 AM
rw-r--r--
📄
model-collapse.cy.js
1.49 KB
08/07/2024 04:34:13 AM
rw-r--r--
📄
multiple-examples-core.cy.js
23.08 KB
08/07/2024 04:34:13 AM
rw-r--r--
📄
oas-badge.cy.js
866 bytes
08/07/2024 04:34:13 AM
rw-r--r--
📄
oas3-callbacks.cy.js
535 bytes
08/07/2024 04:34:13 AM
rw-r--r--
📄
oas3-multiple-media-type.cy.js
6.25 KB
08/07/2024 04:34:13 AM
rw-r--r--
📄
oas3-multiple-servers.cy.js
2.6 KB
08/07/2024 04:34:14 AM
rw-r--r--
📄
oas3-request-body-allow-empty-values.cy.js
6.57 KB
08/07/2024 04:34:14 AM
rw-r--r--
📄
oas3-request-body-default-views.cy.js
542 bytes
08/07/2024 04:34:14 AM
rw-r--r--
📄
oas3-request-body-required.cy.js
9.7 KB
08/07/2024 04:34:14 AM
rw-r--r--
📄
oas3-user-edit-request-body-flows.cy.js
3.95 KB
08/07/2024 04:34:14 AM
rw-r--r--
📄
oas3-xml.cy.js
3.14 KB
08/07/2024 04:34:14 AM
rw-r--r--
📄
oas31-auth-mutual-tls.cy.js
799 bytes
08/07/2024 04:34:14 AM
rw-r--r--
📁
oauth2-flows
-
08/07/2024 04:34:38 AM
rwxr-xr-x
📄
parameter-array-missing-items.cy.js
429 bytes
08/07/2024 04:34:14 AM
rw-r--r--
📄
parameter-order.cy.js
1 KB
08/07/2024 04:34:14 AM
rw-r--r--
📄
parameters-one-of-any-of.cy.js
1.36 KB
08/07/2024 04:34:14 AM
rw-r--r--
📁
plugins
-
08/07/2024 04:35:02 AM
rwxr-xr-x
📄
request-body-upload-file.cy.js
4.99 KB
08/07/2024 04:34:14 AM
rw-r--r--
📄
response-empty-examples-object.cy.js
434 bytes
08/07/2024 04:34:14 AM
rw-r--r--
📄
response-extension.cy.js
1.89 KB
08/07/2024 04:34:14 AM
rw-r--r--
📄
schema-form-enum-boolean.cy.js
4.2 KB
08/07/2024 04:34:14 AM
rw-r--r--
📄
schema-form.cy.js
31.3 KB
08/07/2024 04:34:14 AM
rw-r--r--
📄
spec-parse-to-json.cy.js
1.14 KB
08/07/2024 04:34:14 AM
rw-r--r--
📄
syntax-highlighting-json.cy.js
1.81 KB
08/07/2024 04:34:14 AM
rw-r--r--
📄
try-it-out-enabled.cy.js
675 bytes
08/07/2024 04:34:14 AM
rw-r--r--
📄
try-it-out-non-200-response-body.cy.js
795 bytes
08/07/2024 04:34:14 AM
rw-r--r--
📄
try-it-out-schema-required-override-allowed.cy.js
551 bytes
08/07/2024 04:34:14 AM
rw-r--r--
📄
urls.cy.js
3.65 KB
08/07/2024 04:34:14 AM
rw-r--r--
📄
webhooks.cy.js
842 bytes
08/07/2024 04:34:14 AM
rw-r--r--
Editing: urls.cy.js
Close
describe("configuration options: `urls` and `urls.primaryName`", () => { describe("`urls` only", () => { it("should render a list of URLs correctly", () => { cy.visit("/?configUrl=/configs/urls.yaml") .get("select") .children() .should("have.length", 2) .get("select > option") .eq(0) .should("have.text", "One") .should("have.attr", "value", ) .and("match", /\/documents\/features\/urls\/1\.yaml$/) .get("select > option") .eq(1) .should("have.text", "Two") .should("have.attr", "value") .and("match", /\/documents\/features\/urls\/2\.yaml$/) }) it("should render the first URL in the list", () => { cy.visit("/?configUrl=/configs/urls.yaml") .get("h2.title") .should("have.text", "OneOAS 2.0") .window() .then(win => win.ui.specSelectors.url()) .should("match", /\/documents\/features\/urls\/1\.yaml$/) }) }) it("should respect a `urls.primaryName`", () => { cy.visit("/?configUrl=/configs/urls-primary-name.yaml") .get("select") .should("contain.value", "/documents/features/urls/2.yaml") .get("h2.title") .should("have.text", "TwoOAS 3.0") .window() .then(win => win.ui.specSelectors.url()) .get("select") .should("contain.value", "/documents/features/urls/2.yaml") }) }) describe("urls with server variables", () => { it("should compute a url and default server variables", () => { cy.visit("/?configUrl=/configs/urls-server-variables.yaml") .get("code") .should("have.text", "https://localhost:3200/oneFirstUrl") .get("tr > :nth-child(1)") .should("have.text", "basePath") .get("input") .should("have.value", "/oneFirstUrl") }) it("should change server variables", () => { cy.visit("/?configUrl=/configs/urls-server-variables.yaml") .get("code") .should("have.text", "https://localhost:3200/oneFirstUrl") .get("tr > :nth-child(1)") .should("have.text", "basePath") .get("input") .should("have.value", "/oneFirstUrl") .get(".servers > label > select") .eq(0) .select(1) .get("input") .should("have.value", "/oneSecondUrl") }) it("should select and compute second url", () => { cy.visit("/?configUrl=/configs/urls-server-variables.yaml") .get("select > option") .eq(1) .should("have.text", "Two") .get("select") .eq(0) .select(1) .get("code") .should("have.text", "https://localhost:3200/twoFirstUrl") .get("input") .should("have.value", "/twoFirstUrl") }) it("should select second url, then toggle back to first url", () => { cy.visit("/?configUrl=/configs/urls-server-variables.yaml") .get("select > option") .get("select") .eq(0) .select(1) .get("input") .should("have.value", "/twoFirstUrl") // toggle url back .get("select") .eq(0) .select(0) .get("code") .should("have.text", "https://localhost:3200/oneFirstUrl") .get("input") .should("have.value", "/oneFirstUrl") }) it("should change server variables, then select second url, and maintain server variables index", () => { cy.visit("/?configUrl=/configs/urls-server-variables.yaml") .get(".servers > label >select") .eq(0) .select(1) .get("input") .should("have.value", "/oneSecondUrl") // change url .get("select > option") .get("select") .eq(0) .select(1) .get("input") .should("have.value", "/twoSecondUrl") .get("input") .should("have.value", "/twoSecondUrl") }) })