Skip to content

Commit

Permalink
test: Be more explicit in negative case
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Oct 10, 2023
1 parent 05879d3 commit d0e14f9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ Feature: Database triggers

@regression @add-user-trigger
Scenario: Adding a user to Planx - without Templates team
Given the Templates team does not exist
When a new user is added
Then they are not granted access to the Templates team
6 changes: 6 additions & 0 deletions e2e/tests/api-driven/src/hasuraTriggers/steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ Given("the Templates team exists", async function (this) {
this.templatesTeamId = templatesTeamId;
});

Given("the Templates team does not exist", async function (this) {
const templatesTeam = await $admin.team.getBySlug("templates")

assert.equal(templatesTeam, undefined, "Templates team exists but should not be defined");
});

When<CustomWorld>("a new user is added", async function (this) {
const userId = await createUser();
const user = await $admin.user.getById(userId);
Expand Down

0 comments on commit d0e14f9

Please sign in to comment.