Override visibility timeout in CI
This commit is contained in:
@@ -5,6 +5,7 @@ var cbt = require("cbt_tunnels")
|
||||
module.exports = {
|
||||
baseAppUrl: "http://swagger-ui-ci-asset-deployment-test.surge.sh",
|
||||
specPath: "http://local:3204/petstore.json",
|
||||
visibleTimeout: 10000,
|
||||
|
||||
beforeEach: function(done) {
|
||||
console.log("Starting up tunnel")
|
||||
|
||||
@@ -6,8 +6,8 @@ describe("render informationContainer", function () {
|
||||
mainPage = client
|
||||
.url(client.globals.baseAppUrl)
|
||||
.page.main()
|
||||
client.waitForElementVisible(".download-url-input", 5000)
|
||||
.pause(5000)
|
||||
client.waitForElementVisible(".download-url-input", client.globals.visibleTimeout || 5000)
|
||||
.pause(client.globals.visibleTimeout || 5000)
|
||||
.clearValue(".download-url-input")
|
||||
.setValue(".download-url-input", client.globals.specPath)
|
||||
.click("button.download-url-button")
|
||||
@@ -19,13 +19,13 @@ describe("render informationContainer", function () {
|
||||
})
|
||||
|
||||
it("renders section", function (client) {
|
||||
mainPage.expect.section("@informationContainer").to.be.visible.before(5000)
|
||||
mainPage.expect.section("@informationContainer").to.be.visible.before(client.globals.visibleTimeout || 5000)
|
||||
|
||||
client.end()
|
||||
})
|
||||
|
||||
it("renders content", function (client) {
|
||||
informationContainer.waitForElementVisible("@title", 5000)
|
||||
informationContainer.waitForElementVisible("@title", client.globals.visibleTimeout || 5000)
|
||||
.assert.containsText("@title", "Swagger Petstore")
|
||||
.assert.containsText("@version", "1.0.0")
|
||||
.assert.containsText("@baseAppUrl", "[ Base URL: localhost:3204/ ]")
|
||||
|
||||
@@ -5,8 +5,8 @@ describe("Render Model Wrapper", function () {
|
||||
mainPage = client
|
||||
.url(client.globals.baseAppUrl)
|
||||
.page.main()
|
||||
client.waitForElementVisible(".download-url-input", 5000)
|
||||
.pause(5000)
|
||||
client.waitForElementVisible(".download-url-input", client.globals.visibleTimeout || 5000)
|
||||
.pause(client.globals.visibleTimeout || 5000)
|
||||
.clearValue(".download-url-input")
|
||||
.setValue(".download-url-input", client.globals.specPath)
|
||||
.click("button.download-url-button")
|
||||
@@ -20,13 +20,13 @@ describe("Render Model Wrapper", function () {
|
||||
done()
|
||||
})
|
||||
it("Render model wrapper", function(client){
|
||||
mainPage.expect.section("@modelWrapper").to.be.visible.before(5000)
|
||||
mainPage.expect.section("@modelWrapper").to.be.visible.before(client.globals.visibleTimeout || 5000)
|
||||
|
||||
client.end()
|
||||
})
|
||||
|
||||
it("Render model wrapper collapse", function(client){
|
||||
modelWrapper.waitForElementVisible("@modelContainer", 5000)
|
||||
modelWrapper.waitForElementVisible("@modelContainer", client.globals.visibleTimeout || 5000)
|
||||
.click("@modelCollapse")
|
||||
.assert.cssClassNotPresent("@modelContainer", "is-open")
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ describe("render pet api container", function () {
|
||||
.url(client.globals.baseAppUrl)
|
||||
.page.main()
|
||||
|
||||
client.waitForElementVisible(".download-url-input", 5000)
|
||||
.pause(5000)
|
||||
client.waitForElementVisible(".download-url-input", client.globals.visibleTimeout || 5000)
|
||||
.pause(client.globals.visibleTimeout || 5000)
|
||||
.clearValue(".download-url-input")
|
||||
.setValue(".download-url-input", client.globals.specPath)
|
||||
.click("button.download-url-button")
|
||||
@@ -25,13 +25,13 @@ describe("render pet api container", function () {
|
||||
client.end()
|
||||
})
|
||||
it("test rendered pet container", function (client) {
|
||||
apiWrapper.waitForElementVisible("@petAPIWrapper", 5000)
|
||||
apiWrapper.waitForElementVisible("@petAPIWrapper", client.globals.visibleTimeout || 5000)
|
||||
.expect.element("@petAPIWrapper").to.be.visible
|
||||
|
||||
client.end()
|
||||
})
|
||||
it("collapse pet wrapper", function (client) {
|
||||
apiWrapper.waitForElementVisible("@petAPIWrapper", 5000)
|
||||
apiWrapper.waitForElementVisible("@petAPIWrapper", client.globals.visibleTimeout || 5000)
|
||||
.click("@petAPIWrapperBar")
|
||||
.assert.cssClassNotPresent("@petAPIWrapper", "is-open")
|
||||
|
||||
@@ -41,7 +41,7 @@ describe("render pet api container", function () {
|
||||
apiWrapper.waitForElementVisible("@petOperationPostContainer", 10000)
|
||||
.assert.containsText("@petOperationPostTitle", "/pet")
|
||||
.click("@petOperationPostCollpase")
|
||||
.waitForElementVisible("@petOperationPostCollapseContainer", 5000)
|
||||
.waitForElementVisible("@petOperationPostCollapseContainer", client.globals.visibleTimeout || 5000)
|
||||
.click("@petOperationPostTryBtn")
|
||||
.waitForElementVisible("@petOperationPostTryText", 1000)
|
||||
.waitForElementVisible("@petOperationPostExecuteBtn", 1000)
|
||||
@@ -52,9 +52,9 @@ describe("render pet api container", function () {
|
||||
})
|
||||
|
||||
it("Testing post /pet api Mock data", function (client) {
|
||||
apiWrapper.waitForElementVisible("@petOperationPostContainer", 5000)
|
||||
apiWrapper.waitForElementVisible("@petOperationPostContainer", client.globals.visibleTimeout || 5000)
|
||||
.click("@petOperationPostCollpase")
|
||||
.waitForElementVisible("@petOperationPostCollapseContainer", 5000)
|
||||
.waitForElementVisible("@petOperationPostCollapseContainer", client.globals.visibleTimeout || 5000)
|
||||
.click("@petOperationPostTryBtn")
|
||||
.waitForElementVisible("@petOperationPostExecuteBtn", 1000)
|
||||
.click("@petOperationPostExecuteBtn")
|
||||
@@ -72,7 +72,7 @@ describe("render pet api container", function () {
|
||||
})
|
||||
|
||||
it("render put /pet api container", function (client) {
|
||||
apiWrapper.waitForElementVisible("@petOperationPutContainer", 5000)
|
||||
apiWrapper.waitForElementVisible("@petOperationPutContainer", client.globals.visibleTimeout || 5000)
|
||||
.assert.containsText("@petOperationPutTitle", "/pet")
|
||||
.click("@petOperationPutCollpase")
|
||||
.waitForElementVisible("@petOperationPutCollapseContainer", 3000)
|
||||
@@ -86,7 +86,7 @@ describe("render pet api container", function () {
|
||||
})
|
||||
|
||||
it("Testing put /pet api Mock data", function (client) {
|
||||
apiWrapper.waitForElementVisible("@petOperationPutContainer", 5000)
|
||||
apiWrapper.waitForElementVisible("@petOperationPutContainer", client.globals.visibleTimeout || 5000)
|
||||
.click("@petOperationPutCollpase")
|
||||
.waitForElementVisible("@petOperationPutCollapseContainer", 3000)
|
||||
.click("@petOperationPutTryBtn")
|
||||
@@ -106,7 +106,7 @@ describe("render pet api container", function () {
|
||||
})
|
||||
|
||||
it("render get by tag /pet api container", function (client) {
|
||||
apiWrapper.waitForElementVisible("@petOperationGetByTagContainer", 5000)
|
||||
apiWrapper.waitForElementVisible("@petOperationGetByTagContainer", client.globals.visibleTimeout || 5000)
|
||||
.assert.containsText("@petOperationGetByTagTitle", "/pet/findByTags")
|
||||
.click("@petOperationGetByTagCollpase")
|
||||
.waitForElementVisible("@petOperationGetByTagCollapseContainer", 3000)
|
||||
@@ -120,7 +120,7 @@ describe("render pet api container", function () {
|
||||
})
|
||||
|
||||
it("Testing get by tag /pet api Mock data", function (client) {
|
||||
apiWrapper.waitForElementVisible("@petOperationGetByTagContainer", 5000)
|
||||
apiWrapper.waitForElementVisible("@petOperationGetByTagContainer", client.globals.visibleTimeout || 5000)
|
||||
.click("@petOperationGetByTagCollpase")
|
||||
.waitForElementVisible("@petOperationGetByTagCollapseContainer", 3000)
|
||||
.click("@petOperationGetByTagTryBtn")
|
||||
@@ -140,7 +140,7 @@ describe("render pet api container", function () {
|
||||
})
|
||||
|
||||
it("render get by ID /pet/{petId} api container", function (client) {
|
||||
apiWrapper.waitForElementVisible("@petOperationGetByIdContainer", 5000)
|
||||
apiWrapper.waitForElementVisible("@petOperationGetByIdContainer", client.globals.visibleTimeout || 5000)
|
||||
.assert.containsText("@petOperationGetByIdTitle", "/pet/{petId}")
|
||||
.click("@petOperationGetByIdCollpase")
|
||||
.waitForElementVisible("@petOperationGetByIdCollapseContainer", 3000)
|
||||
@@ -153,7 +153,7 @@ describe("render pet api container", function () {
|
||||
})
|
||||
|
||||
it("render get by ID /pet/{petId} api Mock data", function (client) {
|
||||
apiWrapper.waitForElementVisible("@petOperationGetByIdContainer", 5000)
|
||||
apiWrapper.waitForElementVisible("@petOperationGetByIdContainer", client.globals.visibleTimeout || 5000)
|
||||
.assert.containsText("@petOperationGetByIdTitle", "/pet/{petId}")
|
||||
.click("@petOperationGetByIdCollpase")
|
||||
.waitForElementVisible("@petOperationGetByIdCollapseContainer", 3000)
|
||||
|
||||
@@ -6,7 +6,7 @@ describe("render store api container", function(){
|
||||
.url(client.globals.baseAppUrl)
|
||||
.page.main()
|
||||
|
||||
client.waitForElementVisible(".download-url-input", 5000)
|
||||
client.waitForElementVisible(".download-url-input", client.globals.visibleTimeout || 5000)
|
||||
.pause(3000)
|
||||
.clearValue(".download-url-input")
|
||||
.setValue(".download-url-input", client.globals.specPath)
|
||||
@@ -21,23 +21,23 @@ describe("render store api container", function(){
|
||||
done()
|
||||
})
|
||||
it("test rendered store container", function(client){
|
||||
apiWrapper.waitForElementVisible("@storeAPIWrapper", 5000)
|
||||
apiWrapper.waitForElementVisible("@storeAPIWrapper", client.globals.visibleTimeout || 5000)
|
||||
.expect.element("@storeAPIWrapper").to.be.visible
|
||||
|
||||
client.end()
|
||||
})
|
||||
it("callapse store wrapper", function(client){
|
||||
apiWrapper.waitForElementVisible("@storeAPIWrapper", 5000)
|
||||
apiWrapper.waitForElementVisible("@storeAPIWrapper", client.globals.visibleTimeout || 5000)
|
||||
.click("@storeAPIWrapperBar")
|
||||
.assert.cssClassNotPresent("@storeAPIWrapper", "is-open")
|
||||
|
||||
client.end()
|
||||
})
|
||||
it("render get /store/inventory api container", function (client) {
|
||||
apiWrapper.waitForElementVisible("@storeOperationGetContainer", 5000)
|
||||
apiWrapper.waitForElementVisible("@storeOperationGetContainer", client.globals.visibleTimeout || 5000)
|
||||
.assert.containsText("@storeOperationGetTitle", "/store/inventory")
|
||||
.click("@storeOperationGetCollpase")
|
||||
.waitForElementVisible("@storeOperationGetCollapseContainer", 5000)
|
||||
.waitForElementVisible("@storeOperationGetCollapseContainer", client.globals.visibleTimeout || 5000)
|
||||
.click("@storeOperationGetTryBtn")
|
||||
.waitForElementVisible("@storeOperationGetExecuteBtn", 1000)
|
||||
.click("@storeOperationGetTryBtn")
|
||||
@@ -47,7 +47,7 @@ describe("render store api container", function(){
|
||||
})
|
||||
|
||||
it("Testing get /store/inventory api Mock data ", function (client) {
|
||||
apiWrapper.waitForElementVisible("@storeOperationGetContainer", 5000)
|
||||
apiWrapper.waitForElementVisible("@storeOperationGetContainer", client.globals.visibleTimeout || 5000)
|
||||
.assert.containsText("@storeOperationGetTitle", "/store/inventory")
|
||||
.click("@storeOperationGetCollpase")
|
||||
.waitForElementVisible("@storeOperationGetCollapseContainer", 3000)
|
||||
|
||||
@@ -6,8 +6,8 @@ describe("render user api container", function(){
|
||||
.url(client.globals.baseAppUrl)
|
||||
.page.main()
|
||||
|
||||
client.waitForElementVisible(".download-url-input", 5000)
|
||||
.pause(5000)
|
||||
client.waitForElementVisible(".download-url-input", client.globals.visibleTimeout || 5000)
|
||||
.pause(client.globals.visibleTimeout || 5000)
|
||||
.clearValue(".download-url-input")
|
||||
.setValue(".download-url-input", client.globals.specPath)
|
||||
.click("button.download-url-button")
|
||||
@@ -21,20 +21,20 @@ describe("render user api container", function(){
|
||||
done()
|
||||
})
|
||||
it("test rendered user container", function(client){
|
||||
apiWrapper.waitForElementVisible("@userAPIWrapper", 5000)
|
||||
apiWrapper.waitForElementVisible("@userAPIWrapper", client.globals.visibleTimeout || 5000)
|
||||
.expect.element("@userAPIWrapper").to.be.visible
|
||||
|
||||
client.end()
|
||||
})
|
||||
it("callapse user wrapper", function(client){
|
||||
apiWrapper.waitForElementVisible("@userAPIWrapper", 5000)
|
||||
apiWrapper.waitForElementVisible("@userAPIWrapper", client.globals.visibleTimeout || 5000)
|
||||
.click("@userAPIWrapperBar")
|
||||
.assert.cssClassNotPresent("@userAPIWrapper", "is-open")
|
||||
|
||||
client.end()
|
||||
})
|
||||
it("render put /user/{username} api container", function (client) {
|
||||
apiWrapper.waitForElementVisible("@userOperationPutContainer", 5000)
|
||||
apiWrapper.waitForElementVisible("@userOperationPutContainer", client.globals.visibleTimeout || 5000)
|
||||
.assert.containsText("@userOperationPutTitle", "/user/{username}")
|
||||
.click("@userOperationPutCollpase")
|
||||
.waitForElementVisible("@userOperationPutCollapseContainer", 3000)
|
||||
@@ -46,7 +46,7 @@ describe("render user api container", function(){
|
||||
client.end()
|
||||
})
|
||||
it("Test put /user/{username} api Mock data", function (client) {
|
||||
apiWrapper.waitForElementVisible("@userOperationPutContainer", 5000)
|
||||
apiWrapper.waitForElementVisible("@userOperationPutContainer", client.globals.visibleTimeout || 5000)
|
||||
.assert.containsText("@userOperationPutTitle", "/user/{username}")
|
||||
.click("@userOperationPutCollpase")
|
||||
.waitForElementVisible("@userOperationPutCollapseContainer", 3000)
|
||||
@@ -63,7 +63,7 @@ describe("render user api container", function(){
|
||||
client.end()
|
||||
})
|
||||
it("render delete /user/{username} api container", function (client) {
|
||||
apiWrapper.waitForElementVisible("@userOperationDeleteContainer", 5000)
|
||||
apiWrapper.waitForElementVisible("@userOperationDeleteContainer", client.globals.visibleTimeout || 5000)
|
||||
.assert.containsText("@userOperationDeleteTitle", "/user/{username}")
|
||||
.click("@userOperationDeleteCollpase")
|
||||
.waitForElementVisible("@userOperationDeleteCollapseContainer", 3000)
|
||||
@@ -75,7 +75,7 @@ describe("render user api container", function(){
|
||||
client.end()
|
||||
})
|
||||
it("Test delete /user/{username} api Mock data", function (client) {
|
||||
apiWrapper.waitForElementVisible("@userOperationDeleteContainer", 5000)
|
||||
apiWrapper.waitForElementVisible("@userOperationDeleteContainer", client.globals.visibleTimeout || 5000)
|
||||
.assert.containsText("@userOperationDeleteTitle", "/user/{username}")
|
||||
.click("@userOperationDeleteCollpase")
|
||||
.waitForElementVisible("@userOperationDeleteCollapseContainer", 3000)
|
||||
|
||||
@@ -9,8 +9,8 @@ describe("Render scheme", function () {
|
||||
|
||||
schemeContainer = mainPage.section.schemeContainer
|
||||
|
||||
client.waitForElementVisible(".download-url-input", 5000)
|
||||
.pause(5000)
|
||||
client.waitForElementVisible(".download-url-input", client.globals.visibleTimeout || 5000)
|
||||
.pause(client.globals.visibleTimeout || 5000)
|
||||
.clearValue(".download-url-input")
|
||||
.setValue(".download-url-input", client.globals.specPath)
|
||||
.click("button.download-url-button")
|
||||
@@ -21,25 +21,25 @@ describe("Render scheme", function () {
|
||||
})
|
||||
|
||||
it("render section", function (client) {
|
||||
mainPage.expect.section("@schemeContainer").to.be.visible.before(5000)
|
||||
mainPage.expect.section("@schemeContainer").to.be.visible.before(client.globals.visibleTimeout || 5000)
|
||||
|
||||
client.end()
|
||||
})
|
||||
it("render scheme option", function (client) {
|
||||
schemeContainer.waitForElementVisible("@httpOption", 5000)
|
||||
schemeContainer.waitForElementVisible("@httpOption", client.globals.visibleTimeout || 5000)
|
||||
.expect.element("@httpOption").to.be.selected
|
||||
|
||||
client.end()
|
||||
})
|
||||
|
||||
it("render authorized button", function (client) {
|
||||
schemeContainer.waitForElementVisible("@btnAuthorize", 5000)
|
||||
schemeContainer.waitForElementVisible("@btnAuthorize", client.globals.visibleTimeout || 5000)
|
||||
.expect.element("@btnAuthorize").to.be.visible
|
||||
|
||||
client.end()
|
||||
})
|
||||
it("render click event", function(client) {
|
||||
schemeContainer.waitForElementVisible("@btnAuthorize", 5000)
|
||||
schemeContainer.waitForElementVisible("@btnAuthorize", client.globals.visibleTimeout || 5000)
|
||||
.click("@btnAuthorize")
|
||||
.assert.visible("@authorizationModal")
|
||||
.assert.containsText("@appName", "Application: your-app-name")
|
||||
|
||||
@@ -24,7 +24,7 @@ describe("initial render", function () {
|
||||
topbar = mainPage.section.topbar
|
||||
|
||||
client.waitForElementVisible(".download-url-input", 10000)
|
||||
.pause(5000)
|
||||
.pause(client.globals.visibleTimeout || 5000)
|
||||
.clearValue(".download-url-input")
|
||||
.setValue(".download-url-input", client.globals.specPath)
|
||||
.click("button.download-url-button")
|
||||
|
||||
Reference in New Issue
Block a user