mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2025-12-17 06:14:21 +01:00
better restore test
This commit is contained in:
@@ -8,7 +8,9 @@ test("initial load", async ({ page }) => {
|
||||
// Expect a title "to contain" a substring.
|
||||
await expect(page).toHaveTitle(/Mutiny Wallet/);
|
||||
|
||||
await expect(page.locator("header")).toContainText(["Activity"]);
|
||||
await expect(page.locator("header")).toContainText(["Activity"], {
|
||||
timeout: 30000
|
||||
});
|
||||
|
||||
// Wait up to 30 seconds for an image element matching the selector to be visible
|
||||
await page.waitForSelector("img[alt='lightning']", { timeout: 30000 });
|
||||
@@ -51,10 +53,9 @@ test("first receive", async ({ page }) => {
|
||||
|
||||
continueButton.click();
|
||||
|
||||
// Find a p with the text "Show or share this code with the sender."
|
||||
await expect(page.locator("p")).toContainText([
|
||||
"Keep Mutiny open to receive the payment."
|
||||
]);
|
||||
await expect(
|
||||
page.getByText("Keep Mutiny open to complete the payment.")
|
||||
).toBeVisible();
|
||||
|
||||
// Locate an SVG inside a div with id "qr"
|
||||
const qrCode = await page.locator("#qr > svg");
|
||||
|
||||
@@ -61,4 +61,26 @@ test("restore from seed", async ({ page }) => {
|
||||
|
||||
// Eventually we should have a balance of 100k sats
|
||||
await page.waitForSelector("text=100,000 SATS");
|
||||
|
||||
// Now we should clean up after ourselves and delete the wallet
|
||||
settingsLink.click();
|
||||
|
||||
// Wait for settings to load
|
||||
await page.waitForSelector("text=Settings");
|
||||
|
||||
// Click the "Restore" link
|
||||
page.click("text=Admin Page");
|
||||
|
||||
// Clicke the Delete Everything button
|
||||
page.click("text=Delete Everything");
|
||||
|
||||
// A modal should pop up, click the "Confirm" button
|
||||
const confirmDeleteButton = await page.locator("button", {
|
||||
hasText: "Confirm"
|
||||
});
|
||||
confirmDeleteButton.click();
|
||||
|
||||
// Wait for the wallet to load
|
||||
// Wait for the wallet to load
|
||||
await page.waitForSelector("img[alt='lightning']");
|
||||
});
|
||||
|
||||
@@ -37,10 +37,10 @@ export default defineConfig({
|
||||
// use: { ...devices["Desktop Chrome"] }
|
||||
// },
|
||||
|
||||
{
|
||||
name: "firefox",
|
||||
use: { ...devices["Desktop Firefox"] }
|
||||
},
|
||||
// {
|
||||
// name: "firefox",
|
||||
// use: { ...devices["Desktop Firefox"] }
|
||||
// },
|
||||
|
||||
// {
|
||||
// name: "webkit",
|
||||
@@ -51,11 +51,11 @@ export default defineConfig({
|
||||
{
|
||||
name: "Mobile Chrome",
|
||||
use: { ...devices["Pixel 5"] }
|
||||
},
|
||||
{
|
||||
name: "Mobile Safari",
|
||||
use: { ...devices["iPhone 12"] }
|
||||
}
|
||||
// {
|
||||
// name: "Mobile Safari",
|
||||
// use: { ...devices["iPhone 12"] }
|
||||
// }
|
||||
|
||||
/* Test against branded browsers. */
|
||||
// {
|
||||
|
||||
@@ -54,7 +54,6 @@ export default defineConfig({
|
||||
// Don't want vite to bundle these late during dev causing reload
|
||||
include: [
|
||||
"qr-scanner",
|
||||
"nostr-tools",
|
||||
"class-variance-authority",
|
||||
"@kobalte/core",
|
||||
"@solid-primitives/upload",
|
||||
|
||||
Reference in New Issue
Block a user