From add5753da4e139223cee540701cca4220eb48252 Mon Sep 17 00:00:00 2001 From: Tim Lai Date: Wed, 27 May 2020 15:45:23 -0700 Subject: [PATCH] test: improve reliability of /bugs/4641 (#6013) Ref #6001 --- test/e2e-cypress/tests/bugs/4641.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/e2e-cypress/tests/bugs/4641.js b/test/e2e-cypress/tests/bugs/4641.js index a9b9537c..bf436ec4 100644 --- a/test/e2e-cypress/tests/bugs/4641.js +++ b/test/e2e-cypress/tests/bugs/4641.js @@ -48,8 +48,8 @@ describe("#4641: The Logout button in Authorize popup not clearing API Key", () .within(clickTryItOutAndExecute) .get("@request") .its("request") - .should(request => { - expect(request.headers).to.have.property("api_key_1", "my_api_key") + .then((req) => { + expect(req.headers, "request headers").to.have.property("api_key_1", "my_api_key") }) }) @@ -68,8 +68,8 @@ describe("#4641: The Logout button in Authorize popup not clearing API Key", () .within(clickTryItOutAndExecute) .get("@request") .its("request") - .should(request => { - expect(request.headers).not.to.have.property("api_key_1") + .then((req) => { + expect(req.headers, "request headers").not.to.have.property("api_key_1") }) }) @@ -90,9 +90,9 @@ describe("#4641: The Logout button in Authorize popup not clearing API Key", () .within(clickTryItOutAndExecute) .get("@request") .its("request") - .should(request => { - expect(request.headers).not.to.have.property("api_key_1") - expect(request.headers).to.have.property("api_key_2", "my_second_api_key") + .then((req) => { + expect(req.headers, "request headers").not.to.have.property("api_key_1") + expect(req.headers, "request headers").to.have.property("api_key_2", "my_second_api_key") }) }) })