refactor(core): Inject dependencies into workflow services (no-changelog) (#8066)

Inject dependencies into workflow services (no-changelog)

Up next:

- ~~Make workflow services injectable~~ #8033
- ~~Inject dependencies into workflow services~~ (current)
- Consolidate workflow controllers into one
- Make workflow controller injectable
- Inject dependencies into workflow controller
This commit is contained in:
Iván Ovejero
2023-12-18 16:10:30 +01:00
committed by GitHub
parent a651089a10
commit 73d400a1bf
8 changed files with 127 additions and 80 deletions

View File

@@ -16,6 +16,8 @@ import { getAllRoles } from '../shared/db/roles';
import { createUser } from '../shared/db/users';
import { createWorkflow, createWorkflowWithTrigger } from '../shared/db/workflows';
import { createTag } from '../shared/db/tags';
import { mockInstance } from '../../shared/mocking';
import { Push } from '@/push';
let workflowOwnerRole: Role;
let owner: User;
@@ -27,6 +29,8 @@ let workflowRunner: ActiveWorkflowRunner;
const testServer = utils.setupTestServer({ endpointGroups: ['publicApi'] });
const license = testServer.license;
mockInstance(Push);
beforeAll(async () => {
const [globalOwnerRole, globalMemberRole, fetchedWorkflowOwnerRole] = await getAllRoles();