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
Next Next commit
Timeout 3min
  • Loading branch information
amaury1093 committed Apr 10, 2020
commit dcb2797154b20400ec875c400056b0b336653f77
2 changes: 1 addition & 1 deletion e2e/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import adapter from 'detox/runners/jest/adapter';

const config = require('../package.json').detox;

jest.setTimeout(120000);
jest.setTimeout(180000);
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
jasmine.getEnv().addReporter(adapter);
Expand Down
8 changes: 1 addition & 7 deletions e2e/locationDenied.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Sh**t! I Smoke. If not, see <http:https://www.gnu.org/licenses/>.

import { by, element, expect, waitFor } from 'detox';
import { by, element, expect } from 'detox';
import { reloadApp } from 'detox-expo-helpers';

import { testIds } from '../App/util/testId';
Expand All @@ -25,12 +25,6 @@ describe('Location denied', () => {
permissions: { location: 'never' },
});

// FIXME Without the following timeout, I get:
// "This is taking much longer than it should. You might want to check your internet connectivity."
waitFor(element(by.id(testIds.Error.screen)))
.toExist()
.withTimeout(20000);

await expect(element(by.id(testIds.Error.screen))).toBeVisible();
});

Expand Down