@@ -73,23 +73,16 @@ export const fillAndSubmitMlflowIrisRun = (
7373} ;
7474
7575const openPipelineDetails = ( pipelineName : string ) : void => {
76- pipelineDetails . findPageTitle ( MLFLOW_UI_TIMEOUT_MS ) . should ( ( $title ) => {
76+ const pageTitle = pipelineDetails . findPageTitle ( MLFLOW_UI_TIMEOUT_MS ) ;
77+ pageTitle . should ( 'not.have.text' , '' ) ;
78+ pageTitle . then ( ( $title ) => {
7779 if ( $title . text ( ) . trim ( ) === pipelineName ) {
7880 return ;
7981 }
80- expect (
81- $title
82- . closest ( 'body' )
83- . find ( '[data-testid="pipelines-table"] a' )
84- . filter ( ( _ , el ) => ( el . textContent || '' ) . trim ( ) === pipelineName ) . length ,
85- `pipelines-table link for ${ pipelineName } ` ,
86- ) . to . be . greaterThan ( 0 ) ;
87- } ) ;
88- pipelineDetails . findPageTitle ( ) . then ( ( $title ) => {
89- if ( $title . text ( ) . trim ( ) === pipelineName ) {
90- return ;
91- }
92- pipelinesTable . findPipelineLinkByName ( pipelineName , MLFLOW_UI_TIMEOUT_MS ) . click ( ) ;
82+ pipelinesTable
83+ . findPipelineLinkByName ( pipelineName , MLFLOW_UI_TIMEOUT_MS )
84+ . should ( 'exist' )
85+ . click ( ) ;
9386 } ) ;
9487 pipelineDetails . findPageTitle ( MLFLOW_UI_TIMEOUT_MS ) . should ( 'have.text' , pipelineName ) ;
9588} ;
@@ -100,7 +93,7 @@ export const importMlflowPipelineFromFile = (
10093 description : string ,
10194 yamlPath : string ,
10295) : void => {
103- pipelinesGlobal . findImportPipelineButton ( ) . click ( ) ;
96+ pipelinesGlobal . findImportPipelineButton ( MLFLOW_UI_TIMEOUT_MS ) . click ( ) ;
10497 pipelineImportModal . findPipelineNameInput ( ) . type ( name ) ;
10598 pipelineImportModal . findPipelineDescriptionInput ( ) . type ( description ) ;
10699 pipelineImportModal . findUploadPipelineRadio ( ) . click ( ) ;
@@ -131,15 +124,16 @@ export const createMlflowRunFromPipelineDetails = (
131124 * run's Argo workflow via oc until Succeeded.
132125 */
133126export const waitForMlflowRunSucceeded = ( projectName : string , timeout : number ) : void => {
134- cy . location ( 'pathname' , { timeout : MLFLOW_UI_TIMEOUT_MS } ) . should ( ( pathname ) => {
135- const runId = pathname . split ( '/' ) . filter ( Boolean ) . pop ( ) ?? '' ;
136- expect ( runId , `run details URL, got ${ pathname } ` ) . to . not . eq ( 'create' ) ;
137- expect ( runId . length , `run details URL, got ${ pathname } ` ) . to . be . greaterThan ( 0 ) ;
138- } ) ;
139- cy . location ( 'pathname' ) . then ( ( pathname ) => {
140- const runId = pathname . split ( '/' ) . filter ( Boolean ) . pop ( ) ?? '' ;
141- waitForKfpRunSucceeded ( projectName , runId , timeout ) ;
142- } ) ;
127+ cy . location ( 'pathname' , { timeout : MLFLOW_UI_TIMEOUT_MS } )
128+ . should ( ( pathname ) => {
129+ const runId = pathname . split ( '/' ) . filter ( Boolean ) . pop ( ) ?? '' ;
130+ expect ( runId , `run details URL, got ${ pathname } ` ) . to . not . eq ( 'create' ) ;
131+ expect ( runId . length , `run details URL, got ${ pathname } ` ) . to . be . greaterThan ( 0 ) ;
132+ } )
133+ . then ( ( pathname ) => {
134+ const runId = pathname . split ( '/' ) . filter ( Boolean ) . pop ( ) ?? '' ;
135+ waitForKfpRunSucceeded ( projectName , runId , timeout ) ;
136+ } ) ;
143137} ;
144138
145139/** Assert that submitting the compare-runs action redirected to the MLflow compare-runs page. */
0 commit comments