From 75932a4b3a8083124bc109e08f6a7464209363c2 Mon Sep 17 00:00:00 2001 From: Adel Bensaad Date: Mon, 9 Dec 2024 09:26:40 +0000 Subject: [PATCH] debug --- cypress/helpers/startScreen.js | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/cypress/helpers/startScreen.js b/cypress/helpers/startScreen.js index c3b21db8e..a6b26a6c0 100644 --- a/cypress/helpers/startScreen.js +++ b/cypress/helpers/startScreen.js @@ -20,20 +20,17 @@ export const goToStartPage = (skipEval) => { // Hardcoded URL for testing const hardcodedUrl = 'https://test.e2e.dhis2.org/analytics-2.41/api/apps/line-listing/index.html' - cy.task('log', `** Hardcoded URL: ${hardcodedUrl}`) - cy.visit(hardcodedUrl, EXTENDED_TIMEOUT) - .then(() => { - cy.task('log', `***Visited URL: ${hardcodedUrl}`) - logPageState() + cy.visit(hardcodedUrl, EXTENDED_TIMEOUT).then(() => { + cy.log(`Visiting the URL: ${hardcodedUrl}`) + cy.task('log', `Visiting the URL: ${hardcodedUrl}`) + console.log(`Visiting the URL: ${hardcodedUrl}`) + logPageState() - if (!skipEval) { - expectStartScreenToBeVisible() - } - }) - .catch((error) => { - cy.task('log', `Error visiting URL: ${error.message}`) - }) + if (!skipEval) { + expectStartScreenToBeVisible() + } + }) } export const expectStartScreenToBeVisible = () => {