diff --git a/__e2e__/tests/login.test.ts b/__e2e__/tests/login.test.ts index 788016db67..b4cedef6c4 100644 --- a/__e2e__/tests/login.test.ts +++ b/__e2e__/tests/login.test.ts @@ -1,5 +1,7 @@ /* eslint-env detox/detox */ +import {describe, beforeAll, it} from '@jest/globals' +import {expect} from 'detox' import {openApp, login, createServer} from '../util' describe('Login', () => { @@ -10,6 +12,8 @@ describe('Login', () => { }) it('As Alice, I can login', async () => { + await element(by.id('e2eOpenLoggedOutView')).tap() + await expect(element(by.id('signInButton'))).toBeVisible() await login(service, 'alice', 'hunter2', { takeScreenshots: true, diff --git a/src/view/com/testing/TestCtrls.e2e.tsx b/src/view/com/testing/TestCtrls.e2e.tsx index 41abc25d34..e1e8994882 100644 --- a/src/view/com/testing/TestCtrls.e2e.tsx +++ b/src/view/com/testing/TestCtrls.e2e.tsx @@ -5,6 +5,7 @@ import {useModalControls} from '#/state/modals' import {useQueryClient} from '@tanstack/react-query' import {useSessionApi} from '#/state/session' import {useSetFeedViewPreferencesMutation} from '#/state/queries/preferences' +import {useLoggedOutViewControls} from '#/state/shell/logged-out' /** * This utility component is only included in the test simulator @@ -19,6 +20,7 @@ export function TestCtrls() { const {logout, login} = useSessionApi() const {openModal} = useModalControls() const {mutate: setFeedViewPref} = useSetFeedViewPreferencesMutation() + const {setShowLoggedOut} = useLoggedOutViewControls() const onPressSignInAlice = async () => { await login({ service: 'http://localhost:3000', @@ -95,6 +97,12 @@ export function TestCtrls() { accessibilityRole="button" style={BTN} /> + setShowLoggedOut(true)} + accessibilityRole="button" + style={BTN} + /> ) }