fix(cypress): tweak to ensure an element exists before test (#7074)

This commit is contained in:
Tim Lai
2021-03-15 17:43:33 -07:00
committed by GitHub
parent 1291c1e2c7
commit d17a81e16a

View File

@@ -182,6 +182,9 @@ describe("OpenAPI 3.0 Validation for Required Request Body and Request Body Fiel
.select("application/x-www-form-urlencoded")
.get(".opblock-body .opblock-section .opblock-section-request-body .parameters:nth-child(2) > .parameters-col_description input")
.should("not.have.class", "invalid")
// add item to get input, just an extra confirmation of non-invalid class
.get(".opblock-body .opblock-section .opblock-section-request-body .parameters:nth-child(4) > .parameters-col_description button")
.click()
.get(".opblock-body .opblock-section .opblock-section-request-body .parameters:nth-child(4) > .parameters-col_description input")
.should("not.have.class", "invalid")
})