housekeeping: improve e2e stability (#4721)

This commit is contained in:
kyle
2018-07-12 17:59:35 -07:00
committed by GitHub
parent 59a6a9b20f
commit 003d6b782d
18 changed files with 25 additions and 19 deletions

View File

@@ -74,7 +74,7 @@
window["SwaggerUIStandalonePreset"] = window["swagger-ui-standalone-preset"] window["SwaggerUIStandalonePreset"] = window["swagger-ui-standalone-preset"]
// Build a system // Build a system
const ui = SwaggerUIBundle({ const ui = SwaggerUIBundle({
url: "https://petstore.swagger.io/v2/swagger.json", url: "",
dom_id: '#swagger-ui', dom_id: '#swagger-ui',
presets: [ presets: [
SwaggerUIBundle.presets.apis, SwaggerUIBundle.presets.apis,

View File

@@ -5,7 +5,7 @@ describe("bug #4196: HTTP basic auth credential retention", function () {
.url("localhost:3230") .url("localhost:3230")
.page.main() .page.main()
client.waitForElementVisible(".download-url-input", 5000) client.waitForElementVisible(".download-url-input:not([disabled])", 5000)
.pause(80) .pause(80)
.clearValue(".download-url-input") .clearValue(".download-url-input")
.setValue(".download-url-input", "http://localhost:3230/test-specs/bugs/4196.yaml") .setValue(".download-url-input", "http://localhost:3230/test-specs/bugs/4196.yaml")

View File

@@ -5,10 +5,10 @@ describe("bug #4374: OAS3 parameters should be visibly validated in Try-It-Out",
.url("localhost:3230") .url("localhost:3230")
.page.main() .page.main()
client.waitForElementVisible(".download-url-input", 10000) client.waitForElementVisible(".download-url-input:not([disabled])", 10000)
.pause(1000) .pause(1000)
.clearValue(".download-url-input") .clearValue(".download-url-input")
.setValue(".download-url-input", "http://localhost:3230/test-specs/bugs/4374.yaml") .setValue(".download-url-input", "/test-specs/bugs/4374.yaml")
.click("button.download-url-button") .click("button.download-url-button")
.pause(1000) .pause(1000)

View File

@@ -5,7 +5,7 @@ describe("bug #4409: operationId normalization and layout tracking", function ()
.url("localhost:3230") .url("localhost:3230")
.page.main() .page.main()
client.waitForElementVisible(".download-url-input", 5000) client.waitForElementVisible(".download-url-input:not([disabled])", 5000)
.pause(5000) .pause(5000)
.clearValue(".download-url-input") .clearValue(".download-url-input")
.setValue(".download-url-input", "http://localhost:3230/test-specs/bugs/4409.yaml") .setValue(".download-url-input", "http://localhost:3230/test-specs/bugs/4409.yaml")

View File

@@ -5,7 +5,7 @@ describe("bug #4445: callback-via-$ref rendering", function () {
.url("localhost:3230") .url("localhost:3230")
.page.main() .page.main()
client.waitForElementVisible(".download-url-input", 5000) client.waitForElementVisible(".download-url-input:not([disabled])", 5000)
.pause(5000) .pause(5000)
.clearValue(".download-url-input") .clearValue(".download-url-input")
.setValue(".download-url-input", "http://localhost:3230/test-specs/bugs/4445.yaml") .setValue(".download-url-input", "http://localhost:3230/test-specs/bugs/4445.yaml")

View File

@@ -5,7 +5,7 @@ describe("bug #4485: operation metadata storage when referenced via path item $r
.url("localhost:3230") .url("localhost:3230")
.page.main() .page.main()
client.waitForElementVisible(".download-url-input", 5000) client.waitForElementVisible(".download-url-input:not([disabled])", 5000)
.pause(2000) .pause(2000)
.clearValue(".download-url-input") .clearValue(".download-url-input")
.setValue(".download-url-input", "http://localhost:3230/test-specs/bugs/4485/main.yaml") .setValue(".download-url-input", "http://localhost:3230/test-specs/bugs/4485/main.yaml")

View File

@@ -5,7 +5,7 @@ describe("bug #4536: model name consistency", function () {
.url("localhost:3230") .url("localhost:3230")
.page.main() .page.main()
client.waitForElementVisible(".download-url-input", 5000) client.waitForElementVisible(".download-url-input:not([disabled])", 5000)
.pause(2000) .pause(2000)
.clearValue(".download-url-input") .clearValue(".download-url-input")
.setValue(".download-url-input", "http://localhost:3230/test-specs/bugs/4536.yaml") .setValue(".download-url-input", "http://localhost:3230/test-specs/bugs/4536.yaml")

View File

@@ -6,7 +6,7 @@ describe("render informationContainer", function () {
mainPage = client mainPage = client
.url("localhost:3230") .url("localhost:3230")
.page.main() .page.main()
client.waitForElementVisible(".download-url-input", 5000) client.waitForElementVisible(".download-url-input:not([disabled])", 5000)
.pause(5000) .pause(5000)
.clearValue(".download-url-input") .clearValue(".download-url-input")
.setValue(".download-url-input", "http://localhost:3230/test-specs/petstore.json") .setValue(".download-url-input", "http://localhost:3230/test-specs/petstore.json")

View File

@@ -5,7 +5,7 @@ describe("Render Model Wrapper", function () {
mainPage = client mainPage = client
.url("localhost:3230") .url("localhost:3230")
.page.main() .page.main()
client.waitForElementVisible(".download-url-input", 5000) client.waitForElementVisible(".download-url-input:not([disabled])", 5000)
.pause(5000) .pause(5000)
.clearValue(".download-url-input") .clearValue(".download-url-input")
.setValue(".download-url-input", "http://localhost:3230/test-specs/petstore.json") .setValue(".download-url-input", "http://localhost:3230/test-specs/petstore.json")

View File

@@ -6,7 +6,7 @@ describe("render pet api container", function () {
.url("localhost:3230") .url("localhost:3230")
.page.main() .page.main()
client.waitForElementVisible(".download-url-input", 5000) client.waitForElementVisible(".download-url-input:not([disabled])", 5000)
.pause(5000) .pause(5000)
.clearValue(".download-url-input") .clearValue(".download-url-input")
.setValue(".download-url-input", "http://localhost:3230/test-specs/callbacks.openapi.yaml") .setValue(".download-url-input", "http://localhost:3230/test-specs/callbacks.openapi.yaml")

View File

@@ -6,7 +6,7 @@ describe("render pet api container", function () {
.url("localhost:3230") .url("localhost:3230")
.page.main() .page.main()
client.waitForElementVisible(".download-url-input", 5000) client.waitForElementVisible(".download-url-input:not([disabled])", 5000)
.pause(5000) .pause(5000)
.clearValue(".download-url-input") .clearValue(".download-url-input")
.setValue(".download-url-input", "http://localhost:3230/test-specs/petstore.openapi.yaml") .setValue(".download-url-input", "http://localhost:3230/test-specs/petstore.openapi.yaml")

View File

@@ -7,7 +7,13 @@ describe("onComplete option", function () {
.url("localhost:3230") .url("localhost:3230")
.page.main() .page.main()
client.waitForElementVisible(".opblock-tag-section", 5000) client.waitForElementVisible(".download-url-input:not([disabled])", 5000)
.pause(80)
.clearValue(".download-url-input")
.setValue(".download-url-input", "http://localhost:3230/test-specs/petstore.json")
.click("button.download-url-button")
.pause(1000)
done() done()
}) })

View File

@@ -6,7 +6,7 @@ describe("render pet api container", function () {
.url("localhost:3230") .url("localhost:3230")
.page.main() .page.main()
client.waitForElementVisible(".download-url-input", 5000) client.waitForElementVisible(".download-url-input:not([disabled])", 5000)
.pause(5000) .pause(5000)
.clearValue(".download-url-input") .clearValue(".download-url-input")
.setValue(".download-url-input", "http://localhost:3230/test-specs/petstore.json") .setValue(".download-url-input", "http://localhost:3230/test-specs/petstore.json")

View File

@@ -6,7 +6,7 @@ describe("render store api container", function(){
.url("localhost:3230") .url("localhost:3230")
.page.main() .page.main()
client.waitForElementVisible(".download-url-input", 5000) client.waitForElementVisible(".download-url-input:not([disabled])", 5000)
.pause(3000) .pause(3000)
.clearValue(".download-url-input") .clearValue(".download-url-input")
.setValue(".download-url-input", "http://localhost:3230/test-specs/petstore.json") .setValue(".download-url-input", "http://localhost:3230/test-specs/petstore.json")

View File

@@ -6,7 +6,7 @@ describe("render user api container", function(){
.url("localhost:3230") .url("localhost:3230")
.page.main() .page.main()
client.waitForElementVisible(".download-url-input", 5000) client.waitForElementVisible(".download-url-input:not([disabled])", 5000)
.pause(5000) .pause(5000)
.clearValue(".download-url-input") .clearValue(".download-url-input")
.setValue(".download-url-input", "http://localhost:3230/test-specs/petstore.json") .setValue(".download-url-input", "http://localhost:3230/test-specs/petstore.json")

View File

@@ -7,7 +7,7 @@ describe("Remote $ref rendering", function () {
.url("localhost:3230?defaultModelsExpandDepth=5") .url("localhost:3230?defaultModelsExpandDepth=5")
.page.main() .page.main()
client.waitForElementVisible(".download-url-input", 5000) client.waitForElementVisible(".download-url-input:not([disabled])", 5000)
.pause(2000) .pause(2000)
.clearValue(".download-url-input") .clearValue(".download-url-input")
.setValue(".download-url-input", "http://localhost:3230/test-specs/refs/api1.yaml") .setValue(".download-url-input", "http://localhost:3230/test-specs/refs/api1.yaml")

View File

@@ -9,7 +9,7 @@ describe("Render scheme", function () {
schemeContainer = mainPage.section.schemeContainer schemeContainer = mainPage.section.schemeContainer
client.waitForElementVisible(".download-url-input", 5000) client.waitForElementVisible(".download-url-input:not([disabled])", 5000)
.pause(5000) .pause(5000)
.clearValue(".download-url-input") .clearValue(".download-url-input")
.setValue(".download-url-input", "http://localhost:3230/test-specs/petstore.json") .setValue(".download-url-input", "http://localhost:3230/test-specs/petstore.json")

View File

@@ -23,7 +23,7 @@ describe("initial render", function () {
topbar = mainPage.section.topbar topbar = mainPage.section.topbar
client.waitForElementVisible(".download-url-input", 10000) client.waitForElementVisible(".download-url-input:not([disabled])", 10000)
.pause(5000) .pause(5000)
.clearValue(".download-url-input") .clearValue(".download-url-input")
.setValue(".download-url-input", "http://localhost:3230/test-specs/petstore.json") .setValue(".download-url-input", "http://localhost:3230/test-specs/petstore.json")