Skip to content

Commit 9bbb52f

Browse files
committed
chore: edited e2e test to comply with new runtime selection
Signed-off-by: Brian <[email protected]>
1 parent 05c82b2 commit 9bbb52f

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

tests/playwright/src/model/ai-lab-playgrounds-page.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,28 +27,40 @@ export class AILabPlaygroundsPage extends AILabBasePage {
2727
readonly newPlaygroundButton: Locator;
2828
readonly playgroundNameInput: Locator;
2929
readonly createPlaygroundButton: Locator;
30+
readonly runtimeInput: Locator;
3031

3132
constructor(page: Page, webview: Page) {
3233
super(page, webview, 'Playground Environments');
3334
this.additionalActions = this.webview.getByRole('group', { name: 'additionalActions' });
3435
this.newPlaygroundButton = this.additionalActions.getByRole('button', { name: 'New Playground', exact: true });
3536
this.playgroundNameInput = this.webview.getByRole('textbox', { name: 'playgroundName' });
3637
this.createPlaygroundButton = this.webview.getByRole('button', { name: 'Create playground', exact: true });
38+
this.runtimeInput = this.webview.getByLabel('Select Inference Runtime', { exact: true });
3739
}
3840

3941
async waitForLoad(): Promise<void> {
4042
await playExpect(this.heading).toBeVisible();
4143
}
4244

43-
async createNewPlayground(name: string, timeout = 180_000): Promise<this> {
45+
async createNewPlayground(name: string, runtime = 'llama-cpp', timeout = 180_000): Promise<this> {
4446
await playExpect(this.newPlaygroundButton).toBeEnabled();
4547
await this.newPlaygroundButton.click();
48+
4649
await playExpect(this.playgroundNameInput).toBeVisible();
4750
await this.playgroundNameInput.fill(name);
4851
await playExpect(this.playgroundNameInput).toHaveValue(name);
52+
53+
await playExpect(this.runtimeInput).toBeVisible();
54+
await this.runtimeInput.click();
55+
56+
// Select the runtime
57+
await this.runtimeInput.fill(runtime);
58+
await this.webview.keyboard.press('Enter');
59+
4960
await playExpect(this.createPlaygroundButton).toBeEnabled();
5061
await this.createPlaygroundButton.click();
5162
await playExpect(this.createPlaygroundButton).not.toBeVisible({ timeout });
63+
5264
return this;
5365
}
5466

0 commit comments

Comments
 (0)