@@ -421,20 +421,17 @@ test.describe.serial(`AI Lab extension installation and verification`, () => {
421
421
. toBe ( 'RUNNING' ) ;
422
422
} ) ;
423
423
424
- test ( `Delete model service for ${ modelName } ` , async ( ) => {
424
+ test ( `Delete model service and model for ${ modelName } ` , async ( ) => {
425
425
test . setTimeout ( 150_000 ) ;
426
- const modelServicePage = await modelServiceDetailsPage . deleteService ( ) ;
427
- await playExpect ( modelServicePage . heading ) . toBeVisible ( { timeout : 120_000 } ) ;
426
+ await cleanupServices ( ) ;
427
+ await deleteAllModels ( ) ;
428
428
} ) ;
429
429
} ) ;
430
430
} ) ;
431
431
432
- [
433
- 'ibm-granite/granite-3.3-8b-instruct-GGUF' ,
434
- 'instructlab/granite-7b-lab-GGUF' ,
435
- 'instructlab/merlinite-7b-lab-GGUF' ,
436
- 'TheBloke/Mistral-7B-Instruct-v0.2-GGUF' ,
437
- ] . forEach ( modelName => {
432
+ // Do not use non-instruct models in playground tests.
433
+ // They break out of guilderails and fail the tests.
434
+ [ 'ibm-granite/granite-3.3-8b-instruct-GGUF' , 'TheBloke/Mistral-7B-Instruct-v0.2-GGUF' ] . forEach ( modelName => {
438
435
test . describe . serial ( `AI Lab playground creation and deletion for ${ modelName } ` , { tag : '@smoke' } , ( ) => {
439
436
let catalogPage : AILabCatalogPage ;
440
437
let playgroundsPage : AILabPlaygroundsPage ;
@@ -515,7 +512,8 @@ test.describe.serial(`AI Lab extension installation and verification`, () => {
515
512
516
513
test . afterAll ( `Cleaning up service model` , async ( ) => {
517
514
test . setTimeout ( 60_000 ) ;
518
- await cleanupServiceModels ( ) ;
515
+ await cleanupServices ( ) ;
516
+ await deleteAllModels ( ) ;
519
517
} ) ;
520
518
} ) ;
521
519
} ) ;
@@ -640,14 +638,15 @@ test.describe.serial(`AI Lab extension installation and verification`, () => {
640
638
641
639
await restartApp ( appName ) ;
642
640
await stopAndDeleteApp ( appName ) ;
643
- await cleanupServiceModels ( ) ;
641
+ await cleanupServices ( ) ;
644
642
} ) ;
645
643
646
644
test . afterAll ( `Ensure cleanup of "${ appName } " app, related service, and images` , async ( { navigationBar } ) => {
647
645
test . setTimeout ( 150_000 ) ;
648
646
649
647
await stopAndDeleteApp ( appName ) ;
650
- await cleanupServiceModels ( ) ;
648
+ await cleanupServices ( ) ;
649
+ await deleteAllModels ( ) ;
651
650
await deleteUnusedImages ( navigationBar ) ;
652
651
} ) ;
653
652
} ) ;
@@ -716,7 +715,7 @@ test.describe.serial(`AI Lab extension installation and verification`, () => {
716
715
} ) ;
717
716
} ) ;
718
717
719
- async function cleanupServiceModels ( ) : Promise < void > {
718
+ async function cleanupServices ( ) : Promise < void > {
720
719
try {
721
720
const modelServicePage = await aiLabPage . navigationBar . openServices ( ) ;
722
721
await modelServicePage . waitForLoad ( ) ;
@@ -727,6 +726,12 @@ async function cleanupServiceModels(): Promise<void> {
727
726
}
728
727
}
729
728
729
+ async function deleteAllModels ( ) : Promise < void > {
730
+ const modelCatalogPage = await aiLabPage . navigationBar . openCatalog ( ) ;
731
+ await modelCatalogPage . waitForLoad ( ) ;
732
+ await modelCatalogPage . deleteAllModels ( ) ;
733
+ }
734
+
730
735
async function restartApp ( appName : string ) : Promise < void > {
731
736
const aiRunningAppsPage = await aiLabPage . navigationBar . openRunningApps ( ) ;
732
737
const aiApp = await aiRunningAppsPage . getRowForApp ( appName ) ;
0 commit comments