Skip to content

Commit cd06056

Browse files
committed
Fix the modelDetailsEditing cypress tests
Signed-off-by: ppadti <ppadti@redhat.com>
1 parent 9ee9e10 commit cd06056

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

packages/cypress/cypress/tests/mocked/modelRegistry/modelDetailsEditing.cy.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
mockDscStatus,
1313
mockK8sResourceList,
1414
mockModelVersionList,
15+
mockModelArtifactList,
1516
} from '@odh-dashboard/internal/__mocks__';
1617
import { mockDsciStatus } from '@odh-dashboard/internal/__mocks__/mockDsciStatus';
1718
import { DataScienceStackComponent } from '@odh-dashboard/internal/concepts/areas/types';
@@ -128,6 +129,30 @@ const initIntercepts = () => {
128129
{ data: mockModelVersionWithLabels },
129130
);
130131

132+
cy.interceptOdh(
133+
`GET /model-registry/api/:apiVersion/model_registry/:modelRegistryName/model_versions/:modelVersionId/artifacts`,
134+
{
135+
path: {
136+
modelRegistryName: 'modelregistry-sample',
137+
apiVersion: MODEL_REGISTRY_API_VERSION,
138+
modelVersionId: 1,
139+
},
140+
},
141+
{ data: mockModelArtifactList({}) },
142+
);
143+
144+
cy.interceptOdh(
145+
`PATCH /model-registry/api/:apiVersion/model_registry/:modelRegistryName/model_versions/:modelVersionId`,
146+
{
147+
path: {
148+
modelRegistryName: 'modelregistry-sample',
149+
apiVersion: MODEL_REGISTRY_API_VERSION,
150+
modelVersionId: 1,
151+
},
152+
},
153+
{ data: mockModelVersionWithLabels },
154+
).as('UpdatePropertyRow');
155+
131156
cy.interceptOdh(
132157
`PATCH /model-registry/api/:apiVersion/model_registry/:modelRegistryName/registered_models/:registeredModelId`,
133158
{

0 commit comments

Comments
 (0)