Skip to content

Commit

Permalink
chore: Fix e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gmaclennan committed Mar 28, 2020
1 parent 3533042 commit 6701efe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
15 changes: 10 additions & 5 deletions e2e/firstTest.spec.js
Expand Up @@ -4,16 +4,21 @@ describe("Mapeo", () => {
});

it("should have add button on home screen", async () => {
await waitFor(element(by.id("mapboxMapView")))
.toBeVisible()
.withTimeout(10000);
await expect(element(by.id("addButtonMap"))).toBeVisible();
});

it("should show 'choose what is happening' screen after tapping add", async () => {
await waitFor(element(by.id("mapboxMapView")))
.toBeVisible()
.withTimeout(10000);
await element(by.id("addButtonMap")).tap();
await expect(element(by.text("Choose what is happening"))).toBeVisible();
});

// it("should show world screen after tap", async () => {
// await element(by.id("world_button")).tap();
// await expect(element(by.text("World!!!"))).toBeVisible();
// });
});

function sleep(milliseconds) {
return new Promise(resolve => setTimeout(resolve, milliseconds));
}
1 change: 1 addition & 0 deletions src/frontend/sharedComponents/MapView.js
Expand Up @@ -249,6 +249,7 @@ class MapView extends React.Component<Props, State> {
</View>
) : (
<MapboxGL.MapView
testID="mapboxMapView"
style={{ flex: 1 }}
ref={this.handleMapViewRef}
maxZoomLevel={22}
Expand Down

0 comments on commit 6701efe

Please sign in to comment.