mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2025-12-18 14:54:26 +01:00
new home
This commit is contained in:
27
e2e/utils.ts
Normal file
27
e2e/utils.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { expect, Page } from "@playwright/test";
|
||||
|
||||
export async function loadHome(page: Page) {
|
||||
// Start on the home page
|
||||
await expect(page).toHaveTitle(/Mutiny Wallet/);
|
||||
await page.waitForSelector("text=Welcome to the Mutiny!");
|
||||
|
||||
console.log("Waiting for new wallet to be created...");
|
||||
|
||||
await page.locator(`button:has-text('New Wallet')`).click();
|
||||
|
||||
await page.locator("text=Create your profile").first();
|
||||
|
||||
await page.locator("button:has-text('Skip for now')").click();
|
||||
|
||||
// Should have a balance up top now
|
||||
await page.locator(`text=0 sats`).first();
|
||||
// Status light should be ready
|
||||
await page.locator(`title="READY"`).first();
|
||||
}
|
||||
|
||||
export async function visitSettings(page: Page) {
|
||||
// Find an image with an alt text of "mutiny" and click it
|
||||
// TODO: probably should have better ARIA stuff for this
|
||||
await page.locator("img[alt='mutiny']").first().click();
|
||||
await expect(page.locator("h1").first()).toHaveText("Settings");
|
||||
}
|
||||
Reference in New Issue
Block a user