Skip to content

Commit 890d103

Browse files
committed
test flake fix
1 parent 6246045 commit 890d103

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

packages/cypress/cypress/tests/mocked/modelCatalog/modelCatalogDeploy.cy.ts

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
mockCatalogSourceList,
1616
} from '@odh-dashboard/model-registry/mocks/mockCatalogSourceList';
1717
import type { ModelCatalogSource } from '@odh-dashboard/internal/concepts/modelCatalog/types';
18+
import { mockConnectionTypeConfigMap } from '@odh-dashboard/internal/__mocks__/mockConnectionType';
1819
import { modelDetailsPage } from '../../../pages/modelCatalog/modelDetailsPage';
1920
import { modelServingWizard } from '../../../pages/modelServing';
2021
import { initDeployPrefilledModelIntercepts } from '../../../utils/modelServingUtils';
@@ -124,6 +125,22 @@ const initIntercepts = ({
124125
}),
125126
},
126127
).as('loadArtifacts');
128+
cy.interceptOdh('GET /api/connection-types', [
129+
mockConnectionTypeConfigMap({
130+
displayName: 'URI - v1',
131+
name: 'uri-v1',
132+
category: ['existing-category'],
133+
fields: [
134+
{
135+
type: 'uri',
136+
name: 'URI',
137+
envVar: 'URI',
138+
required: true,
139+
properties: {},
140+
},
141+
],
142+
}),
143+
]).as('getConnectionTypes');
127144
};
128145

129146
describe('Deploy catalog model', () => {
@@ -158,10 +175,13 @@ describe('Deploy catalog model', () => {
158175
modelDetailsPage.visit();
159176

160177
cy.wait('@loadModel');
178+
cy.wait('@getConnectionTypes');
161179
cy.wait('@loadArtifacts');
162180
modelDetailsPage.findDeployModelButton().should('be.enabled');
163-
modelDetailsPage.findDeployModelButton().should('not.have.attr', 'aria-disabled', 'true');
164-
modelDetailsPage.findDeployModelButton().click();
181+
modelDetailsPage
182+
.findDeployModelButton()
183+
.should('not.have.attr', 'aria-disabled', 'true')
184+
.click();
165185
modelServingWizard.findPrefillAlert().should('exist');
166186
modelServingWizard.findModelSourceStep().should('be.enabled');
167187
modelServingWizard.findModelDeploymentStep().should('be.enabled');

0 commit comments

Comments
 (0)