@@ -15,6 +15,7 @@ import {
1515 mockCatalogSourceList ,
1616} from '@odh-dashboard/model-registry/mocks/mockCatalogSourceList' ;
1717import type { ModelCatalogSource } from '@odh-dashboard/internal/concepts/modelCatalog/types' ;
18+ import { mockConnectionTypeConfigMap } from '@odh-dashboard/internal/__mocks__/mockConnectionType' ;
1819import { modelDetailsPage } from '../../../pages/modelCatalog/modelDetailsPage' ;
1920import { modelServingWizard } from '../../../pages/modelServing' ;
2021import { 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
129146describe ( '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