Skip to content

Commit

Permalink
fix: stashtags test
Browse files Browse the repository at this point in the history
  • Loading branch information
limpbrains committed Nov 2, 2023
1 parent 9194d2c commit 82c04b5
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions e2e/slashtags.e2e.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import BitcoinJsonRpc from 'bitcoin-json-rpc';
import { device } from 'detox';

import {
bitcoinURL,
Expand Down Expand Up @@ -76,6 +77,8 @@ d('Profile and Contacts', () => {
return;
}

const isIos = device.getPlatform() === 'ios';

// CREATE NEW PROFILE
await element(by.id('Header')).tap();
await element(by.id('OnboardingContinue')).tap();
Expand Down Expand Up @@ -121,16 +124,20 @@ d('Profile and Contacts', () => {
await element(by.id('DetailsButton')).tap();
await expect(element(by.text('[email protected]'))).toExist();
await expect(element(by.text('link-value'))).not.toExist();
await element(by.id('NavigationClose')).atIndex(1).tap();
await element(by.id('NavigationClose'))
.atIndex(isIos ? 1 : 0)
.tap();

// ADD CONTACTS
await element(by.id('HeaderContactsButton')).tap();
await element(by.id('ContactsOnboardingButton')).tap();

// self
await element(by.id('AddContact')).tap();
await element(by.id('ContactURLInput')).typeText(slashtagsUrl + '\n');
await expect(element(by.id('ContactError'))).toBeVisible();
await element(by.id('ContactURLInput')).replaceText(slashtagsUrl + '\n');
await waitFor(element(by.id('ContactError')))
.toBeVisible()
.withTimeout(30000);

// Satoshi
await element(by.id('ContactURLInput')).replaceText(satoshi.url);
Expand All @@ -142,7 +149,9 @@ d('Profile and Contacts', () => {
await element(by.id('SaveContactButton')).tap();
await expect(element(by.text('WEBSITE'))).toExist();
await expect(element(by.text(satoshi.website))).toExist();
await element(by.id('NavigationBack')).atIndex(2).tap();
await element(by.id('NavigationBack'))
.atIndex(isIos ? 2 : 0)
.tap(); // ios

// Hal
await element(by.id('AddContact')).tap();
Expand All @@ -154,7 +163,9 @@ d('Profile and Contacts', () => {
await element(by.id('NameInput')).replaceText(hal.name2);
await element(by.id('SaveContactButton')).tap();
await expect(element(by.text(hal.name2))).toExist();
await element(by.id('NavigationClose')).atIndex(2).tap();
await element(by.id('NavigationClose'))
.atIndex(isIos ? 2 : 0)
.tap();

// FILTER CONTACTS
await element(by.id('HeaderContactsButton')).tap();
Expand Down

0 comments on commit 82c04b5

Please sign in to comment.