Skip to content

Commit

Permalink
chore(root): Release 2024-11-25 08:06 (#7121)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Nov 25, 2024
2 parents bcc8034 + a7c89ce commit 1446026
Show file tree
Hide file tree
Showing 28 changed files with 722 additions and 34 deletions.
1 change: 1 addition & 0 deletions .github/workflows/reusable-web-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ jobs:
echo REACT_APP_CLERK_PUBLISHABLE_KEY=${{ inputs.clerk_publishable_key }} >> .env
echo REACT_APP_IS_EE_AUTH_ENABLED=${{ inputs.clerk_is_ee_auth_enabled }} >> .env
echo REACT_APP_NEW_DASHBOARD_URL=${{ inputs.new_dashboard_url }} >> .env
echo REACT_APP_PLAIN_SUPPORT_CHAT_APP_ID=${{secrets.REACT_APP_PLAIN_SUPPORT_CHAT_APP_ID}} >> .env
- name: Envsetup
working-directory: apps/web
run: npm run envsetup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ export class GetNotificationTemplates {
command.environmentId,
command.page * command.limit,
command.limit,
command.query
command.query,
true
);

const workflows = await this.updateHasActiveIntegrationFlag(list, command);
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/app/workflows-v1/workflow-v1.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export class WorkflowControllerV1 {
data: body.data,
__source: query?.__source,
type: WorkflowTypeEnum.REGULAR,
origin: WorkflowOriginEnum.NOVU_CLOUD,
origin: WorkflowOriginEnum.NOVU_CLOUD_V1,
})
);
}
Expand Down
57 changes: 57 additions & 0 deletions apps/api/src/app/workflows-v2/workflow.controller.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,63 @@ describe('Workflow Controller E2E API Testing', () => {
const idsDeduplicated = buildIdSet(listWorkflowResponse1, listWorkflowResponse2);
expect(idsDeduplicated.size).to.be.equal(10);
});

async function createV1Workflow() {
const novuRestResult = await workflowsClient.createWorkflowsV1({
name: `test api template: ${generateUUID()}`,
description: 'This is a test description',
tags: ['test-tag-api'],
notificationGroupId: session.notificationGroups[0]._id,
steps: [],
});
if (!novuRestResult.isSuccessResult()) {
throw new Error(`Failed to create V1 Workflow ${JSON.stringify(novuRestResult.error)}`);
}

return novuRestResult.value;
}

async function searchWorkflowsV1(workflowId?: string) {
const novuRestResult = await workflowsClient.searchWorkflowsV1(workflowId);
if (!novuRestResult.isSuccessResult()) {
throw new Error('should not fail to get list ');
}
const data = novuRestResult.value;

return data;
}

async function getV2WorkflowIdAndExternalId(uuid: string) {
await create10Workflows(uuid);
const listWorkflowResponse: ListWorkflowResponse = await getListWorkflows(uuid, 0, 5);
const workflowV2Id = listWorkflowResponse.workflows[0]._id;
const { workflowId } = listWorkflowResponse.workflows[0];

return { workflowV2Id, workflowId, name: listWorkflowResponse.workflows[0].name };
}

async function create3V1Workflows() {
let workflowV1Created = await createV1Workflow();
workflowV1Created = await createV1Workflow();

return await createV1Workflow();
}

it('old list endpoint should not retreive the new workflow', async () => {
const uuid = generateUUID();
const { workflowV2Id, name } = await getV2WorkflowIdAndExternalId(uuid);
const workflowV1Created = await create3V1Workflows();
let workflowsFromSearch = await searchWorkflowsV1(workflowV1Created?.name);
expect(workflowsFromSearch[0]._id).to.deep.eq(workflowV1Created._id);

workflowsFromSearch = await searchWorkflowsV1();
const ids = workflowsFromSearch?.map((workflow) => workflow._id);
const found = ids?.some((localId) => localId === workflowV2Id);
expect(found, `FoundIds:${ids} SearchedID:${workflowV2Id}`).to.be.false;

workflowsFromSearch = await searchWorkflowsV1(name);
expect(workflowsFromSearch?.length).to.eq(0);
});
});

describe('Promote Workflow Permutations', () => {
Expand Down
1 change: 1 addition & 0 deletions apps/dashboard/public/images/auth/background.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 1446026

Please sign in to comment.