diff --git a/e2e/tests/api-driven/src/hasuraTriggers/hasuraTriggers.feature b/e2e/tests/api-driven/src/hasuraTriggers/hasuraTriggers.feature index aa9703b8c3..ab3c9b8e0f 100644 --- a/e2e/tests/api-driven/src/hasuraTriggers/hasuraTriggers.feature +++ b/e2e/tests/api-driven/src/hasuraTriggers/hasuraTriggers.feature @@ -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 \ No newline at end of file diff --git a/e2e/tests/api-driven/src/hasuraTriggers/steps.ts b/e2e/tests/api-driven/src/hasuraTriggers/steps.ts index 389fa259a3..e76d02c591 100644 --- a/e2e/tests/api-driven/src/hasuraTriggers/steps.ts +++ b/e2e/tests/api-driven/src/hasuraTriggers/steps.ts @@ -22,6 +22,16 @@ 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("a new user is added", async function (this) { const userId = await createUser(); const user = await $admin.user.getById(userId);