diff --git a/qa-core/src/config/internal-api/TestConfiguration/userManagement.ts b/qa-core/src/config/internal-api/TestConfiguration/userManagement.ts index 17fe5e0b0f..0bc8fd7b66 100644 --- a/qa-core/src/config/internal-api/TestConfiguration/userManagement.ts +++ b/qa-core/src/config/internal-api/TestConfiguration/userManagement.ts @@ -63,8 +63,9 @@ export default class UserManagementApi { const response = await this.api.post(`/global/users/multi/invite`, { body }) const json = await response.json() expect(response).toHaveStatusCode(200) - expect(json.created.successful.length).toEqual(body.length) - expect(json.created.unsuccessful.length).toEqual(0) + expect(json.unsuccessful.length).toEqual(0) + expect(json.successful.length).toEqual(body.length) + return [response, json] } diff --git a/qa-core/src/config/internal-api/fixtures/userManagement.ts b/qa-core/src/config/internal-api/fixtures/userManagement.ts index 6ada85bb49..035f6162f1 100644 --- a/qa-core/src/config/internal-api/fixtures/userManagement.ts +++ b/qa-core/src/config/internal-api/fixtures/userManagement.ts @@ -65,12 +65,6 @@ export const generateInviteUser = (): Object[] => { return [{ email: `pedro+${randomId}@budibase.com`, userInfo: { - admin: { - global: true - }, - builder: { - global: true - }, userGroups: [] } }] diff --git a/qa-core/src/tests/internal-api/userManagement/userManagement.spec.ts b/qa-core/src/tests/internal-api/userManagement/userManagement.spec.ts index 62d27ec2a4..c18b6aaeff 100644 --- a/qa-core/src/tests/internal-api/userManagement/userManagement.spec.ts +++ b/qa-core/src/tests/internal-api/userManagement/userManagement.spec.ts @@ -26,7 +26,7 @@ describe("Internal API - User Management & Permissions", () => { const [devResponse, devData] = await config.userManagement.addUsers(generateDeveloper()) const [userResponse, userData] = await config.userManagement.addUsers(generateAppUser()) - const [invitedUserResponse, invitedUserData] = await config.userManagement.addUsers(generateInviteUser()) + const [invitedUserResponse, invitedUserData] = await config.userManagement.inviteUser(generateInviteUser()) const [allUsersResponse, allUsersData] = await config.userManagement.getAllUsers() expect(allUsersData.length).toEqual(4)