22 ModelLocationSelectOption ,
33 ModelTypeLabel ,
44 ModelStateLabel ,
5- ModelStateToggleLabel ,
5+ // TODO: Uncomment once Facebook model startup bug is resolved.
6+ // ModelStateToggleLabel,
67} from '@odh-dashboard/model-serving/types/form-data' ;
78import type { DataScienceProjectData } from '../../../../types' ;
89import { deleteOpenShiftProject } from '../../../../utils/oc_commands/project' ;
@@ -19,14 +20,16 @@ import {
1920import {
2021 checkInferenceServiceState ,
2122 provisionProjectForModelServing ,
22- modelExternalTester ,
23+ // TODO: Uncomment once RHOAIENG-56694 is resolved.
24+ // modelExternalTester,
2325} from '../../../../utils/oc_commands/modelServing' ;
2426import {
2527 createCleanHardwareProfile ,
2628 cleanupHardwareProfiles ,
2729} from '../../../../utils/oc_commands/hardwareProfiles' ;
2830import { retryableBefore } from '../../../../utils/retryableHooks' ;
29- import { attemptToClickTooltip } from '../../../../utils/models' ;
31+ // TODO: Uncomment once RHOAIENG-56694 is resolved.
32+ // import { attemptToClickTooltip } from '../../../../utils/models';
3033import { generateTestUUID } from '../../../../utils/uuidGenerator' ;
3134import { MODEL_STATUS_TIMEOUT } from '../../../../support/timeouts' ;
3235
@@ -156,26 +159,30 @@ describe('Verify Admin Single Model Creation and Validation using the UI', () =>
156159 modelServingWizard . findSubmitButton ( ) . click ( ) ;
157160 modelServingSection . findModelServerDeployedName ( modelName ) ;
158161
159- //Verify the model created
160- cy . step ( 'Verify that the Model is created Successfully on the backend and frontend' ) ;
161- // Verify model deployment is ready
162- cy . get < string > ( '@resourceName' ) . then ( ( resourceName ) => {
163- checkInferenceServiceState ( resourceName , projectName , { checkReady : true } ) ;
164- } ) ;
165- // Note reload is required as status tooltip was not found due to a stale element
166- cy . reload ( ) ;
167- modelServingSection . findModelMetricsLink ( modelName ) ;
168- attemptToClickTooltip ( ) ;
169-
170- //Verify the Model is accessible externally
171- cy . step ( 'Verify the model is accessible externally' ) ;
172- modelExternalTester ( modelName , projectName ) . then ( ( { url, response } ) => {
173- expect ( response . status ) . to . equal ( 200 ) ;
174-
175- //verify the External URL Matches the Backend
176- modelServingSection . findInternalExternalServiceButton ( ) . click ( ) ;
177- modelServingSection . findExternalServicePopoverTable ( ) . should ( 'contain' , url ) ;
178- } ) ;
162+ // TODO: Uncomment once RHOAIENG-56694 is resolved.
163+ // The model fails to become ready, so readiness checks, external access tests,
164+ // and stop/start cycle are temporarily skipped.
165+
166+ // //Verify the model created
167+ // cy.step('Verify that the Model is created Successfully on the backend and frontend');
168+ // // Verify model deployment is ready
169+ // cy.get<string>('@resourceName').then((resourceName) => {
170+ // checkInferenceServiceState(resourceName, projectName, { checkReady: true });
171+ // });
172+ // // Note reload is required as status tooltip was not found due to a stale element
173+ // cy.reload();
174+ // modelServingSection.findModelMetricsLink(modelName);
175+ // attemptToClickTooltip();
176+
177+ // //Verify the Model is accessible externally
178+ // cy.step('Verify the model is accessible externally');
179+ // modelExternalTester(modelName, projectName).then(({ url, response }) => {
180+ // expect(response.status).to.equal(200);
181+ //
182+ // //verify the External URL Matches the Backend
183+ // modelServingSection.findInternalExternalServiceButton().click();
184+ // modelServingSection.findExternalServicePopoverTable().should('contain', url);
185+ // });
179186
180187 // Test stop/start functionality
181188 const kServeRow = modelServingSection . getKServeRow ( modelName ) ;
@@ -185,7 +192,9 @@ describe('Verify Admin Single Model Creation and Validation using the UI', () =>
185192 //Ensure the modal is shown
186193 cy . window ( ) . then ( ( win ) => win . localStorage . setItem ( STOP_MODAL_PREFERENCE_KEY , 'false' ) ) ;
187194
188- kServeRow . findStateActionToggle ( ) . should ( 'have.text' , ModelStateToggleLabel . STOP ) . click ( ) ;
195+ // TODO: Uncomment toggle text assertion once RHOAIENG-56694is resolved.
196+ // kServeRow.findStateActionToggle().should('have.text', ModelStateToggleLabel.STOP).click();
197+ kServeRow . findStateActionToggle ( ) . click ( ) ;
189198 kServeRow . findConfirmStopModal ( ) . should ( 'exist' ) ;
190199 kServeRow . findConfirmStopModalCheckbox ( ) . should ( 'exist' ) ;
191200 kServeRow . findConfirmStopModalCheckbox ( ) . should ( 'not.be.checked' ) ;
@@ -210,24 +219,38 @@ describe('Verify Admin Single Model Creation and Validation using the UI', () =>
210219
211220 //Restart the model
212221 cy . step ( 'Restart the model' ) ;
213- kServeRow . findStateActionToggle ( ) . should ( 'have.text' , ModelStateToggleLabel . START ) . click ( ) ;
222+ // TODO: Uncomment toggle text assertion once RHOAIENG-56694 is resolved.
223+ // kServeRow.findStateActionToggle().should('have.text', ModelStateToggleLabel.START).click();
224+ kServeRow . findStateActionToggle ( ) . click ( ) ;
214225 kServeRow . findStatusLabel ( ModelStateLabel . STARTING , MODEL_STATUS_TIMEOUT ) . should ( 'exist' ) ;
215226
216- //Verify the model is running again
217- cy . step ( 'Verify the model is running again' ) ;
218- cy . get < string > ( '@resourceName' ) . then ( ( resourceName ) => {
219- checkInferenceServiceState ( resourceName , projectName , { checkReady : true } ) ;
220- } ) ;
221- kServeRow
222- . findStatusLabel ( )
223- . invoke ( 'text' )
224- . should ( 'match' , new RegExp ( `${ ModelStateLabel . STARTING } |${ ModelStateLabel . STARTED } ` ) ) ;
227+ // TODO: Uncomment once RHOAIENG-56694 is resolved (model never reaches ready/started).
228+ // //Verify the model is running again
229+ // cy.step('Verify the model is running again');
230+ // cy.get<string>('@resourceName').then((resourceName) => {
231+ // checkInferenceServiceState(resourceName, projectName, { checkReady: true });
232+ // });
233+ // kServeRow
234+ // .findStatusLabel()
235+ // .invoke('text')
236+ // .should('match', new RegExp(`${ModelStateLabel.STARTING}|${ModelStateLabel.STARTED}`));
237+
238+ // //Verify external access still works after restart
239+ // cy.step('Verify the model is still accessible externally after restart');
240+ // modelExternalTester(modelName, projectName).then(({ response }) => {
241+ // expect(response.status).to.equal(200);
242+ // });
225243
226- //Verify external access still works after restart
227- cy . step ( 'Verify the model is still accessible externally after restart' ) ;
228- modelExternalTester ( modelName , projectName ) . then ( ( { response } ) => {
229- expect ( response . status ) . to . equal ( 200 ) ;
244+ cy . step ( 'Stop the model before editing' ) ;
245+ kServeRow . findStateActionToggle ( ) . click ( ) ;
246+ cy . get < string > ( '@resourceName' ) . then ( ( resourceName ) => {
247+ checkInferenceServiceState ( resourceName , projectName , {
248+ checkReady : false ,
249+ checkStopped : true ,
250+ requireLoadedState : false ,
251+ } ) ;
230252 } ) ;
253+ kServeRow . findStatusLabel ( ModelStateLabel . STOPPED , MODEL_STATUS_TIMEOUT ) . should ( 'exist' ) ;
231254
232255 // Verify legacy fields are locked in the edit form
233256 cy . step ( 'Edit the deployment and verify legacy fields are locked' ) ;
0 commit comments