From 09ad34435ccf67dc13971e6594c4508743024e8e Mon Sep 17 00:00:00 2001 From: Conor O'Malley Date: Thu, 12 Dec 2024 17:23:51 +0000 Subject: [PATCH] linters addressed --- .../testLaunchStandaloneNotebook.cy.ts | 4 ++-- .../cypress/utils/oc_commands/baseCommands.ts | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/frontend/src/__tests__/cypress/cypress/tests/e2e/dataScienceProjects/testLaunchStandaloneNotebook.cy.ts b/frontend/src/__tests__/cypress/cypress/tests/e2e/dataScienceProjects/testLaunchStandaloneNotebook.cy.ts index 34642d1d37..995035683c 100644 --- a/frontend/src/__tests__/cypress/cypress/tests/e2e/dataScienceProjects/testLaunchStandaloneNotebook.cy.ts +++ b/frontend/src/__tests__/cypress/cypress/tests/e2e/dataScienceProjects/testLaunchStandaloneNotebook.cy.ts @@ -54,10 +54,10 @@ describe('Verify a Jupyter Notebook can be launched directly from the Data Scien // Verify that the server is running cy.step('Verify the Jupyter Notebook pod is ready'); waitForPodReady('jupyter-nb', '300s'); - + // Expand the log cy.step('Expand the Event log'); - notebookServer.findEventlog().should('be.visible').click(); + notebookServer.findEventlog().should('be.visible').click(); // Wait for the success alert cy.step('Waits for the Success alert'); diff --git a/frontend/src/__tests__/cypress/cypress/utils/oc_commands/baseCommands.ts b/frontend/src/__tests__/cypress/cypress/utils/oc_commands/baseCommands.ts index 43f4d2c4c2..626d3fbaed 100644 --- a/frontend/src/__tests__/cypress/cypress/utils/oc_commands/baseCommands.ts +++ b/frontend/src/__tests__/cypress/cypress/utils/oc_commands/baseCommands.ts @@ -69,12 +69,14 @@ export const waitForPodReady = ( const ocCommand = `oc get pods ${namespaceFlag} --no-headers | awk '$2 ~ /^${podNameContains}/ {print $1, $2}' | xargs -tn2 oc wait --for=condition=Ready pod --timeout=${timeout} -n`; cy.log(`Executing: ${ocCommand}`); - return cy.exec(ocCommand, { failOnNonZeroExit: false, timeout: 300000 }).then((result: CommandLineResult) => { - if (result.code !== 0) { - throw new Error(`Pod readiness check failed: ${result.stderr}`); - } - cy.log(`Pod is ready: ${result.stdout}`); - }); + return cy + .exec(ocCommand, { failOnNonZeroExit: false, timeout: 300000 }) + .then((result: CommandLineResult) => { + if (result.code !== 0) { + throw new Error(`Pod readiness check failed: ${result.stderr}`); + } + cy.log(`Pod is ready: ${result.stdout}`); + }); }; /**