From 0b44af38eaf6f53e7abf6c1c559ab3419e7b0bbc Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Tue, 10 Oct 2023 15:46:27 -0700 Subject: Update testrunner to use new dev-env [WIP] (#1575) * Update testrunner to use new dev-env * Fix label testcase * Vendor the dev-infra scripts from the atproto repo for the dev-env server runner * Bump detox to fix the ios sim control issue * Use iphone 15 pro for tests * Ensure the reminders never trigger during tests * Skip the shell tests due to a crash bug with detox and the drawer --- __e2e__/mock-server.ts | 3 +++ __e2e__/tests/shell.test.skip.ts | 33 +++++++++++++++++++++++++++++++++ __e2e__/tests/shell.test.ts | 33 --------------------------------- 3 files changed, 36 insertions(+), 33 deletions(-) create mode 100644 __e2e__/tests/shell.test.skip.ts delete mode 100644 __e2e__/tests/shell.test.ts (limited to '__e2e__') diff --git a/__e2e__/mock-server.ts b/__e2e__/mock-server.ts index 6613f54d0..482df6ef6 100644 --- a/__e2e__/mock-server.ts +++ b/__e2e__/mock-server.ts @@ -502,6 +502,9 @@ async function main() { createdAt: new Date().toISOString(), }, ) + + // flush caches + await server.mocker.testNet.processAll() } } console.log('Ready') diff --git a/__e2e__/tests/shell.test.skip.ts b/__e2e__/tests/shell.test.skip.ts new file mode 100644 index 000000000..69619dd81 --- /dev/null +++ b/__e2e__/tests/shell.test.skip.ts @@ -0,0 +1,33 @@ +/* eslint-env detox/detox */ + +import {openApp, loginAsAlice, createServer} from '../util' + +describe('Shell', () => { + beforeAll(async () => { + await createServer('?users') + await openApp({permissions: {notifications: 'YES'}}) + }) + + it('Login', async () => { + await loginAsAlice() + await element(by.id('homeScreenFeedTabs-Following')).tap() + }) + + it('Can swipe the shelf open', async () => { + await element(by.id('homeScreen')).swipe('right', 'fast', 0.75) + await expect(element(by.id('drawer'))).toBeVisible() + await element(by.id('drawer')).swipe('left', 'fast', 0.75) + await expect(element(by.id('drawer'))).not.toBeVisible() + }) + + it('Can open the shelf by pressing the header avi', async () => { + await element(by.id('viewHeaderDrawerBtn')).tap() + await expect(element(by.id('drawer'))).toBeVisible() + }) + + it('Can navigate using the shelf', async () => { + await element(by.id('menuItemButton-Notifications')).tap() + await expect(element(by.id('drawer'))).not.toBeVisible() + await expect(element(by.id('notificationsScreen'))).toBeVisible() + }) +}) diff --git a/__e2e__/tests/shell.test.ts b/__e2e__/tests/shell.test.ts deleted file mode 100644 index 69619dd81..000000000 --- a/__e2e__/tests/shell.test.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* eslint-env detox/detox */ - -import {openApp, loginAsAlice, createServer} from '../util' - -describe('Shell', () => { - beforeAll(async () => { - await createServer('?users') - await openApp({permissions: {notifications: 'YES'}}) - }) - - it('Login', async () => { - await loginAsAlice() - await element(by.id('homeScreenFeedTabs-Following')).tap() - }) - - it('Can swipe the shelf open', async () => { - await element(by.id('homeScreen')).swipe('right', 'fast', 0.75) - await expect(element(by.id('drawer'))).toBeVisible() - await element(by.id('drawer')).swipe('left', 'fast', 0.75) - await expect(element(by.id('drawer'))).not.toBeVisible() - }) - - it('Can open the shelf by pressing the header avi', async () => { - await element(by.id('viewHeaderDrawerBtn')).tap() - await expect(element(by.id('drawer'))).toBeVisible() - }) - - it('Can navigate using the shelf', async () => { - await element(by.id('menuItemButton-Notifications')).tap() - await expect(element(by.id('drawer'))).not.toBeVisible() - await expect(element(by.id('notificationsScreen'))).toBeVisible() - }) -}) -- cgit 1.4.1