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:
Vladimír Gorej
2023-06-07 10:25:32 +02:00
committed by GitHub
parent f30d89af1b
commit 3e81a4f897
80 changed files with 68 additions and 83 deletions

View File

@@ -0,0 +1,30 @@
describe("Parameter order", () => {
it("should be well ordered", () => {
cy.visit("/?url=/documents/features/parameter-order.yaml")
.get("#operations-default-post_test__id__related__relatedId_")
.click()
.get(".parameters > tbody")
.children()
.each((tr, i, arr) => {
const parameterTableRows = Array.from(arr)
expect(tr).to.have.attr("data-param-in")
if (i === 0) {
return
}
const inValue = tr[0].getAttribute("data-param-in")
if (!inValue) {
return
}
const beforeInValue = parameterTableRows[i - 1].getAttribute("data-param-in")
const sameAsBefore = beforeInValue === inValue
if (sameAsBefore) {
expect(parameterTableRows[i - 1]).to.have.attr("data-param-in", inValue)
return
}
for (let x = i + 1; x < parameterTableRows.length; x++) {
expect(parameterTableRows[x]).to.not.have.attr("data-param-in", beforeInValue)
}
})
})
})