Skip to content

Commit 7941be4

Browse files
committed
fix: flaky
1 parent b998428 commit 7941be4

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

test/ui/suite/commands.ui.test.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -98,18 +98,15 @@ async function openSampleFile(): Promise<TextEditor> {
9898
500,
9999
);
100100

101-
// If the tab still isn't open, fall back to Quick Open (Ctrl+P / Cmd+P).
101+
// If the tab still isn't open, open the file via the Explorer sidebar.
102102
try {
103103
return (await editorView.openEditor(SAMPLE_FILE_BASENAME)) as TextEditor;
104104
} catch {
105-
const driver = VSBrowser.instance.driver;
106-
const modifier = process.platform === "darwin" ? Key.META : Key.CONTROL;
107-
await driver.actions({ bridge: true }).keyDown(modifier).sendKeys("p").keyUp(modifier).perform();
108-
await driver.sleep(2_000);
109-
const input = await InputBox.create();
110-
await input.setText(SAMPLE_FILE_BASENAME);
111-
await driver.sleep(2_000);
112-
await input.confirm();
105+
const explorerView = await new ActivityBar().getViewControl("Explorer");
106+
await explorerView?.openView();
107+
const content = new Workbench().getSideBar().getContent();
108+
const section = await content.getSection("sample-workspace");
109+
await section.openItem("src", SAMPLE_FILE_BASENAME);
113110
await waitForCondition(
114111
async () => {
115112
try {

0 commit comments

Comments
 (0)