From d17a81e16a4b7a5c9503f15943dbe4aa8a4ab337 Mon Sep 17 00:00:00 2001 From: Tim Lai Date: Mon, 15 Mar 2021 17:43:33 -0700 Subject: [PATCH] fix(cypress): tweak to ensure an element exists before test (#7074) --- test/e2e-cypress/tests/features/oas3-request-body-required.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/e2e-cypress/tests/features/oas3-request-body-required.js b/test/e2e-cypress/tests/features/oas3-request-body-required.js index d514f587..3d8f20b8 100644 --- a/test/e2e-cypress/tests/features/oas3-request-body-required.js +++ b/test/e2e-cypress/tests/features/oas3-request-body-required.js @@ -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") })