Files
zulip-desktop/tests/test-new-organization.ts
Anders Kaseorg 814de8ad6a tests: Convert tests to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-08-06 13:29:46 -07:00

26 lines
696 B
TypeScript

import Fifo from "p-fifo";
import type {Page} from "playwright-core";
import test from "tape";
import * as setup from "./setup.ts";
// Create new org link should open in the default browser [WIP]
test("new-org-link", async (t) => {
t.timeoutAfter(50e3);
setup.resetTestDataDirectory();
const app = await setup.createApp();
try {
const windows = new Fifo<Page>();
for (const win of app.windows()) void windows.push(win);
app.on("window", async (win) => windows.push(win));
const mainWindow = await windows.shift();
t.equal(await mainWindow.title(), "Zulip");
await mainWindow.click("#open-create-org-link");
} finally {
await setup.endTest(app);
}
});