diff --git a/integration-tests/tests/run-analysis-azure.ts b/integration-tests/tests/run-analysis-azure.ts index 726d135348..427e7feb9c 100644 --- a/integration-tests/tests/run-analysis-azure.ts +++ b/integration-tests/tests/run-analysis-azure.ts @@ -54,7 +54,7 @@ const testRunAnalysisAzure = _.flowRight( await waitForNoModal(page); // Navigate to analysis launcher - await click(page, `//*[@title="${notebookName}.ipynb"]`); + await click(page, clickable({ textContains: `${notebookName}.ipynb` })); await dismissInfoNotifications(page); await findText(page, 'PREVIEW (READ-ONLY)'); await waitForNoSpinners(page); diff --git a/integration-tests/tests/run-analysis.js b/integration-tests/tests/run-analysis.js index b09efbcce4..4b7a6860ff 100644 --- a/integration-tests/tests/run-analysis.js +++ b/integration-tests/tests/run-analysis.js @@ -50,7 +50,7 @@ const testRunAnalysisFn = _.flowRight( await waitForNoModal(page); // Navigate to analysis launcher - await click(page, `//*[@title="${notebookName}.ipynb"]`); + await click(page, clickable({ textContains: `${notebookName}.ipynb` })); await dismissInfoNotifications(page); await findText(page, 'PREVIEW (READ-ONLY)'); await waitForNoSpinners(page); diff --git a/integration-tests/tests/run-rstudio.js b/integration-tests/tests/run-rstudio.js index b385b27f22..c5ac6f39b0 100644 --- a/integration-tests/tests/run-rstudio.js +++ b/integration-tests/tests/run-rstudio.js @@ -53,7 +53,7 @@ const testRunRStudioFn = _.flowRight( await waitForNoModal(page); // Navigate to analysis launcher - await click(page, `//*[@title="${rFileName}.Rmd"]`); + await click(page, clickable({ textContains: `${rFileName}.Rmd` })); await dismissInfoNotifications(page); await findText(page, 'PREVIEW (READ-ONLY)'); await waitForNoSpinners(page); diff --git a/src/analysis/Analyses.ts b/src/analysis/Analyses.ts index c2e04baeae..2bff86289c 100644 --- a/src/analysis/Analyses.ts +++ b/src/analysis/Analyses.ts @@ -317,10 +317,10 @@ const AnalysisCard = ({ ] ); + const launchAnalysis = () => Nav.goToPath(analysisLauncherTabName, { namespace, name: workspaceName, analysisName }); // the flex values for columns here correspond to the flex values in the header const artifactName = div( { - onClick: () => Nav.goToPath(analysisLauncherTabName, { namespace, name: workspaceName, analysisName }), title: getFileName(name), role: 'cell', style: { @@ -331,7 +331,7 @@ const AnalysisCard = ({ ...centerColumnFlex, }, }, - [getFileName(name)] + [h(Clickable, { onClick: launchAnalysis }, [getFileName(name)])] ); const toolLogos: Record = {