Skip to content

Commit

Permalink
Sections: Eliminate feature tests presuming navigation between rooms
Browse files Browse the repository at this point in the history
Now that we're using the gizmo, it doesn't make sense to have end-to-end
tests that presume every Section will include functioality to navigate
between Sections.

This also gets rid of all the unused step definitions.
  • Loading branch information
zspencer committed Dec 4, 2023
1 parent a035c67 commit 8209187
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 160 deletions.
45 changes: 0 additions & 45 deletions features/rooms/entering-rooms.feature

This file was deleted.

9 changes: 0 additions & 9 deletions features/steps/deployment_steps.js

This file was deleted.

4 changes: 0 additions & 4 deletions features/steps/generic_step.js

This file was deleted.

17 changes: 0 additions & 17 deletions features/steps/invitation_steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,20 +129,3 @@ Then(
);
},
);
Then(
"all other Invitations to {actor} for {a} {space} no longer have {a} status of {string}",
/**
* @param {Actor} actor
* @param {Space} space
* @param {string} status
*/
function (actor, _a, space, _a2, status) {
return actor
.signIn(this.driver, space)
.then(() => new MembershipsIndexPage(this.driver, space).visit())
.then((page) => page.invitations({ to: actor }))
.then((invitations) =>
assert(invitations.every((i) => i.status !== status)),
);
},
);
41 changes: 1 addition & 40 deletions features/steps/room_steps.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,4 @@
import { Given, When, Then } from "@cucumber/cucumber";
import {
SpacePage,
SpaceEditPage,
RoomEditPage,
RoomPage,
} from "../harness/Pages.js";
import { RoomCardComponent } from "../harness/Components.js";
import {
Space,
Room,
Actor,
linkParameters,
AccessLevel,
} from "../lib/index.js";
import assert$0 from "assert";
const assert = assert$0.strict;
import { Given, Then } from "@cucumber/cucumber";
Given(
"{a} {space} with {a} {accessLevel} {room}",
async function (_, space, _1, accessLevel, room) {
Expand All @@ -29,30 +13,7 @@ Given(
},
);

When("the {actor} taps the {room} in the Room Picker", function (actor, room) {
return this.space.roomCard(room).enter();
});
Then("the {actor} is placed in the {room}", async function (actor, room) {
const roomPage = new RoomPage(this.driver, room);
assert(await roomPage.hasContent(room.name));
});
Then("the {actor} is not placed in the {room}", function (actor, room) {
// Write code here that turns the phrase above into concrete actions
return "pending";
});

Then("the {space} has a {room}", function (space, room) {
// Write code here that turns the phrase above into concrete actions
return "pending";
});
Then(
"the {actor} does not see the {room}'s Door",
async function (actor, room) {
const card = new RoomCardComponent(this.driver, room);
assert(!(await card.isDisplayed()));
},
);
Then("{a} {room} is {accessLevel}", async function (_a, room, accessLevel) {
const { space } = linkParameters({ room, accessLevel });
await new SpacePage(this.driver, space).visit();
});
34 changes: 2 additions & 32 deletions features/steps/space_steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@ Given(
);
},
);
Given("the {actor} is on the {space} Dashboard", async function (actor, space) {
this.space = new SpacePage(this.driver, space);
await this.space.visit();
});

When(
"{a} {actor} visits {a} {space}",
/**
Expand All @@ -68,36 +65,9 @@ When(
return this.space.visit();
},
);
Given(
"the {actor} is in the {space} and in the {room}",
function (actor, space, room) {
this.space = new SpacePage(this.driver, space);
return this.space
.visit()
.then((spacePage) => spacePage.roomCard(room).enter());
},
);

When("a {actor} adds a {room}", function (actor, room) {
const { space } = linkParameters({ actor, room });
const page = new SpaceEditPage(this.driver, space);
return page.visit().then((p) => p.createRoom({ room }));
});
When(
"the {actor} visit the {space}, {room} full URL",
function (actor, space, room) {
this.space = new SpacePage(this.driver, space);
room.space = space;
return new RoomPage(this.driver, room).visit();
},
);
Then(
"the {space} is available at the {string} domain",
function (space, string) {
// Write code here that turns the phrase above into concrete actions
return "pending";
},
);
Then("there is a {space}", function (space) {
// Write code here that turns the phrase above into concrete actions
return "pending";
});
13 changes: 0 additions & 13 deletions features/steps/utility_steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,6 @@ import { When, Then } from "@cucumber/cucumber";
import { SpaceEditPage } from "../harness/Pages.js";
import { Actor, Space } from "../lib/index.js";

When("a Space Owner adds a Utility to their Space", async function () {
this.actor = new Actor("Space Owner", "space-owner@example.com");
await this.actor.signIn(this.driver);
this.space = new Space({ name: "System Test" });
const page = new SpaceEditPage(this.driver, this.space);
await page.visit().then((p) => p.addUtility("stripe"));
});

Then("the Space Owner can configure that Utility for their Space", function () {
// Write code here that turns the phrase above into concrete actions
return "pending";
});

Then("that Utility can not be used by Furniture in the Space", function () {
// Write code here that turns the phrase above into concrete actions
return "pending";
Expand Down

0 comments on commit 8209187

Please sign in to comment.