您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

79 行
2.3 KiB

  1. describe("Render Model Wrapper", function () {
  2. let modelWrapper, mainPage
  3. beforeEach(function (client, done) {
  4. mainPage = client
  5. .url("localhost:3230")
  6. .page.main()
  7. client.waitForElementVisible(".download-url-input:not([disabled])", 5000)
  8. .clearValue(".download-url-input")
  9. .setValue(".download-url-input", "http://localhost:3230/test-specs/petstore.json")
  10. .click("button.download-url-button")
  11. .pause(1000)
  12. modelWrapper = mainPage.section.modelWrapper
  13. done()
  14. })
  15. afterEach(function (client, done) {
  16. done()
  17. })
  18. it("Render model wrapper", function (client) {
  19. mainPage.expect.section("@modelWrapper").to.be.visible.before(5000)
  20. client.end()
  21. })
  22. it("Render model wrapper collapse", function (client) {
  23. modelWrapper.waitForElementVisible("@modelContainer", 5000)
  24. .click("@modelCollapse")
  25. .assert.cssClassNotPresent("@modelContainer", "is-open")
  26. client.end()
  27. })
  28. it("Testing order model", function (client) {
  29. modelWrapper.waitForElementVisible("@orderModel")
  30. .click("@orderModelCallapse")
  31. .assert.cssClassNotPresent("@orderModelCallapse", "callapsed")
  32. client.end()
  33. })
  34. it("Testing category model", function (client) {
  35. modelWrapper.waitForElementVisible("@categoryModel")
  36. .click("@categoryModelCallapse")
  37. .assert.cssClassNotPresent("@categoryModelCallapse", "callapsed")
  38. client.end()
  39. })
  40. it("Testing user model", function (client) {
  41. modelWrapper.waitForElementVisible("@userModel")
  42. .click("@userModelCallapse")
  43. .assert.cssClassNotPresent("@userModelCallapse", "callapsed")
  44. client.end()
  45. })
  46. it("Testing tag model", function (client) {
  47. modelWrapper.waitForElementVisible("@tagModel")
  48. .click("@tagModelCallapse")
  49. .assert.cssClassNotPresent("@tagModelCallapse", "callapsed")
  50. client.end()
  51. })
  52. it("Testing pet model", function (client) {
  53. modelWrapper.waitForElementVisible("@petModel")
  54. .click("@petModelCallapse")
  55. .assert.cssClassNotPresent("@petModelCallapse", "callapsed")
  56. client.end()
  57. })
  58. it("Testing apiResponse model", function (client) {
  59. modelWrapper.waitForElementVisible("@apiResponseModel")
  60. .click("@apiResponseModelCallapse")
  61. .assert.cssClassNotPresent("@apiResponseModelCallapse", "callapsed")
  62. client.end()
  63. })
  64. })