Skip to content

Commit

Permalink
add BuildingInformation basic system acceptance test
Browse files Browse the repository at this point in the history
rename files to corresponding USs #31
  • Loading branch information
ritchellesap committed Mar 25, 2020
1 parent cb4e5ed commit 596c0ec
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion e2e/campus-toggle.spec.js → e2e/user-story-1.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ beforeAll(async () => {
await reloadApp();
});

describe("CampusToggle: Toggling between campuses", () => {
describe("CampusToggle component", () => {
it("should show the campus toggles", async () => {
await expect(element(by.id("SGWButton"))).toBeVisible();
await expect(element(by.id("loyolaButton"))).toBeVisible();
Expand Down
34 changes: 34 additions & 0 deletions e2e/user-story-4.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
const { reloadApp } = require("detox-expo-helpers");
import { BuildingId } from "../src/types/main";

beforeAll(async () => {
await reloadApp();
});

describe("BuildingInformation component", () => {
const EV = BuildingId[BuildingId.EV];
const polygonEV = "polygon" + EV;

it("should show minimal building information0", async () => {
// await expect(element(by.id("mapView"))).toExist();
// await console.log("mapView exists");
// await expect(element(by.id("mapView"))).toBeVisible();
// await console.log("mapView is visible");
await expect(element(by.id(polygonEV))).toBeNotVisible();
await element(by.id("mapView")).pinchWithAngle("outward", "slow", 0);
// await element(by.id("mapView")).pinchWithAngle("outward", "slow", 0);
await console.log("pinched and zoomed into mapView");
// await expect(element(by.id(polygonEV))).toBeVisible();
// await console.log("EV is visible");
await element(by.id(polygonEV)).tap();
await console.log("tapped on EV");
// await expect(element(by.id(polygonH))).toExist();
// await expect(element(by.id(polygonH))).toBeNotVisible();
// await element(by.id(polygonH)).pinchWithAngle("inward", "slow", 0);
// await console.log("polygonH exists");
// await element(by.id("poly"))
// await element(by.id("polygon" + H)).longPress();
// console.log("tapped on H");
// await expect(element(by.id("polygon" + H))).toExist();
});
});
1 change: 1 addition & 0 deletions src/screens/map-screen/map-screen.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ const MapScreen = () => {
<RegionProvider value={currentRegion}>
<View style={styles.container}>
<MapView
testID={"mapView"}
ref={mapRef}
style={styles.map}
provider={PROVIDER_GOOGLE}
Expand Down

0 comments on commit 596c0ec

Please sign in to comment.