Skip to content

Commit

Permalink
Update E2E specs
Browse files Browse the repository at this point in the history
Since there are multiple "default" options on the screen now,
I've specified to tap the first one. I also had to make sure to
scroll the screen before tapping the show picker button.
  • Loading branch information
sidorchukandrew committed Dec 16, 2024
1 parent f6532d1 commit 22f3d0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions example/e2e/detoxTest.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ describe('e2e tests', () => {
await expect(elementById('overriddenTzName')).toHaveText('Europe/Prague');

let timeZone = 'America/Vancouver';
await elementById('DateTimePickerScrollView').scrollTo('bottom');
await waitFor(elementById('timezone')).toBeVisible().withTimeout(1000);
await userSwipesTimezoneListUntilDesiredIsVisible(timeZone);

Expand All @@ -192,6 +193,7 @@ describe('e2e tests', () => {

it('daylight saving should work properly', async () => {
let timeZone = 'America/Vancouver';
await elementById('DateTimePickerScrollView').scrollTo('bottom');
await waitFor(elementById('timezone')).toBeVisible().withTimeout(1000);
await userSwipesTimezoneListUntilDesiredIsVisible(timeZone);

Expand Down
3 changes: 2 additions & 1 deletion example/e2e/utils/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async function userOpensPicker({
await elementById('DateTimePickerScrollView').scrollTo('top');

await element(by.text(mode)).tap();
await element(by.text(display)).tap();
await element(by.text(display)).atIndex(0).tap();
if (interval) {
await element(by.text(String(interval))).tap();
}
Expand All @@ -47,6 +47,7 @@ async function userOpensPicker({
if (firstDayOfWeek) {
await element(by.id(firstDayOfWeek)).tap();
}
await elementById('DateTimePickerScrollView').scrollTo('bottom');
await element(by.id('showPickerButton')).tap();
}

Expand Down

0 comments on commit 22f3d0e

Please sign in to comment.