-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee32e59
commit 33b8190
Showing
165 changed files
with
6,736 additions
and
10,991 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,9 @@ project(':capacitor-app').projectDir = new File('../node_modules/.pnpm/@capacito | |
include ':capacitor-app-launcher' | ||
project(':capacitor-app-launcher').projectDir = new File('../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@capacitor/app-launcher/android') | ||
|
||
include ':capacitor-camera' | ||
project(':capacitor-camera').projectDir = new File('../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@capacitor/camera/android') | ||
|
||
include ':capacitor-clipboard' | ||
project(':capacitor-clipboard').projectDir = new File('../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@capacitor/clipboard/android') | ||
|
||
|
@@ -28,3 +31,6 @@ project(':capacitor-status-bar').projectDir = new File('../node_modules/.pnpm/@c | |
|
||
include ':capacitor-toast' | ||
project(':capacitor-toast').projectDir = new File('../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@capacitor/toast/android') | ||
|
||
include ':capacitor-secure-storage-plugin' | ||
project(':capacitor-secure-storage-plugin').projectDir = new File('../node_modules/.pnpm/[email protected]_@[email protected]/node_modules/capacitor-secure-storage-plugin/android') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import { expect, test } from "@playwright/test"; | ||
|
||
import { loadHome, visitSettings } from "./utils"; | ||
|
||
const SIGNET_INVITE_CODE = | ||
"fed11qgqzc2nhwden5te0vejkg6tdd9h8gepwvejkg6tdd9h8garhduhx6at5d9h8jmn9wshxxmmd9uqqzgxg6s3evnr6m9zdxr6hxkdkukexpcs3mn7mj3g5pc5dfh63l4tj6g9zk4er"; | ||
|
||
|
@@ -8,24 +10,8 @@ test.beforeEach(async ({ page }) => { | |
}); | ||
|
||
test("fedmint join, receive, send", async ({ page }) => { | ||
// Expect a title "to contain" a substring. | ||
await expect(page).toHaveTitle(/Mutiny Wallet/); | ||
|
||
// Wait for an element matching the selector to appear in DOM. | ||
await page.waitForSelector("text=0 SATS"); | ||
|
||
console.log("Page loaded."); | ||
|
||
// Wait for a while just to make sure we can load everything | ||
await page.waitForTimeout(1000); | ||
|
||
// Navigate to settings | ||
const settingsLink = await page.getByRole("link", { name: "Settings" }); | ||
|
||
settingsLink.click(); | ||
|
||
// Wait for settings to load | ||
await page.waitForSelector("text=Settings"); | ||
await loadHome(page); | ||
await visitSettings(page); | ||
|
||
// Click "Manage Federations" link | ||
await page.click("text=Manage Federations"); | ||
|
@@ -45,21 +31,27 @@ test("fedmint join, receive, send", async ({ page }) => { | |
await page.goBack(); | ||
await page.goBack(); | ||
|
||
// Make sure there's a fedimint icon | ||
await expect(page.getByRole("img", { name: "community" })).toBeVisible(); | ||
// Click the top left button (it's the profile button), a child of header | ||
// TODO: better ARIA stuff | ||
await page.locator(`header button`).first().click(); | ||
|
||
// Click the receive button | ||
await page.click("text=Receive"); | ||
// Make sure there's text that says "fedimint" | ||
await page.locator("text=fedimint").first(); | ||
|
||
// Navigate back home | ||
await page.goBack(); | ||
|
||
// Click the fab button | ||
await page.locator("#fab").click(); | ||
// Click the receive button in the fab | ||
await page.locator("text=Receive").last().click(); | ||
|
||
// Expect the url to conain receive | ||
await expect(page).toHaveURL(/.*receive/); | ||
|
||
// At least one h1 should show "0 sats" | ||
await expect(page.locator("h1")).toContainText(["0 SATS"]); | ||
|
||
// At least one h2 should show "0 USD" | ||
await expect(page.locator("h2")).toContainText(["$0 USD"]); | ||
|
||
// Type 100 into the input | ||
await page.locator("#sats-input").pressSequentially("100"); | ||
|
||
|
@@ -72,11 +64,7 @@ test("fedmint join, receive, send", async ({ page }) => { | |
}); | ||
await expect(continueButton).not.toBeDisabled(); | ||
|
||
// Wait one second | ||
// TODO: figure out how to not get an error without waiting | ||
await page.waitForTimeout(1000); | ||
|
||
continueButton.click(); | ||
await continueButton.click(); | ||
|
||
await expect( | ||
page.getByText("Keep Mutiny open to complete the payment.") | ||
|
@@ -109,31 +97,26 @@ test("fedmint join, receive, send", async ({ page }) => { | |
); | ||
|
||
// Wait for an h1 to appear in the dom that says "Payment Received" | ||
await page.waitForSelector("text=Payment Received", { timeout: 30000 }); | ||
await page.waitForSelector("text=Payment Received"); | ||
|
||
// Click the "Nice" button | ||
await page.click("text=Nice"); | ||
|
||
// Make sure we have 100 sats in the fedimint balance | ||
await expect( | ||
page | ||
.locator("div") | ||
.filter({ hasText: /^100 eSATS$/ }) | ||
.nth(1) | ||
).toBeVisible(); | ||
// Make sure we have 100 sats in the top balance | ||
await page.waitForSelector("text=100 SATS"); | ||
|
||
// Now we send | ||
await page.click("text=Send"); | ||
await page.locator("#fab").click(); | ||
await page.locator("text=Send").last().click(); | ||
|
||
// type [email protected] | ||
const sendInput = await page.locator("input"); | ||
await sendInput.fill("[email protected]"); | ||
|
||
await page.click("text=Continue"); | ||
|
||
// Wait two seconds (the destination doesn't show up immediately) | ||
// TODO: figure out how to not get an error without waiting | ||
await page.waitForTimeout(2000); | ||
// Wait for the destination to show up | ||
await page.waitForSelector("text=LIGHTNING"); | ||
|
||
// Type 90 into the input | ||
await page.locator("#sats-input").fill("90"); | ||
|
@@ -147,8 +130,8 @@ test("fedmint join, receive, send", async ({ page }) => { | |
}); | ||
await expect(confirmButton).not.toBeDisabled(); | ||
|
||
confirmButton.click(); | ||
await confirmButton.click(); | ||
|
||
// Wait for an h1 to appear in the dom that says "Payment Sent" | ||
await page.waitForSelector("text=Payment Sent", { timeout: 30000 }); | ||
await page.waitForSelector("text=Payment Sent"); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,11 @@ | ||
import { expect, test } from "@playwright/test"; | ||
import { test } from "@playwright/test"; | ||
|
||
import { loadHome } from "./utils"; | ||
|
||
test.beforeEach(async ({ page }) => { | ||
await page.goto("http://localhost:3420/"); | ||
}); | ||
|
||
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"], { | ||
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 }); | ||
|
||
// Wait for an element matching the selector to appear in DOM. | ||
await page.waitForSelector("text=0 SATS"); | ||
|
||
console.log("Page loaded."); | ||
await loadHome(page); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.