@@ -36,7 +36,7 @@ describe('A model can be stopped and started', () => {
3636 throw new Error ( 'Project name is undefined or empty in the loaded fixture' ) ;
3737 }
3838 cy . log ( `Loaded project name: ${ projectName } ` ) ;
39- // Create a Project for pipelines
39+ // Create a Project
4040 provisionProjectForModelServing (
4141 projectName ,
4242 awsBucket ,
@@ -47,7 +47,7 @@ describe('A model can be stopped and started', () => {
4747 } ) ;
4848
4949 after ( ( ) => {
50- // Delete provisioned Project
50+ // Delete the Project
5151 deleteOpenShiftProject ( projectName , { wait : false , ignoreNotFound : true } ) ;
5252 } ) ;
5353
@@ -58,7 +58,6 @@ describe('A model can be stopped and started', () => {
5858 } ,
5959 ( ) => {
6060 cy . log ( 'Model Name:' , modelName ) ;
61- // Authentication and navigation
6261 cy . step ( `Log into the application with ${ HTPASSWD_CLUSTER_ADMIN_USER . USERNAME } ` ) ;
6362 cy . visitWithLogin ( '/' , HTPASSWD_CLUSTER_ADMIN_USER ) ;
6463
@@ -68,14 +67,13 @@ describe('A model can be stopped and started', () => {
6867 projectListPage . filterProjectByName ( projectName ) ;
6968 projectListPage . findProjectLink ( projectName ) . click ( ) ;
7069
71- // Navigate to Model Serving tab and Deploy a Model
72- cy . step ( 'Navigate to Model Serving and click to Deploy a Model Server ' ) ;
70+ // Navigate to Model Serving section and Deploy a Model
71+ cy . step ( 'Navigate to Model Serving and click to Deploy a Model' ) ;
7372 projectDetails . findSectionTab ( 'model-server' ) . click ( ) ;
7473 modelServingGlobal . findSingleServingModelButton ( ) . click ( ) ;
7574 modelServingGlobal . findDeployModelButton ( ) . click ( ) ;
7675
77- // Launch a Single Serving Model and select the required entries
78- cy . step ( 'Launch a Single Serving Model using Openvino' ) ;
76+ cy . step ( 'Launch a Model' ) ;
7977 inferenceServiceModal . findModelNameInput ( ) . type ( testData . singleModelName ) ;
8078 inferenceServiceModal . findServingRuntimeTemplateSearchSelector ( ) . click ( ) ;
8179 inferenceServiceModal . findGlobalScopedTemplateOption ( 'OpenVINO Model Server' ) . click ( ) ;
@@ -86,18 +84,14 @@ describe('A model can be stopped and started', () => {
8684 inferenceServiceModal . shouldBeOpen ( false ) ;
8785 modelServingSection . findModelServerName ( testData . singleModelName ) ;
8886
89- //Verify the model created
90- cy . step ( 'Verify that the Model is created Successfully on the backend and frontend ' ) ;
87+ //Verify the model created and is running
88+ cy . step ( 'Verify that the Model is running ' ) ;
9189 checkInferenceServiceState ( testData . singleModelName , projectName , {
9290 checkReady : true ,
9391 checkLatestDeploymentReady : true ,
9492 } ) ;
95- modelServingSection . findModelServerName ( testData . singleModelName ) ;
96-
97- cy . reload ( ) ;
98- modelServingSection . findStatusTooltip ( ) . click ( { force : true } ) ;
99- cy . contains ( 'Loaded' , { timeout : 120000 } ) . should ( 'be.visible' ) ;
10093
94+ //Stop the model with the modal
10195 cy . step ( 'Stop the model' ) ;
10296 const kServeRow = modelServingSection . getKServeRow ( testData . singleModelName ) ;
10397 kServeRow . findStateActionToggle ( ) . should ( 'have.text' , 'Stop' ) . click ( ) ;
@@ -108,17 +102,19 @@ describe('A model can be stopped and started', () => {
108102 kServeRow . findConfirmStopModalCheckbox ( ) . should ( 'be.checked' ) ;
109103 kServeRow . findConfirmStopModalButton ( ) . click ( ) ;
110104
111- modelServingSection . findStatusTooltip ( ) . click ( { force : true } ) ;
112- cy . contains ( 'Unknown' , { timeout : 120000 } ) . should ( 'be.visible' ) ;
105+ //Verify the model is stopped
113106 checkInferenceServiceState ( testData . singleModelName , projectName , {
114107 checkReady : false ,
115108 checkLatestDeploymentReady : false ,
109+ checkStopped : true ,
110+ requireLoadedState : false ,
116111 } ) ;
117112
118- cy . step ( 'Start the model' ) ;
113+ //Restart the model
114+ cy . step ( 'Restart the model' ) ;
119115 kServeRow . findStateActionToggle ( ) . should ( 'have.text' , 'Start' ) . click ( ) ;
120- modelServingSection . findStatusTooltip ( ) . click ( { force : true } ) ;
121- cy . contains ( 'Loaded' , { timeout : 120000 } ) . should ( 'be.visible' ) ;
116+
117+ //Verify the model is running again
122118 checkInferenceServiceState ( testData . singleModelName , projectName , {
123119 checkReady : true ,
124120 checkLatestDeploymentReady : true ,
0 commit comments