mirror of
https://github.com/ivabus/gui
synced 2025-04-23 14:07:14 +03:00

* add webdriver tests * reduce build time for test --------- Co-authored-by: neil molina <neil@neils-MacBook-Pro.local>
37 lines
1.2 KiB
TypeScript
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();
|
|
});
|
|
});
|