From 0052d5d340f01fc7c7fcfdbd73d69c8243f33bdb Mon Sep 17 00:00:00 2001 From: Mihajlo Medjedovic Date: Mon, 10 Apr 2023 12:08:01 +0200 Subject: [PATCH] ci: sasjs tests logged in fix --- cypress/integration/sasjs.tests.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cypress/integration/sasjs.tests.ts b/cypress/integration/sasjs.tests.ts index 74fa950..5ce1cc6 100644 --- a/cypress/integration/sasjs.tests.ts +++ b/cypress/integration/sasjs.tests.ts @@ -14,7 +14,10 @@ context('sasjs-tests', function () { it('Should have all tests successfull', (done) => { cy.get('body').then(($body) => { - if ($body.find('input[placeholder="User Name"]').length > 0) { + const startButton = $body.find('.ui.massive.icon.primary.left.labeled.button')[0] + cy.wait(1000) + + if (startButton && !Cypress.dom.isVisible(startButton)) { cy.get('input[placeholder="User Name"]').type(username) cy.get('input[placeholder="Password"]').type(password) cy.get('.submit-button').click() @@ -44,7 +47,10 @@ context('sasjs-tests', function () { it('Should have all tests successfull with debug on', (done) => { cy.get('body').then(($body) => { - if ($body.find('input[placeholder="User Name"]').length > 0) { + const startButton = $body.find('.ui.massive.icon.primary.left.labeled.button')[0] + cy.wait(1000) + + if (startButton && !Cypress.dom.isVisible(startButton)) { cy.get('input[placeholder="User Name"]').type(username) cy.get('input[placeholder="Password"]').type(password) cy.get('.submit-button').click()