Skip to content

Commit

Permalink
Optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
ivov committed Jul 31, 2024
1 parent f2e5c2e commit 4553db9
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 18 deletions.
20 changes: 13 additions & 7 deletions packages/cli/test/integration/publicApi/executions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -453,13 +453,19 @@ describe('GET /executions', () => {
/**
* Arrange
*/
const firstProject = await createTeamProject();
const secondProject = await createTeamProject();
const firstWorkflow = await createWorkflow({}, firstProject);
const secondWorkflow = await createWorkflow({}, secondProject);
const firstExecution = await createExecution({}, firstWorkflow);
const secondExecution = await createExecution({}, firstWorkflow);
await createExecution({}, secondWorkflow);
const [firstProject, secondProject] = await Promise.all([
createTeamProject(),
createTeamProject(),
]);
const [firstWorkflow, secondWorkflow] = await Promise.all([
createWorkflow({}, firstProject),
createWorkflow({}, secondProject),
]);
const [firstExecution, secondExecution, _] = await Promise.all([
createExecution({}, firstWorkflow),
createExecution({}, firstWorkflow),
createExecution({}, secondWorkflow),
]);

/**
* Act
Expand Down
28 changes: 17 additions & 11 deletions packages/cli/test/integration/publicApi/users.ee.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,23 @@ describe('With license unlimited quota:users', () => {
/**
* Arrange
*/
const owner = await createOwner({ withApiKey: true });
const firstMember = await createUser({ role: 'global:member' });
const secondMember = await createUser({ role: 'global:member' });
const thirdMember = await createUser({ role: 'global:member' });

const firstProject = await createTeamProject();
const secondProject = await createTeamProject();

await linkUserToProject(firstMember, firstProject, 'project:admin');
await linkUserToProject(secondMember, firstProject, 'project:viewer');
await linkUserToProject(thirdMember, secondProject, 'project:admin');
const [owner, firstMember, secondMember, thirdMember] = await Promise.all([
createOwner({ withApiKey: true }),
createUser({ role: 'global:member' }),
createUser({ role: 'global:member' }),
createUser({ role: 'global:member' }),
]);

const [firstProject, secondProject] = await Promise.all([
createTeamProject(),
createTeamProject(),
]);

await Promise.all([
linkUserToProject(firstMember, firstProject, 'project:admin'),
linkUserToProject(secondMember, firstProject, 'project:viewer'),
linkUserToProject(thirdMember, secondProject, 'project:admin'),
]);

/**
* Act
Expand Down

0 comments on commit 4553db9

Please sign in to comment.