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 <5322142+gitdallas@users.noreply.github.com>
  • Loading branch information
gitdallas authored and ConorOM1 committed Dec 12, 2024
1 parent 939bcb1 commit f7852e2
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 f7852e2

Please sign in to comment.