Remove the EntityDataConsumer spec dependency on organization inherited role (#17667)

This commit is contained in:
Aniket Katkar 2024-09-03 12:26:06 +05:30 committed by GitHub
parent 0a9e0d00d4
commit 73f2cad53a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -62,6 +62,28 @@ entities.forEach((EntityClass) => {
const { apiContext, afterAction } = await performAdminLogin(browser);
await user.create(apiContext);
const dataConsumerRoleResponse = await apiContext.get(
'/api/v1/roles/name/DataConsumer'
);
const dataConsumerRole = await dataConsumerRoleResponse.json();
await user.patch({
apiContext,
patchData: [
{
op: 'add',
path: '/roles/0',
value: {
id: dataConsumerRole.id,
type: 'role',
name: dataConsumerRole.name,
},
},
],
});
await EntityDataClass.preRequisitesForTests(apiContext);
await entity.create(apiContext);
await afterAction();