From ad039aab6712e311e13ec6543948a62f456fc659 Mon Sep 17 00:00:00 2001 From: Gabe Lyons Date: Wed, 16 Mar 2022 10:37:32 -0700 Subject: [PATCH] tests(cypress): reduce cypress flakiness by retrying login on failure (#4423) * query for custom properties on containers * retry login in cypress * syntax fix --- smoke-test/tests/cypress/cypress/support/commands.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/smoke-test/tests/cypress/cypress/support/commands.js b/smoke-test/tests/cypress/cypress/support/commands.js index 74b071682c3f0..decdb243e6516 100644 --- a/smoke-test/tests/cypress/cypress/support/commands.js +++ b/smoke-test/tests/cypress/cypress/support/commands.js @@ -11,10 +11,15 @@ // // -- This is a parent command -- Cypress.Commands.add('login', () => { - cy.request('POST', '/logIn', { + cy.request({ + method: 'POST', + url: '/logIn', + body: { username: 'datahub', password: 'datahub', - }) + }, + retryOnStatusCodeFailure: true, + }); }) Cypress.Commands.add('deleteUrn', (urn) => {