Skip to content

Commit fc4acdb

Browse files
authored
Merge pull request #142 from synonymdev/fix/rgs-crash
Fix/rgs crash - adapt rgs update test
2 parents 5bf1966 + 736d307 commit fc4acdb

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

test/specs/mainnet/ln.e2e.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,12 @@ async function waitForWalletReady(): Promise<void> {
8484

8585
await expectTextWithin('Status-internet', 'Connected', { timeout: APP_STATUS_ROW_TIMEOUT_MS });
8686
await expectTextWithin('Status-electrum', 'Connected', { timeout: APP_STATUS_ROW_TIMEOUT_MS });
87-
await expectTextWithin('Status-lightning_node', 'Running', { timeout: APP_STATUS_ROW_TIMEOUT_MS });
88-
await expectTextWithin('Status-lightning_connection', 'Open', { timeout: APP_STATUS_ROW_TIMEOUT_MS });
87+
await expectTextWithin('Status-lightning_node', 'Running', {
88+
timeout: APP_STATUS_ROW_TIMEOUT_MS,
89+
});
90+
await expectTextWithin('Status-lightning_connection', 'Open', {
91+
timeout: APP_STATUS_ROW_TIMEOUT_MS,
92+
});
8993

9094
await doNavigationClose();
9195
console.info('→ [LN] App status verified');

test/specs/settings.e2e.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,15 +424,24 @@ describe('@settings - Settings', () => {
424424
const newUrl = `${rgsUrl}/`;
425425

426426
// url should be updated
427-
await typeText('RGSUrl', newUrl);
428-
await confirmInputOnKeyboard();
427+
try {
428+
await typeText('RGSUrl', newUrl);
429+
await confirmInputOnKeyboard();
430+
await elementById('ConnectToHost').waitForEnabled();
431+
} catch {
432+
console.info('→ [Settings] RGSUrl is not updated properly, trying again...');
433+
await typeText('RGSUrl', newUrl);
434+
await confirmInputOnKeyboard();
435+
await elementById('ConnectToHost').waitForEnabled();
436+
}
429437
await tap('ConnectToHost');
430438
await waitForToast('RgsUpdatedToast');
431439
const updatedUrl = await (await elementById('ConnectedUrl')).getText();
432440
await expect(updatedUrl).toBe(newUrl);
433441

434442
// switch back to default
435443
await tap('ResetToDefault');
444+
await sleep(2000);
436445
await tap('ConnectToHost');
437446
await waitForToast('RgsUpdatedToast', { waitToDisappear: false });
438447

0 commit comments

Comments
 (0)