From 41fb9f9c5e2810b1643c1a5ea35c8775d03ec6bd Mon Sep 17 00:00:00 2001 From: Ron <45816308+rjaegers@users.noreply.github.com> Date: Sat, 2 Nov 2024 18:21:17 +0000 Subject: [PATCH] test: press enter on searchbox --- test/cpp/features/pages/codespace.pom.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/cpp/features/pages/codespace.pom.ts b/test/cpp/features/pages/codespace.pom.ts index fdf117c2..6301e83e 100644 --- a/test/cpp/features/pages/codespace.pom.ts +++ b/test/cpp/features/pages/codespace.pom.ts @@ -1,5 +1,6 @@ import { test, expect, type Page, type Locator } from '@playwright/test'; import path from 'path'; +import { serialize } from 'v8'; type CommandAndPrompt = { command: string, @@ -101,7 +102,9 @@ export class CodespacePage { await this.page.keyboard.press('Control+P'); const searchBox = this.page.getByPlaceholder('Search files by name'); await expect(searchBox).toBeVisible(); + await searchBox.fill(name); + await searchBox.press('Enter'); await expect(this.page.locator('[id="workbench.parts.editor"]')).toContainText(path.basename(name)); }