Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions packages/playground-website/e2e/ui.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,9 @@ test.describe("playground UI tests", () => {
const typespecEditor = page.locator(".monaco-editor").first();
await typespecEditor.click();
await typespecEditor.pressSequentially("op sharedCode(): string;");
await Promise.all([
// It is important to call waitForNavigation before click to set up waiting.
page.waitForURL(
// cspell:disable-next-line
new RegExp(`${host}/\\?.*c=b3Agc2hhcmVkQ29kZSgpOiBzdHJpbmc7.*`),
),
page.keyboard.press(`${ctrlOrCmd}+KeyS`),
]);
await page.keyboard.press(`${ctrlOrCmd}+KeyS`);
// cspell:disable-next-line
const sharedCodeQueryPattern = new RegExp(`${host}/\\?.*c=b3Agc2hhcmVkQ29kZSgpOiBzdHJpbmc7.*`);
await expect.poll(() => page.url()).toMatch(sharedCodeQueryPattern);
});
});