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: external-docs.cy.js
Close
describe("External docs feature", () => { describe("in Swagger 2", () => { ExternalDocsTest("/?url=/documents/features/external-docs.swagger.yaml") }) describe("in OpenAPI 3", () => { ExternalDocsTest("/?url=/documents/features/external-docs.openapi.yaml") }) }) function ExternalDocsTest(baseUrl) { describe("for Root", () => { it("should display link to external docs with description", () => { cy.visit(baseUrl) .get(".info__extdocs") .should("exist") .and("contain.text", "Read external docs") .and("have.attr", "href", "http://swagger.io") }) it("should display link to external docs without description", () => { cy .intercept({ path: /^\/documents\/features\/external-docs\.(swagger|openapi)\.yaml\?intercept$/ }, (req) => { delete req.headers["if-none-match"] delete req.headers["if-modified-since"] req.continue((res) => { res.send({body: res.body.replace(" description: Read external docs\n", "")}) }) }) .visit(`${baseUrl}?intercept`) .get(".info__extdocs") .should("exist") .and("contain.text", "http://swagger.io") .and("have.attr", "href", "http://swagger.io") }) }) describe("for Tags", () => { it("should display link to external docs with description", () => { cy.visit(baseUrl) .get(`.opblock-tag[data-tag="pet"] .info__externaldocs`) .should("exist") .find("a") .should("contain.text", "Pet Documentation") .and("have.attr", "href", "http://swagger.io") }) it("should display link to external docs without description", () => { cy.visit(baseUrl) .get(`.opblock-tag[data-tag="petWithoutDescription"] .info__externaldocs`) .should("exist") .find("a") .should("contain.text", "http://swagger.io") .and("have.attr", "href", "http://swagger.io") }) }) describe("for Schemas", () => { function SchemaTestFactory(type) { return () => { it("should display link with description", () => { cy.visit(baseUrl) .get(`.models #model-${type} button`) .click() .get(`.models #model-${type} .external-docs a`) .should("contain.text", `${type} Docs`) .and("have.attr", "href", "http://swagger.io") }) it("should display link without description", () => { cy.visit(baseUrl) .get(`.models #model-${type}WithoutDescription button`) .click() .get(`.models #model-${type}WithoutDescription .external-docs a`) .should("contain.text", "http://swagger.io") .and("have.attr", "href", "http://swagger.io") }) } } describe("Primitive Schema", SchemaTestFactory("Primitive")) describe("Array Schema", SchemaTestFactory("Array")) describe("Object Schema", SchemaTestFactory("Object")) }) describe("for Operation", () => { it("should display link to external docs with description", () => { cy.visit(baseUrl) .get("#operations-pet-updatePet button.opblock-summary-control") .click() .get("#operations-pet-updatePet .opblock-external-docs-wrapper .opblock-external-docs__description") .should("contain.text", "More details about putting a pet") .get("#operations-pet-updatePet .opblock-external-docs-wrapper .opblock-external-docs__link") .should("have.attr", "href", "http://swagger.io") }) it("should display link to external docs without description", () => { cy.visit(baseUrl) .get("#operations-pet-addPet button.opblock-summary-control") .click() .get("#operations-pet-addPet .opblock-external-docs-wrapper .opblock-external-docs__description") .should("not.exist") .get("#operations-pet-addPet .opblock-external-docs-wrapper .opblock-external-docs__link") .should("have.attr", "href", "http://swagger.io") }) }) }