meta: introduce Cypress end-to-end testing (via #4827)
* `test/e2e` -> `test/e2e-selenium` * add Cypress * ESLint fixes * MOAR cypress * `integration` -> `tests` * wire Cypress up to a hot e2e server * linter fixes * don't run in CI
This commit is contained in:
26
test/e2e-selenium/scenarios/refs.js
Normal file
26
test/e2e-selenium/scenarios/refs.js
Normal file
@@ -0,0 +1,26 @@
|
||||
describe("Remote $ref rendering", function () {
|
||||
let mainPage
|
||||
beforeEach(function (client, done) {
|
||||
|
||||
mainPage = client
|
||||
// expand the models so we don't have to manually do it
|
||||
.url("localhost:3230?defaultModelsExpandDepth=5")
|
||||
.page.main()
|
||||
|
||||
client.waitForElementVisible(".download-url-input:not([disabled])", 5000)
|
||||
.pause(2000)
|
||||
.clearValue(".download-url-input")
|
||||
.setValue(".download-url-input", "http://localhost:3230/test-specs/refs/api1.yaml")
|
||||
.click("button.download-url-button")
|
||||
.pause(1000)
|
||||
|
||||
|
||||
done()
|
||||
})
|
||||
|
||||
it("renders a remote $ref correctly", function (client) {
|
||||
mainPage.expect.element("#model-TestResponse > span > div > span > span > span.inner-object > table > tbody > tr:nth-child(2) > td:nth-child(2) > span > span > div > div > p").text.to.equal("this is an api2prop")
|
||||
|
||||
client.end()
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user