Some checks failed
Node.js CI / build (push) Failing after 2s
Node.js CI / e2e-tests (+(a11y|security|bugs)/**/*cy.js) (push) Failing after 2s
Node.js CI / e2e-tests (features/**/!(o|d|m)*.cy.js) (push) Failing after 2s
Node.js CI / e2e-tests (features/**/+(o|d)*.cy.js) (push) Failing after 2s
Node.js CI / e2e-tests (features/**/m*.cy.js) (push) Failing after 2s
CodeQL / Analyze (javascript) (push) Failing after 2m49s
Security scan for docker image / build (push) Failing after 42s
32 lines
1.1 KiB
JavaScript
Executable File
32 lines
1.1 KiB
JavaScript
Executable File
/**
|
|
* @prettier
|
|
*/
|
|
|
|
describe("Parse YAML as YAML@1.2 with json_schema for all JSON-supported types", () => {
|
|
it("should have date string even without quotes", () => {
|
|
cy.visit("/?url=/documents/features/spec-parse-to-json.yaml")
|
|
.get("#operations-default-get_foo")
|
|
.click()
|
|
// Responses -> example value tab
|
|
.get(".language-json > :nth-child(3)")
|
|
.should("have.text", '"without-quotes"')
|
|
.get(".language-json > :nth-child(5)")
|
|
.should("have.text", '"1999-11-31"')
|
|
// Responses -> schema tab
|
|
.get(".model-example > .tab > :nth-child(2)")
|
|
.click()
|
|
.get(":nth-child(1) > :nth-child(2) > .model > :nth-child(1)")
|
|
.click()
|
|
.get(
|
|
":nth-child(1) > :nth-child(2) > .model > :nth-child(1) > .prop > .property"
|
|
) // first element, without-quotes
|
|
.should("have.text", "example: 1999-11-31")
|
|
.get(":nth-child(2) > :nth-child(2) > .model > :nth-child(1)")
|
|
.click()
|
|
.get(
|
|
":nth-child(2) > :nth-child(2) > .model > :nth-child(1) > .prop > .property"
|
|
) // second element, with quotes
|
|
.should("have.text", "example: 1999-12-31")
|
|
})
|
|
})
|