Skip to content

Commit b218397

Browse files
authored
chore: try to fix specs (#2401)
1 parent 573d102 commit b218397

File tree

2 files changed

+37
-10
lines changed

2 files changed

+37
-10
lines changed

tests/e2e/001-createWallets.spec.ts

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,22 @@ test.describe("Create or connect wallets", () => {
148148
await browser.close();
149149
});
150150

151-
test("successfully connects to Umbrel", async () => {
151+
test("successfully connects to Umbrel LND", async () => {
152152
const { browser, page, $document } = await createNewWalletWithPassword({
153153
openConnectOtherWallet: true,
154154
});
155155

156156
const connectButton = await getByText($document, "Umbrel");
157-
connectButton.click();
157+
await Promise.all([
158+
page.waitForNavigation(), // The promise resolves after navigation has finished
159+
connectButton.click()
160+
]);
161+
162+
const lndButton = await getByText($document, "Lightning Node");
163+
await Promise.all([
164+
page.waitForNavigation(), // The promise resolves after navigation has finished
165+
lndButton.click()
166+
]);
158167

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

175-
test("successfully connects to myNode", async () => {
184+
test("successfully connects to myNode LND", async () => {
176185
const { browser, page, $document } = await createNewWalletWithPassword({
177186
openConnectOtherWallet: true,
178187
});
179188

180189
const connectButton = await getByText($document, "myNode");
181-
connectButton.click();
190+
await Promise.all([
191+
page.waitForNavigation(), // The promise resolves after navigation has finished
192+
connectButton.click()
193+
]);
194+
195+
const lndButton = await getByText($document, "LND");
196+
await Promise.all([
197+
page.waitForNavigation(), // The promise resolves after navigation has finished
198+
lndButton.click()
199+
]);
182200

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

204222
const connectButton = await getByText($document, "Start9");
205-
connectButton.click();
223+
await Promise.all([
224+
page.waitForNavigation(), // The promise resolves after navigation has finished
225+
connectButton.click()
226+
]);
227+
228+
const lndButton = await getByText($document, "LND");
229+
await Promise.all([
230+
page.waitForNavigation(), // The promise resolves after navigation has finished
231+
lndButton.click()
232+
]);
206233

207234
// wait for the field label instead of headline (headline text already exists on the page before)
208235
await findByText($document, "lndconnect REST URL");

tests/e2e/helpers/loadExtension.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,11 @@ export const createNewWalletWithPassword = async (options?: {
120120
export const commonCreateWalletSuccessCheck = async ({ page, $document }) => {
121121
// submit form
122122
const continueButton = await findByText($document, "Continue");
123-
continueButton.click(),
124-
// options.html
125-
await Promise.all([
126-
page.waitForNavigation(), // The promise resolves after navigation has finished
127-
]);
123+
continueButton.click();
124+
// options.html
125+
await Promise.all([
126+
page.waitForNavigation(), // The promise resolves after navigation has finished
127+
]);
128128

129129
// options.html#publishers
130130
await Promise.all([

0 commit comments

Comments
 (0)