style: fix indent spaces from 4 to 2 in test files (#6163)
This commit is contained in:
@@ -1,93 +1,78 @@
|
||||
describe("render user api container", function(){
|
||||
let mainPage
|
||||
let apiWrapper
|
||||
beforeEach( function(client, done){
|
||||
mainPage = client
|
||||
.url("localhost:3230")
|
||||
.page.main()
|
||||
describe("Render Model Wrapper", function () {
|
||||
let modelWrapper, mainPage
|
||||
|
||||
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)
|
||||
beforeEach(function (client, done) {
|
||||
mainPage = client
|
||||
.url("localhost:3230")
|
||||
.page.main()
|
||||
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)
|
||||
|
||||
apiWrapper = mainPage.section.apiWrapper
|
||||
modelWrapper = mainPage.section.modelWrapper
|
||||
|
||||
done()
|
||||
})
|
||||
afterEach(function (client, done) {
|
||||
done()
|
||||
})
|
||||
it("test rendered user container", function(client){
|
||||
apiWrapper.waitForElementVisible("@userAPIWrapper", 5000)
|
||||
.expect.element("@userAPIWrapper").to.be.visible
|
||||
done()
|
||||
})
|
||||
afterEach(function (client, done) {
|
||||
done()
|
||||
})
|
||||
it("Render model wrapper", function (client) {
|
||||
mainPage.expect.section("@modelWrapper").to.be.visible.before(5000)
|
||||
|
||||
client.end()
|
||||
})
|
||||
it("callapse user wrapper", function(client){
|
||||
apiWrapper.waitForElementVisible("@userAPIWrapper", 5000)
|
||||
.click("@userAPIWrapperBar")
|
||||
.assert.cssClassNotPresent("@userAPIWrapper", "is-open")
|
||||
})
|
||||
|
||||
client.end()
|
||||
})
|
||||
it("render put /user/{username} api container", function (client) {
|
||||
apiWrapper.waitForElementVisible("@userOperationPutContainer", 5000)
|
||||
.assert.containsText("@userOperationPutTitle", "/user/{username}")
|
||||
.click("@userOperationPutCollpase")
|
||||
.waitForElementVisible("@userOperationPutCollapseContainer", 3000)
|
||||
.click("@userOperationPutTryBtn")
|
||||
.waitForElementVisible("@userOperationPutExecuteBtn", 1000)
|
||||
.click("@userOperationPutTryBtn")
|
||||
.assert.cssClassNotPresent("@userOperationPutTryBtn", "cancel")
|
||||
|
||||
client.end()
|
||||
})
|
||||
it("Test put /user/{username} api Mock data", function (client) {
|
||||
apiWrapper.waitForElementVisible("@userOperationPutContainer", 5000)
|
||||
.assert.containsText("@userOperationPutTitle", "/user/{username}")
|
||||
.click("@userOperationPutCollpase")
|
||||
.waitForElementVisible("@userOperationPutCollapseContainer", 3000)
|
||||
.click("@userOperationPutTryBtn")
|
||||
.waitForElementVisible("@userOperationPutParameter")
|
||||
.setValue("@userOperationPutParameter", "123")
|
||||
.waitForElementVisible("@userOperationPutExecuteBtn", 1000)
|
||||
.click("userOperationPutExecuteBtn")
|
||||
.waitForElementVisible("@userOperationPutResponseHeader")
|
||||
.assert.containsText("@userOperationPutResponseHeader", "content-type: application/xml")
|
||||
.click("@userOperationPutTryBtn")
|
||||
.assert.cssClassNotPresent("@userOperationPutTryBtn", "cancel")
|
||||
|
||||
client.end()
|
||||
})
|
||||
it("render delete /user/{username} api container", function (client) {
|
||||
apiWrapper.waitForElementVisible("@userOperationDeleteContainer", 5000)
|
||||
.assert.containsText("@userOperationDeleteTitle", "/user/{username}")
|
||||
.click("@userOperationDeleteCollpase")
|
||||
.waitForElementVisible("@userOperationDeleteCollapseContainer", 3000)
|
||||
.click("@userOperationDeleteTryBtn")
|
||||
.waitForElementVisible("@userOperationDeleteExecuteBtn", 1000)
|
||||
.click("@userOperationDeleteTryBtn")
|
||||
.assert.cssClassNotPresent("@userOperationDeleteTryBtn", "cancel")
|
||||
|
||||
client.end()
|
||||
})
|
||||
it("Test delete /user/{username} api Mock data", function (client) {
|
||||
apiWrapper.waitForElementVisible("@userOperationDeleteContainer", 5000)
|
||||
.assert.containsText("@userOperationDeleteTitle", "/user/{username}")
|
||||
.click("@userOperationDeleteCollpase")
|
||||
.waitForElementVisible("@userOperationDeleteCollapseContainer", 3000)
|
||||
.click("@userOperationDeleteTryBtn")
|
||||
.waitForElementVisible("@userOperationDeleteParameter")
|
||||
.setValue("@userOperationDeleteParameter", "123")
|
||||
.waitForElementVisible("@userOperationDeleteExecuteBtn", 1000)
|
||||
.click("userOperationDeleteExecuteBtn")
|
||||
.waitForElementVisible("@userOperationDeleteResponseHeader")
|
||||
.assert.containsText("@userOperationDeleteResponseHeader", "content-type: application/xml")
|
||||
.click("@userOperationDeleteTryBtn")
|
||||
.assert.cssClassNotPresent("@userOperationDeleteTryBtn", "cancel")
|
||||
|
||||
client.end()
|
||||
})
|
||||
it("Render model wrapper collapse", function (client) {
|
||||
modelWrapper.waitForElementVisible("@modelContainer", 5000)
|
||||
.click("@modelCollapse")
|
||||
.assert.cssClassNotPresent("@modelContainer", "is-open")
|
||||
|
||||
client.end()
|
||||
})
|
||||
|
||||
it("Testing order model", function (client) {
|
||||
modelWrapper.waitForElementVisible("@orderModel")
|
||||
.click("@orderModelCallapse")
|
||||
.assert.cssClassNotPresent("@orderModelCallapse", "callapsed")
|
||||
|
||||
client.end()
|
||||
})
|
||||
|
||||
it("Testing category model", function (client) {
|
||||
modelWrapper.waitForElementVisible("@categoryModel")
|
||||
.click("@categoryModelCallapse")
|
||||
.assert.cssClassNotPresent("@categoryModelCallapse", "callapsed")
|
||||
|
||||
client.end()
|
||||
})
|
||||
it("Testing user model", function (client) {
|
||||
modelWrapper.waitForElementVisible("@userModel")
|
||||
.click("@userModelCallapse")
|
||||
.assert.cssClassNotPresent("@userModelCallapse", "callapsed")
|
||||
|
||||
client.end()
|
||||
})
|
||||
it("Testing tag model", function (client) {
|
||||
modelWrapper.waitForElementVisible("@tagModel")
|
||||
.click("@tagModelCallapse")
|
||||
.assert.cssClassNotPresent("@tagModelCallapse", "callapsed")
|
||||
|
||||
client.end()
|
||||
})
|
||||
it("Testing pet model", function (client) {
|
||||
modelWrapper.waitForElementVisible("@petModel")
|
||||
.click("@petModelCallapse")
|
||||
.assert.cssClassNotPresent("@petModelCallapse", "callapsed")
|
||||
|
||||
client.end()
|
||||
})
|
||||
it("Testing apiResponse model", function (client) {
|
||||
modelWrapper.waitForElementVisible("@apiResponseModel")
|
||||
.click("@apiResponseModelCallapse")
|
||||
.assert.cssClassNotPresent("@apiResponseModelCallapse", "callapsed")
|
||||
|
||||
client.end()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user