Skip to content

Commit

Permalink
fix(test): add wait in deploy model test (opendatahub-io#3567)
Browse files Browse the repository at this point in the history
Signed-off-by: gitdallas <[email protected]>
  • Loading branch information
gitdallas authored Dec 11, 2024
1 parent 9f2b3d1 commit 60ba3ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ModelVersionDeployModal extends Modal {

selectProjectByName(name: string) {
this.findProjectSelector().click();
this.find().findByRole('option', { name }).click();
this.find().findByRole('option', { name, timeout: 5000 }).click();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const initIntercepts = ({
}),
mockProjectK8sResource({ k8sName: 'test-project', displayName: 'Test project' }),
]),
);
).as('getProjects');

cy.interceptOdh(
`GET /api/service/modelregistry/:serviceName/api/model_registry/:apiVersion/model_versions/:modelVersionId/artifacts`,
Expand Down Expand Up @@ -185,8 +185,10 @@ describe('Deploy model version', () => {
cy.visit(`/modelRegistry/modelregistry-sample/registeredModels/1/versions`);
const modelVersionRow = modelRegistry.getModelVersionRow('test model version');
modelVersionRow.findKebabAction('Deploy').click();
cy.wait('@getProjects');
modelVersionDeployModal.selectProjectByName('Model mesh project');
cy.findByText('Multi-model platform is not installed').should('exist');
cy.wait('@getProjects');
modelVersionDeployModal.selectProjectByName('KServe project');
cy.findByText('Single-model platform is not installed').should('exist');
});
Expand Down

0 comments on commit 60ba3ee

Please sign in to comment.