mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
test(core): Fix typing issues in tests (no-changelog) (#10244)
This commit is contained in:
@@ -31,7 +31,6 @@ describe('ProjectService', () => {
|
||||
describe('when user has roles in projects where workflow is accessible', () => {
|
||||
it('should return roles and project IDs', async () => {
|
||||
const user = await createUser();
|
||||
const secondUser = await createUser(); // @TODO: Needed only to satisfy index in legacy column
|
||||
|
||||
const firstProject = await createTeamProject('Project 1');
|
||||
const secondProject = await createTeamProject('Project 2');
|
||||
@@ -42,17 +41,15 @@ describe('ProjectService', () => {
|
||||
const workflow = await createWorkflow();
|
||||
|
||||
await sharedWorkflowRepository.insert({
|
||||
userId: user.id, // @TODO: Legacy column
|
||||
projectId: firstProject.id,
|
||||
workflowId: workflow.id,
|
||||
role: 'workflow:owner',
|
||||
});
|
||||
|
||||
await sharedWorkflowRepository.insert({
|
||||
userId: secondUser.id, // @TODO: Legacy column
|
||||
projectId: secondProject.id,
|
||||
workflowId: workflow.id,
|
||||
role: 'workflow:user',
|
||||
role: 'workflow:owner',
|
||||
});
|
||||
|
||||
const projectIds = await projectService.findProjectsWorkflowIsIn(workflow.id);
|
||||
@@ -63,9 +60,6 @@ describe('ProjectService', () => {
|
||||
|
||||
describe('when user has no roles in projects where workflow is accessible', () => {
|
||||
it('should return project IDs but no roles', async () => {
|
||||
const user = await createUser();
|
||||
const secondUser = await createUser(); // @TODO: Needed only to satisfy index in legacy column
|
||||
|
||||
const firstProject = await createTeamProject('Project 1');
|
||||
const secondProject = await createTeamProject('Project 2');
|
||||
|
||||
@@ -74,17 +68,15 @@ describe('ProjectService', () => {
|
||||
const workflow = await createWorkflow();
|
||||
|
||||
await sharedWorkflowRepository.insert({
|
||||
userId: user.id, // @TODO: Legacy column
|
||||
projectId: firstProject.id,
|
||||
workflowId: workflow.id,
|
||||
role: 'workflow:owner',
|
||||
});
|
||||
|
||||
await sharedWorkflowRepository.insert({
|
||||
userId: secondUser.id, // @TODO: Legacy column
|
||||
projectId: secondProject.id,
|
||||
workflowId: workflow.id,
|
||||
role: 'workflow:user',
|
||||
role: 'workflow:owner',
|
||||
});
|
||||
|
||||
const projectIds = await projectService.findProjectsWorkflowIsIn(workflow.id);
|
||||
|
||||
Reference in New Issue
Block a user