Skip to content

Commit

Permalink
fix: a few changes
Browse files Browse the repository at this point in the history
  • Loading branch information
juanky201271 committed Feb 7, 2025
1 parent 80d6b70 commit e9c79d2
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 3 deletions.
5 changes: 5 additions & 0 deletions e2e/new_wallet.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ describe('New Wallet', () => {
.withTimeout(sync_timeout);
await element(by.id('seed.button.ok')).tap();

await waitFor(element(by.text('HISTORY')))
.toBeVisible()
.withTimeout(sync_timeout);
await element(by.text('HISTORY')).tap();

await waitFor(element(by.id('valuetransfer text')))
.toBeVisible()
.withTimeout(sync_timeout);
Expand Down
12 changes: 10 additions & 2 deletions e2e/parse_invalid_address.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,17 @@ const sleep = ms => new Promise(r => setTimeout(r, ms));
describe('Renders wallet data correctly.', () => {
it('loads a wallet', async () => await loadRecipientWallet());
it('does not parse an incorrect address', async () => {
await waitFor(element(by.text('HISTORY')))
.toBeVisible()
.withTimeout(sync_timeout);
await element(by.text('HISTORY')).tap();

await waitFor(element(by.id('vt-1')))
.toExist()
.withTimeout(30000);
.toExist()
.withTimeout(30000);
await waitFor(element(by.text('SEND')))
.toBeVisible()
.withTimeout(sync_timeout);
await element(by.text('SEND')).tap();

await element(by.id('send.addressplaceholder')).replaceText('thisisaninvalidaddress');
Expand Down
4 changes: 4 additions & 0 deletions e2e/reload_while_tx_pending.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ describe('Maintains correct information while tx pending', () => {
// wait for fully synced.
//await sleep(4000);

await waitFor(element(by.text('SEND')))
.toBeVisible()
.withTimeout(sync_timeout);
await element(by.text('SEND')).tap();

await element(by.id('send.addressplaceholder')).replaceText(
'zregtestsapling1fkc26vpg566hgnx33n5uvgye4neuxt4358k68atnx78l5tg2dewdycesmr4m5pn56ffzsa7lyj6',
);
Expand Down
3 changes: 3 additions & 0 deletions e2e/send.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ describe('Renders wallet data correctly.', () => {
// i just pulled this seed out of thin air
it('loads a wallet', async () => await loadRecipientWallet());
it('adds return address to the memo if that option is selected, and correctly renders confirm screen', async () => {
await waitFor(element(by.text('SEND')))
.toBeVisible()
.withTimeout(sync_timeout);
await element(by.text('SEND')).tap();

await element(by.id('send.addressplaceholder')).replaceText(
Expand Down
2 changes: 1 addition & 1 deletion e2e/shielding.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('Renders wallet data correctly.', () => {
await expect(element(by.text('CONFIRM'))).toBeVisible();
await element(by.text('CONFIRM')).tap();
// Wait for confirmation
await waitFor(element(by.text(/Transmitted|In Mempool/gi)))
await waitFor(element(by.text(/Transmitted|In Mempool/gi)))
.toExist()
.withTimeout(50000);

Expand Down
8 changes: 8 additions & 0 deletions e2e/tex_send_address.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,17 @@ const sleep = ms => new Promise(r => setTimeout(r, ms));
describe('Renders wallet data correctly.', () => {
it('loads a wallet', async () => await loadRecipientWallet());
it('parses the TEX address and correctly renders the confirm screen', async () => {
await waitFor(element(by.text('HISTORY')))
.toBeVisible()
.withTimeout(sync_timeout);
await element(by.text('HISTORY')).tap();

await waitFor(element(by.id('vt-1')))
.toExist()
.withTimeout(30000);
await waitFor(element(by.text('SEND')))
.toBeVisible()
.withTimeout(sync_timeout);
await element(by.text('SEND')).tap();

// Address taken from the reference implementation
Expand Down
5 changes: 5 additions & 0 deletions e2e/transaction_history.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ describe('Renders wallet data correctly.', () => {
// there is a ValueTransfer in this plant at 1994580, 1 block after the "birthday".
it('synks 1 block and renders a ValueTransfer. this should take less than a minute, but will time out after 16 minutes', async () => {
//await sleep(4000);

await waitFor(element(by.text('HISTORY')))
.toBeVisible()
.withTimeout(sync_timeout);
await element(by.text('HISTORY')).tap();

await waitFor(element(by.id("vt-1"))).toBeVisible().withTimeout(sync_timeout)
await element(by.id("vt-1")).tap();
Expand Down

0 comments on commit e9c79d2

Please sign in to comment.