Skip to content

Commit

Permalink
fix: merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
jainpawan21 committed Oct 1, 2023
2 parents 39017c1 + 8e2dbea commit 0650ba8
Show file tree
Hide file tree
Showing 42 changed files with 343 additions and 1,461 deletions.
2 changes: 1 addition & 1 deletion .github/actions/docker/build-api/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ runs:
docker run --network=host --name api -dit --env NODE_ENV=test ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG
docker run --network=host appropriate/curl --retry 10 --retry-delay 5 --retry-connrefused http://localhost:1337/v1/health-check | grep 'ok'
echo "::set-output name=IMAGE::ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG"
echo "IMAGE=ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG" >> $GITHUB_OUTPUT
- name: Optionally tag docker image
if: ${{ inputs.tag }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/docker/build-worker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ runs:
docker run --network=host --name worker -dit --env NODE_ENV=test ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG
docker run --network=host appropriate/curl --retry 10 --retry-delay 5 --retry-connrefused http://localhost:1342/v1/health-check | grep 'ok'
echo "::set-output name=IMAGE::ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG"
echo "IMAGE=ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG" >> $GITHUB_OUTPUT
- name: Optionally tag docker image
if: ${{ inputs.tag }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dev-deploy-embed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ jobs:
docker tag ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:dev
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:dev
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG
echo "::set-output name=IMAGE::ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG"
echo "IMAGE=ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG" >> $GITHUB_OUTPUT
2 changes: 1 addition & 1 deletion .github/workflows/dev-deploy-inbound-mail.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:dev
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG
echo "::set-output name=IMAGE::ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG"
echo "IMAGE=ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG" >> $GITHUB_OUTPUT
- name: Checkout cloud infra
uses: actions/checkout@master
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dev-deploy-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
-t ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG \
-t ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:dev \
-f apps/web/Dockerfile .
echo "::set-output name=IMAGE::ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG"
echo "IMAGE=ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v3
if: failure()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dev-deploy-webhook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:dev
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG
echo "::set-output name=IMAGE::ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG"
echo "IMAGE=ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG" >> $GITHUB_OUTPUT
- name: Checkout cloud infra
uses: actions/checkout@master
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dev-deploy-widget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
docker tag ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:dev
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:dev
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG
echo "::set-output name=IMAGE::ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG"
echo "IMAGE=ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v3
if: failure()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dev-deploy-ws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
docker tag ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:dev
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:dev
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG
echo "::set-output name=IMAGE::ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG"
echo "IMAGE=ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG" >> $GITHUB_OUTPUT
- name: Render Amazon ECS task definition
id: render-container
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/jarvis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
body="${body//'%'/'%25'}"
body="${body//$'\n'/'%0A'}"
body="${body//$'\r'/'%0D'}"
echo "::set-output name=body::$body"
echo "body=$body" >> $GITHUB_OUTPUT
- name: Add comment
uses: peter-evans/create-or-update-comment@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prod-deploy-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ jobs:
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:latest
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG
echo "::set-output name=IMAGE::ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG"
echo "IMAGE=ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG" >> $GITHUB_OUTPUT
deploy_prod_api_eu:
needs: build_prod_image
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prod-deploy-embed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,4 @@ jobs:
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:latest
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG
echo "::set-output name=IMAGE::ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG"
echo "IMAGE=ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG" >> $GITHUB_OUTPUT
2 changes: 1 addition & 1 deletion .github/workflows/prod-deploy-inbound-mail.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:latest
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG
echo "::set-output name=IMAGE::ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG"
echo "IMAGE=ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG" >> $GITHUB_OUTPUT
deploy_prod_inbound_mail_eu:
needs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prod-deploy-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,4 +217,4 @@ jobs:
-t ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod \
-t ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:latest \
-f apps/web/Dockerfile .
echo "::set-output name=IMAGE::ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG"
echo "IMAGE=ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG" >> $GITHUB_OUTPUT
2 changes: 1 addition & 1 deletion .github/workflows/prod-deploy-webhook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:latest
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG
echo "::set-output name=IMAGE::ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG"
echo "IMAGE=ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG" >> $GITHUB_OUTPUT
deploy_prod_webhook_eu:
needs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prod-deploy-widget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,4 @@ jobs:
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:latest
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG
echo "::set-output name=IMAGE::ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG"
echo "IMAGE=ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG" >> $GITHUB_OUTPUT
2 changes: 1 addition & 1 deletion .github/workflows/prod-deploy-worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:latest
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG
echo "::set-output name=IMAGE::ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG"
echo "IMAGE=ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG" >> $GITHUB_OUTPUT
deploy_prod_worker_eu:
needs: build_prod_image
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prod-deploy-ws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:latest
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG
echo "::set-output name=IMAGE::ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG"
echo "IMAGE=ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG" >> $GITHUB_OUTPUT
deploy_prod_ws_eu:
needs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-api-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ jobs:
- id: setup
run: |
if ! [[ -z "${{ secrets.SUBMODULES_TOKEN }}" ]]; then
echo ::set-output has_token=true
echo "has_token=true" >> $GITHUB_OUTPUT
else
echo ::set-output has_token=false
echo "has_token=false" >> $GITHUB_OUTPUT
fi
- uses: actions/checkout@v3
# checkout with submodules if token is provided
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-web-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ jobs:
- id: setup
run: |
if ! [[ -z "${{ secrets.SUBMODULES_TOKEN }}" ]]; then
echo ::set-output has_token=true
echo "has_token=true" >> $GITHUB_OUTPUT
else
echo ::set-output has_token=false
echo "has_token=false" >> $GITHUB_OUTPUT
fi
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-widget-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ jobs:
- id: setup
run: |
if ! [[ -z "${{ secrets.SUBMODULES_TOKEN }}" ]]; then
echo ::set-output has_token=true
echo "has_token=true" >> $GITHUB_OUTPUT
else
echo ::set-output has_token=false
echo "has_token=false" >> $GITHUB_OUTPUT
fi
- uses: actions/checkout@v3
# checkout with submodules if token is provided
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-worker-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ jobs:
- id: setup
run: |
if ! [[ -z "${{ secrets.SUBMODULES_TOKEN }}" ]]; then
echo ::set-output has_token=true
echo "has_token=true" >> $GITHUB_OUTPUT
else
echo ::set-output has_token=false
echo "has_token=false" >> $GITHUB_OUTPUT
fi
- uses: actions/checkout@v3
# checkout with submodules if token is provided
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-ws-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ jobs:
- id: setup
run: |
if ! [[ -z "${{ secrets.SUBMODULES_TOKEN }}" ]]; then
echo ::set-output has_token=true
echo "has_token=true" >> $GITHUB_OUTPUT
else
echo ::set-output has_token=false
echo "has_token=false" >> $GITHUB_OUTPUT
fi
- uses: actions/checkout@v3
# checkout with submodules if token is provided
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/staging-deploy-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
-t ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG \
-t ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:dev \
-f apps/web/Dockerfile .
echo "::set-output name=IMAGE::ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG"
echo "IMAGE=ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v3
if: failure()
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ jobs:
id: get-base-branch-name
run: |
if [[ "${{github.event.pull_request.base.ref}}" != "" ]]; then
echo "::set-output name=branch::${{github.event.pull_request.base.ref}}"
echo "branch=${{github.event.pull_request.base.ref}}" >> $GITHUB_OUTPUT
else
echo "::set-output name=branch::main"
echo "branch=main" >> $GITHUB_OUTPUT
fi
- uses: actions/checkout@v3
with:
Expand All @@ -72,22 +72,22 @@ jobs:
run: |
if [[ "${{github.event.pull_request.base.ref}}" == "" && "${{steps.branch-name.outputs.current_branch}}" == "main" ]]; then
echo "Running ALL"
echo "::set-output name=test-unit::$(pnpm run get-affected test:unit --all | tail -n +5)"
echo "::set-output name=test-e2e::$(pnpm run get-affected test:e2e --all | tail -n +5)"
echo "::set-output name=test-e2e-ee::$(pnpm run get-affected test:e2e:ee --all | tail -n +5)"
echo "::set-output name=test-cypress::$(pnpm run get-affected cypress:run --all | tail -n +5)"
echo "::set-output name=test-providers::$(pnpm run get-affected test --all providers | tail -n +5)"
echo "::set-output name=test-packages::$(pnpm run get-affected test --all packages | tail -n +5)"
echo "::set-output name=test-libs::$(pnpm run get-affected test --all libs | tail -n +5)"
echo "test-unit=$(pnpm run get-affected test:unit --all | tail -n +5)" >> $GITHUB_OUTPUT
echo "test-e2e=$(pnpm run get-affected test:e2e --all | tail -n +5)" >> $GITHUB_OUTPUT
echo "test-e2e-ee=$(pnpm run get-affected test:e2e:ee --all | tail -n +5)" >> $GITHUB_OUTPUT
echo "test-cypress=$(pnpm run get-affected cypress:run --all | tail -n +5)" >> $GITHUB_OUTPUT
echo "test-providers=$(pnpm run get-affected test --all providers | tail -n +5)" >> $GITHUB_OUTPUT
echo "test-packages=$(pnpm run get-affected test --all packages | tail -n +5)" >> $GITHUB_OUTPUT
echo "test-libs=$(pnpm run get-affected test --all libs | tail -n +5)" >> $GITHUB_OUTPUT
else
echo "Running PR origin/${{steps.get-base-branch-name.outputs.branch}}"
echo "::set-output name=test-unit::$(pnpm run get-affected test origin/${{steps.get-base-branch-name.outputs.branch}} | tail -n +5)"
echo "::set-output name=test-e2e::$(pnpm run get-affected test:e2e origin/${{steps.get-base-branch-name.outputs.branch}} | tail -n +5)"
echo "::set-output name=test-e2e-ee::$(pnpm run get-affected test:e2e:ee origin/${{steps.get-base-branch-name.outputs.branch}} | tail -n +5)"
echo "::set-output name=test-cypress::$(pnpm run get-affected cypress:run origin/${{steps.get-base-branch-name.outputs.branch}} | tail -n +5)"
echo "::set-output name=test-providers::$(pnpm run get-affected test origin/${{steps.get-base-branch-name.outputs.branch}} providers | tail -n +5)"
echo "::set-output name=test-packages::$(pnpm run get-affected test origin/${{steps.get-base-branch-name.outputs.branch}} packages | tail -n +5)"
echo "::set-output name=test-libs::$(pnpm run get-affected test origin/${{steps.get-base-branch-name.outputs.branch}} libs | tail -n +5)"
echo "test-unit=$(pnpm run get-affected test origin/${{steps.get-base-branch-name.outputs.branch}} | tail -n +5)" >> $GITHUB_OUTPUT
echo "test-e2e=$(pnpm run get-affected test:e2e origin/${{steps.get-base-branch-name.outputs.branch}} | tail -n +5)" >> $GITHUB_OUTPUT
echo "test-e2e-ee=$(pnpm run get-affected test:e2e:ee origin/${{steps.get-base-branch-name.outputs.branch}} | tail -n +5)" >> $GITHUB_OUTPUT
echo "test-cypress=$(pnpm run get-affected cypress:run origin/${{steps.get-base-branch-name.outputs.branch}} | tail -n +5)" >> $GITHUB_OUTPUT
echo "test-providers=$(pnpm run get-affected test origin/${{steps.get-base-branch-name.outputs.branch}} providers | tail -n +5)" >> $GITHUB_OUTPUT
echo "test-packages=$(pnpm run get-affected test origin/${{steps.get-base-branch-name.outputs.branch}} packages | tail -n +5)" >> $GITHUB_OUTPUT
echo "test-libs=$(pnpm run get-affected test origin/${{steps.get-base-branch-name.outputs.branch}} libs | tail -n +5)" >> $GITHUB_OUTPUT
fi
test_web:
Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,27 @@
The ultimate service for managing multi-channel notifications with a single API.
</div>

<h1 align="center">🎉 We're participating in Hacktoberfest 2023! 🎉</h1>

Interested in participating in Hacktoberfest? We extend a warm invitation! You also get the opportunity to win some swag 😁

> ⭐️ If you're new to Hacktoberfest, you can learn more and register to participate [here](https://hacktoberfest.com/participation/). Registration is from **September 26th - October 31st**.
- Our Hacktoberfest kickoff event is happening on October 2, 2023. 🚀
- Check out our website for [hacktoberfest instructions](https://novu.co/hacktoberfest/).
- Join our [Discord and engage with our community](https://discord.com/invite/novu), get answers to your challenges, stay updated on events, announcements & prizes.

In addition to this repository, here are the other Novu repositories you can contribute to for Hacktoberfest:
- [Novu docs](https://github.com/novuhq/docs/issues)
- [Novu PHP SDK](https://github.com/novuhq/novu-php/issues)
- [Novu Ruby SDK](https://github.com/novuhq/novu-ruby/issues)
- [Novu Python SDK](https://github.com/novuhq/novu-python/issues)
- [Novu Go SDK](https://github.com/novuhq/go-novu/issues)
- [Novu Java SDK](https://github.com/novuhq/novu-java/issues)
- [Novu Kotlin SDK](https://github.com/novuhq/novu-kotlin/issues)

Your contribution, no matter its size, holds immense value. We eagerly await to see the impact you'll make in our community! 🚀

<p align="center">
<br />
<a href="https://docs.novu.co" rel="dofollow"><strong>Explore the docs »</strong></a>
Expand Down
29 changes: 29 additions & 0 deletions apps/api/e2e/compile-email-template.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,35 @@ describe('Compile E-mail Template', function () {
expect(subject).to.equal(subjectText);
});

it('should apply sender name variable if provided', async function () {
const senderNameTest = 'Novu Test';
const { html, senderName } = await useCase.execute(
CompileEmailTemplateCommand.create({
organizationId: session.organization._id,
environmentId: session.environment._id,
layoutId: null,
preheader: null,
content: [
{
content: '<p>{{senderName}}</p>',
type: EmailBlockTypeEnum.TEXT,
},
],
payload: { senderName: senderNameTest },
userId: session.user._id,
contentType: 'editor',
subject: 'sub',
senderName: '{{senderName}}',
})
);

expect(html).to.contain('<!DOCTYPE html');
expect(html).not.to.contain('{{senderName}}');
expect(html).to.contain(`<p>${senderNameTest}</p>`);

expect(senderName).to.equal(senderNameTest);
});

describe('Backwards compatability', function () {
it('should compile e-mail template for custom html without layouts attached for backwards compatability', async function () {
const { html, subject } = await useCase.execute(
Expand Down
1 change: 0 additions & 1 deletion apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"@nestjs/axios": "~2.0.0",
"@nestjs/common": "^10.2.2",
"@nestjs/core": "^10.2.2",
"@nestjs/graphql": "^12.0.8",
"@nestjs/jwt": "^10.1.0",
"@nestjs/passport": "^10.0.1",
"@nestjs/platform-express": "^10.2.2",
Expand Down
2 changes: 2 additions & 0 deletions apps/api/src/app/events/e2e/trigger-event.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,7 @@ describe(`Trigger event - ${eventTriggerPath} (POST)`, function () {
lastName: 'Last of name',
email: '[email protected]',
locale: 'en',
data: { custom1: 'custom value1', custom2: 'custom value2' },
};
const { data: body } = await axiosInstance.post(
`${session.serverUrl}${eventTriggerPath}`,
Expand Down Expand Up @@ -613,6 +614,7 @@ describe(`Trigger event - ${eventTriggerPath} (POST)`, function () {
expect(createdSubscriber?.lastName).to.equal(payload.lastName);
expect(createdSubscriber?.email).to.equal(payload.email);
expect(createdSubscriber?.locale).to.equal(payload.locale);
expect(createdSubscriber?.data).to.deep.equal(payload.data);
});

it('should update a subscribers email if one dont exists', async function () {
Expand Down
1 change: 0 additions & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
"customize-cra": "^1.0.0",
"date-fns": "^2.29.2",
"eslint-plugin-react-hooks": "^4.4.0",
"graphql": "^15.4.0",
"handlebars": "^4.7.7",
"html-webpack-plugin": "5.5.3",
"jwt-decode": "^3.1.2",
Expand Down
3 changes: 0 additions & 3 deletions apps/widget/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@
"@mantine/hooks": "4.2.12",
"@novu/notification-center": "^0.19.0",
"@novu/shared": "^0.19.0",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"antd": "^4.10.0",
"babel-plugin-import": "^1.13.3",
"chroma-js": "^2.4.2",
Expand Down
7 changes: 0 additions & 7 deletions apps/widget/src/setupTests.ts

This file was deleted.

Loading

0 comments on commit 0650ba8

Please sign in to comment.