gui/modules/desktop/test/specs/app.e2e.ts
ABevier c76473cf16
Webdriver.io (#588)
* add webdriver tests

* reduce build time for test

---------

Co-authored-by: neil molina <neil@neils-MacBook-Pro.local>
2023-05-12 10:56:45 +08:00

37 lines
1.2 KiB
TypeScript

import { browser } from "wdio-electron-service";
import { setupUtils } from "./utils.ts";
describe("basic smoke test", () => {
it("install brewkit from the made by tea tab", async () => {
const utils = setupUtils(browser);
const { screen } = utils!;
// app launches to discover screen by default - make sure Stable Diffusion is there
await expect(await screen.findByText("Stable Diffusion web UI")).toExist();
// navigate to "made by tea" page
const btn = await utils.findButton("made by tea");
btn.click();
// find the brewkit package
const pkgCard = await utils.findPackageCardBySlug("tea_xyz_brewkit");
pkgCard.click();
await utils.packageDetailsLoaded();
// Be nice to devs running this over and over
await utils.uninstallPackageIfNeeded();
await utils.installLatestVersion();
//use findByText to wait for the install to complete
await expect(
await screen.findByText(
/^Package tea.xyz\/brewkit .* has been installed./,
{},
{ timeout: 60000, interval: 1000 }
)
).toExist();
await expect(await screen.findByRole("button", { name: "OPEN IN TERMINAL" })).toExist();
});
});