fix(deeplinking): expand containing tag when expanding an operation (#4837)

* fix(deeplinking): expand containing tag when expanding an operation
* linter fixes
* tighten up test cases
This commit is contained in:
kyle
2018-08-27 22:58:00 -07:00
committed by GitHub
parent f51f391dcc
commit e6b7167dd8
2 changed files with 33 additions and 0 deletions

View File

@@ -71,6 +71,19 @@ describe("Deep linking feature", () => {
.should("exist")
})
})
describe("regular Operation with `docExpansion: none` enabled", function() {
it("should expand a tag", () => {
cy.visit(`${baseUrl}&docExpansion=none#/myTag`)
.get(`.opblock-tag-section.is-open`)
.should("have.length", 1)
})
it("should expand an operation", () => {
cy.visit(`${baseUrl}&docExpansion=none#/myTag/myOperation`)
.get(`.opblock.is-open`)
.should("have.length", 1)
})
})
})
describe("in OpenAPI 3", () => {
const baseUrl = "/?deepLinking=true&url=/documents/features/deep-linking.swagger.yaml"
@@ -144,5 +157,18 @@ describe("Deep linking feature", () => {
.should("exist")
})
})
describe("regular Operation with `docExpansion: none` enabled", function () {
it("should expand a tag", () => {
cy.visit(`${baseUrl}&docExpansion=none#/myTag`)
.get(`.opblock-tag-section.is-open`)
.should("have.length", 1)
})
it("should expand an operation", () => {
cy.visit(`${baseUrl}&docExpansion=none#/myTag/myOperation`)
.get(`.opblock.is-open`)
.should("have.length", 1)
})
})
})
})