-
Notifications
You must be signed in to change notification settings - Fork 3
Update settings_2 for #342 fix + small refactor #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,13 +34,14 @@ describe('@settings - Settings', () => { | |
| describe('General', () => { | ||
| ciIt('@settings_1 - Can switch local currency', async () => { | ||
| // switch to local currency | ||
| const fiatSymbol = await elementByIdWithin('TotalBalance-primary','MoneyFiatSymbol'); | ||
| try { | ||
| await tap('TotalBalance'); | ||
| await expect(await elementsById('MoneyFiatSymbol')[1]).toHaveText('$'); | ||
| await expect(fiatSymbol).toHaveText('$'); | ||
| } catch { | ||
| await tap('TotalBalance'); | ||
| } | ||
| await expect(await elementsById('MoneyFiatSymbol')[1]).toHaveText('$'); | ||
| await expect(fiatSymbol).toHaveText('$'); | ||
|
|
||
| // - change settings (currency to EUR) // | ||
| await tap('HeaderMenu'); | ||
|
|
@@ -52,12 +53,12 @@ describe('@settings - Settings', () => { | |
| await eur_opt.click(); | ||
| await doNavigationClose(); | ||
|
|
||
| await expect(await elementsById('MoneyFiatSymbol')[1]).toHaveText('€'); | ||
| await expect(fiatSymbol).toHaveText('€'); | ||
|
||
|
|
||
| // switch back to sats | ||
| await tap('TotalBalance'); | ||
| await sleep(500); | ||
| await expect(await elementsById('MoneyFiatSymbol')[1]).toHaveText('₿'); | ||
| await expect(fiatSymbol).toHaveText('₿'); | ||
|
piotr-iohk marked this conversation as resolved.
|
||
|
|
||
| // switch to USD | ||
| await tap('HeaderMenu'); | ||
|
|
@@ -71,18 +72,18 @@ describe('@settings - Settings', () => { | |
| }); | ||
|
|
||
| ciIt('@settings_2 - Can switch Bitcoin Unit', async () => { | ||
| const fiatSymbol = (await elementsById('MoneyFiatSymbol'))[1]; | ||
| const balance = (await elementsById('MoneyText'))[1]; | ||
| const unitRow = await elementByIdWithin('UnitSettings', 'Value'); | ||
|
|
||
| const fiatSymbol = await elementByIdWithin('TotalBalance-primary','MoneyFiatSymbol'); | ||
| const balance = await elementByIdWithin('TotalBalance-primary','MoneyText'); | ||
|
|
||
| await tap('HeaderMenu'); | ||
| await tap('DrawerSettings'); | ||
| await tap('GeneralSettings'); | ||
|
|
||
| // switch to USD | ||
| await tap('UnitSettings'); | ||
| await tap('USD'); | ||
| await tap('NavigationBack'); | ||
| const unitRow = await elementByIdWithin('UnitSettings', 'Value'); | ||
| await expect(unitRow).toHaveText('USD'); | ||
| await doNavigationClose(); | ||
| await expect(fiatSymbol).toHaveText('$'); | ||
|
|
@@ -109,9 +110,7 @@ describe('@settings - Settings', () => { | |
| await tap('NavigationBack'); | ||
| await expect(unitRow).toHaveText('Bitcoin'); | ||
| await doNavigationClose(); | ||
| // https://github.com/synonymdev/bitkit-android/issues/342 | ||
| // await expect(balance).toHaveText('0.00000000'); | ||
| await expect(balance).toHaveText('0'); | ||
| await expect(balance).toHaveText('0.00000000'); | ||
| }); | ||
|
|
||
| ciIt('@settings_3 - Can switch transaction speed', async () => { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.