Skip to content
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

test: Add detox with a simple e2e test #396

Merged
merged 20 commits into from
Apr 10, 2020
Prev Previous commit
reloadApp beforeAll
  • Loading branch information
amaury1093 committed Apr 10, 2020
commit 68c9d010f194428ab820dc4a153fb4dafa133a24
24 changes: 11 additions & 13 deletions e2e/locationDenied.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,17 @@ import { reloadApp } from 'detox-expo-helpers';
import { testIds } from '../App/util/testId';

describe('Location denied', () => {
it(
'should go to Error page if location not allowed',
async () => {
await reloadApp({
permissions: { location: 'never' },
});

console.log('RELOADED');

await expect(element(by.id(testIds.Error.screen))).toBeVisible();
},
30 * 60 * 1000
);
// Load the app first, so that subsequent tests are faster (and don't timeout)
beforeAll(async () => {
await reloadApp();
});

it('should go to Error page if location not allowed', async () => {
await reloadApp({
permissions: { location: 'never' },
});
await expect(element(by.id(testIds.Error.screen))).toBeVisible();
});

it('should show the error details', async () => {
await reloadApp({
Expand Down