* add `security-audit` script * npm audit fix * remove nyc * nightwatch@1 this breaks the test suite, but it appears to have already regressed. leaving it for another day, TODO: open a backlog ticket * add `security-audit` script * disable mocha exclusivity * update package-lock.json * cypress@3.4.0 * `npm audit fix` * @release-it/conventional-changelog@1.1.0 * release-it@12
52 lines
1.6 KiB
JavaScript
52 lines
1.6 KiB
JavaScript
describe("Render scheme", function () {
|
|
let mainPage
|
|
let schemeContainer
|
|
beforeEach(function (client, done) {
|
|
|
|
mainPage = client
|
|
.url("localhost:3230")
|
|
.page.main()
|
|
|
|
schemeContainer = mainPage.section.schemeContainer
|
|
|
|
client.waitForElementVisible(".download-url-input:not([disabled])", 5000)
|
|
.clearValue(".download-url-input")
|
|
.setValue(".download-url-input", "http://localhost:3230/test-specs/petstore.json")
|
|
.click("button.download-url-button")
|
|
.pause(1000)
|
|
|
|
|
|
done()
|
|
})
|
|
|
|
it("render section", function (client) {
|
|
mainPage.expect.section("@schemeContainer").to.be.visible.before(5000)
|
|
|
|
client.end()
|
|
})
|
|
it("render scheme option", function (client) {
|
|
schemeContainer.waitForElementVisible("@httpOption", 5000)
|
|
.expect.element("@httpOption").to.be.selected
|
|
|
|
client.end()
|
|
})
|
|
|
|
it("render authorized button", function (client) {
|
|
schemeContainer.waitForElementVisible("@btnAuthorize", 5000)
|
|
.expect.element("@btnAuthorize").to.be.visible
|
|
|
|
client.end()
|
|
})
|
|
it("render click event", function(client) {
|
|
schemeContainer.waitForElementVisible("@btnAuthorize", 5000)
|
|
.click("@btnAuthorize")
|
|
.assert.visible("@authorizationModal")
|
|
.assert.containsText("@appName", "Application: your-app-name")
|
|
.assert.containsText("@authorizationUrl", "http://petstore.swagger.io/oauth/dialog")
|
|
.assert.containsText("@flow", "implicit")
|
|
.assert.value("@inputClientID", "your-client-id")
|
|
|
|
client.end()
|
|
})
|
|
})
|