@@ -29,6 +29,7 @@ export class AILabServiceDetailsPage extends AILabBasePage {
29
29
readonly codeSnippet : Locator ;
30
30
readonly deleteServiceButton : Locator ;
31
31
readonly stopServiceButton : Locator ;
32
+ readonly startServiceButton : Locator ;
32
33
33
34
constructor ( page : Page , webview : Page ) {
34
35
super ( page , webview , 'Service details' ) ;
@@ -38,6 +39,7 @@ export class AILabServiceDetailsPage extends AILabBasePage {
38
39
this . codeSnippet = this . webview . getByLabel ( 'Code Snippet' , { exact : true } ) ;
39
40
this . deleteServiceButton = this . webview . getByRole ( 'button' , { name : 'Delete service' } ) ;
40
41
this . stopServiceButton = this . webview . getByRole ( 'button' , { name : 'Stop service' } ) ;
42
+ this . startServiceButton = this . webview . getByRole ( 'button' , { name : 'Start service' } ) ;
41
43
}
42
44
43
45
async waitForLoad ( ) : Promise < void > {
@@ -51,6 +53,16 @@ export class AILabServiceDetailsPage extends AILabBasePage {
51
53
return new AiModelServicePage ( this . page , this . webview ) ;
52
54
}
53
55
56
+ async stopService ( ) : Promise < void > {
57
+ await playExpect ( this . stopServiceButton ) . toBeEnabled ( ) ;
58
+ await this . stopServiceButton . click ( ) ;
59
+ }
60
+
61
+ async startService ( ) : Promise < void > {
62
+ await playExpect ( this . startServiceButton ) . toBeEnabled ( ) ;
63
+ await this . startServiceButton . click ( ) ;
64
+ }
65
+
54
66
async getInferenceServerPort ( ) : Promise < string > {
55
67
const split = ( await this . endpointURL . textContent ( ) ) ?. split ( ':' ) ;
56
68
const port = split ? split [ split . length - 1 ] . split ( '/' ) [ 0 ] : '' ;
0 commit comments