Skip to content

Commit

Permalink
chore: try to fix specs (#2401)
Browse files Browse the repository at this point in the history
  • Loading branch information
bumi authored May 6, 2023
1 parent 573d102 commit b218397
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 10 deletions.
37 changes: 32 additions & 5 deletions tests/e2e/001-createWallets.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,22 @@ test.describe("Create or connect wallets", () => {
await browser.close();
});

test("successfully connects to Umbrel", async () => {
test("successfully connects to Umbrel LND", async () => {
const { browser, page, $document } = await createNewWalletWithPassword({
openConnectOtherWallet: true,
});

const connectButton = await getByText($document, "Umbrel");
connectButton.click();
await Promise.all([
page.waitForNavigation(), // The promise resolves after navigation has finished
connectButton.click()
]);

const lndButton = await getByText($document, "Lightning Node");
await Promise.all([
page.waitForNavigation(), // The promise resolves after navigation has finished
lndButton.click()
]);

// wait for the field label instead of headline (headline text already exists on the page before)
await findByText($document, "lndconnect REST URL");
Expand All @@ -172,13 +181,22 @@ test.describe("Create or connect wallets", () => {
await browser.close();
});

test("successfully connects to myNode", async () => {
test("successfully connects to myNode LND", async () => {
const { browser, page, $document } = await createNewWalletWithPassword({
openConnectOtherWallet: true,
});

const connectButton = await getByText($document, "myNode");
connectButton.click();
await Promise.all([
page.waitForNavigation(), // The promise resolves after navigation has finished
connectButton.click()
]);

const lndButton = await getByText($document, "LND");
await Promise.all([
page.waitForNavigation(), // The promise resolves after navigation has finished
lndButton.click()
]);

// wait for the field label instead of headline (headline text already exists on the page before)
await findByText($document, "lndconnect REST URL");
Expand All @@ -202,7 +220,16 @@ test.describe("Create or connect wallets", () => {
});

const connectButton = await getByText($document, "Start9");
connectButton.click();
await Promise.all([
page.waitForNavigation(), // The promise resolves after navigation has finished
connectButton.click()
]);

const lndButton = await getByText($document, "LND");
await Promise.all([
page.waitForNavigation(), // The promise resolves after navigation has finished
lndButton.click()
]);

// wait for the field label instead of headline (headline text already exists on the page before)
await findByText($document, "lndconnect REST URL");
Expand Down
10 changes: 5 additions & 5 deletions tests/e2e/helpers/loadExtension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ export const createNewWalletWithPassword = async (options?: {
export const commonCreateWalletSuccessCheck = async ({ page, $document }) => {
// submit form
const continueButton = await findByText($document, "Continue");
continueButton.click(),
// options.html
await Promise.all([
page.waitForNavigation(), // The promise resolves after navigation has finished
]);
continueButton.click();
// options.html
await Promise.all([
page.waitForNavigation(), // The promise resolves after navigation has finished
]);

// options.html#publishers
await Promise.all([
Expand Down

0 comments on commit b218397

Please sign in to comment.