-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
57 changed files
with
2,969 additions
and
1,879 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from '@react-native-async-storage/async-storage/jest/async-storage-mock'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import { | ||
checkComplete, | ||
markComplete, | ||
completeOnboarding, | ||
launchAndWait, | ||
} from './helpers'; | ||
|
||
d = checkComplete('widgets-1') ? describe.skip : describe; | ||
|
||
d('Widgets', () => { | ||
beforeAll(async () => { | ||
await completeOnboarding(); | ||
}); | ||
|
||
beforeEach(async () => { | ||
await launchAndWait(); | ||
}); | ||
|
||
// General | ||
// - can add a widget | ||
// - can edit a widget | ||
// - can delete a widget | ||
|
||
it('Can add/edit/remove a widget', async () => { | ||
if (checkComplete('widgets-1')) { | ||
return; | ||
} | ||
|
||
// add price widget | ||
await element(by.id('WidgetsAdd')).tap(); | ||
await element(by.id('ContinueWidgets-0')).tap(); | ||
await element(by.id('ContinueWidgets-1')).tap(); | ||
await element(by.id('PriceWidget')).tap(); | ||
await waitFor(element(by.id('WidgetEdit'))) | ||
.toBeVisible() | ||
.withTimeout(20000); | ||
await expect(element(by.text('Default'))).toBeVisible(); | ||
await element(by.id('WidgetEdit')).tap(); | ||
await element(by.id('WidgetEditField-BTC/EUR')).tap(); | ||
await element(by.id('WidgetEditScrollView')).scrollTo('bottom'); | ||
await element(by.id('PriceWidgetSetting-1W')).tap(); | ||
await element(by.id('WidgetEditSource')).tap(); | ||
await element(by.id('WidgetEditPreview')).tap(); | ||
await element(by.id('WidgetSave')).tap(); | ||
await element(by.id('WalletsScrollView')).scroll(200, 'down', NaN, 0.85); | ||
await expect(element(by.id('PriceWidget'))).toBeVisible(); | ||
await expect(element(by.id('PriceWidgetRow-BTC/EUR'))).toBeVisible(); | ||
await expect(element(by.id('PriceWidgetSource'))).toBeVisible(); | ||
|
||
// edit price widget | ||
await element(by.id('WidgetsEdit')).tap(); | ||
await element(by.id('WidgetActionEdit')).tap(); | ||
await expect(element(by.text('Custom'))).toBeVisible(); | ||
await element(by.id('WidgetEdit')).tap(); | ||
await element(by.id('WidgetEditReset')).tap(); | ||
await element(by.id('WidgetEditPreview')).tap(); | ||
await element(by.id('WidgetSave')).tap(); | ||
await expect(element(by.id('PriceWidget'))).toBeVisible(); | ||
await expect(element(by.id('PriceWidgetRow-BTC/EUR'))).not.toBeVisible(); | ||
await expect(element(by.id('PriceWidgetSource'))).not.toBeVisible(); | ||
|
||
// delete price widget | ||
await element(by.id('WidgetsEdit')).tap(); | ||
await element(by.id('WidgetActionDelete')).tap(); | ||
await element(by.text('Yes, Delete')).tap(); | ||
await expect(element(by.id('PriceWidget'))).not.toBeVisible(); | ||
|
||
markComplete('widgets-1'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.