From a2f3e890e308076ab2067fc99fb24d3b4b6a28c2 Mon Sep 17 00:00:00 2001 From: Laurin Quast Date: Fri, 17 Jan 2025 15:58:21 +0100 Subject: [PATCH] assign role that could do these things --- integration-tests/tests/api/target/crud.spec.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/integration-tests/tests/api/target/crud.spec.ts b/integration-tests/tests/api/target/crud.spec.ts index de7eef843e..15fc5f1df7 100644 --- a/integration-tests/tests/api/target/crud.spec.ts +++ b/integration-tests/tests/api/target/crud.spec.ts @@ -140,8 +140,12 @@ test.concurrent( test.concurrent('organization member user can create a target', async ({ expect }) => { const { createOrg } = await initSeed().createOwner(); const { ownerEmail: orgMemberEmail, ownerToken: orgMemberToken } = await initSeed().createOwner(); - const { createProject, inviteMember, joinMemberUsingCode } = await createOrg(); - const inviteMemberResult = await inviteMember(orgMemberEmail); + const { createProject, inviteMember, joinMemberUsingCode, organization } = await createOrg(); + const inviteMemberResult = await inviteMember( + orgMemberEmail, + undefined, + organization.memberRoles?.find(role => role.name === 'Admin')?.id, + ); if (inviteMemberResult.ok == null) { throw new Error('Invite did not succeed' + JSON.stringify(inviteMemberResult));