diff --git a/.github/workflows/test_backend.yml b/.github/workflows/test_backend.yml
index 96415cfff..8d1a8e2c4 100644
--- a/.github/workflows/test_backend.yml
+++ b/.github/workflows/test_backend.yml
@@ -44,7 +44,7 @@ jobs:
uses: actions/checkout@v3
- name: Backend | docker-compose mariadb
- run: docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps mariadb mailserver
+ run: docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps mariadb
- name: Sleep for 30 seconds
run: sleep 30s
diff --git a/backend/src/emails/__snapshots__/sendEmailVariants.test.ts.snap b/backend/src/emails/__snapshots__/sendEmailVariants.test.ts.snap
index 0e4e4ba7c..37263e937 100644
--- a/backend/src/emails/__snapshots__/sendEmailVariants.test.ts.snap
+++ b/backend/src/emails/__snapshots__/sendEmailVariants.test.ts.snap
@@ -146,11 +146,11 @@ exports[`sendEmailVariants sendAccountActivationEmail result has the correct htm
Complete registration
-
Please click here to complete the registration and activate your Gradido account.
Activate account
-
Or copy the link into your browser window.
http://localhost/checkEmail/6627633878930542284
+
Please click here to complete the registration and activate your Gradido account.
Activate account
+
Or copy the link into your browser window.
http://localhost/checkEmail/6627633878930542284
Request new valid link
- The link has a validity of 23 hours and 30 minutes.
+
The link has a validity of 23 hours and 30 minutes.
If the validity of the link has already expired, you can have a new link sent to you here.
New link
@@ -323,10 +323,10 @@ exports[`sendEmailVariants sendAccountMultiRegistrationEmail calls "sendEmailTra
Reset password
-
If you have forgotten your password, please click here.
reset
-
Or copy the link into your browser window.
http://localhost/forgot-password
+
If you have forgotten your password, please click here.
reset
+
Or copy the link into your browser window.
http://localhost/forgot-password
Contact support
-
If you did not try to register again, please contact our support:
support@supportmail.com
+
If you did not try to register again, please contact our support:
support@supportmail.com
Kind regards,
your Gradido team
@@ -496,8 +496,8 @@ exports[`sendEmailVariants sendAddedContributionMessageEmail result has the corr
Read and reply to message
-
To view and reply to the message, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab.
To account
-
Please do not reply to this email.
+
To view and reply to the message, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab.
To account
+
Please do not reply to this email.
Kind regards,
your Gradido team
@@ -667,9 +667,9 @@ exports[`sendEmailVariants sendContributionChangedByModeratorEmail result has th
Contribution details
-
To see your common good contributions and related messages, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab.
To account
-
Or copy the link into your browser window.
http://localhost/community/contributions
-
Please do not reply to this email.
+
To see your common good contributions and related messages, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab.
To account
+
Or copy the link into your browser window.
http://localhost/community/contributions
+
Please do not reply to this email.
Kind regards,
your Gradido team
@@ -839,9 +839,9 @@ exports[`sendEmailVariants sendContributionConfirmedEmail result has the correct
Contribution details
-
To see your common good contributions and related messages, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab.
To account
-
Or copy the link into your browser window.
http://localhost/community/contributions
-
Please do not reply to this email.
+
To see your common good contributions and related messages, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab.
To account
+
Or copy the link into your browser window.
http://localhost/community/contributions
+
Please do not reply to this email.
Kind regards,
your Gradido team
@@ -1011,9 +1011,9 @@ exports[`sendEmailVariants sendContributionDeletedEmail result has the correct h
Contribution details
-
To see your common good contributions and related messages, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab.
To account
-
Or copy the link into your browser window.
http://localhost/community/contributions
-
Please do not reply to this email.
+
To see your common good contributions and related messages, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab.
To account
+
Or copy the link into your browser window.
http://localhost/community/contributions
+
Please do not reply to this email.
Kind regards,
your Gradido team
@@ -1183,9 +1183,9 @@ exports[`sendEmailVariants sendContributionDeniedEmail result has the correct ht
Contribution details
-
To see your common good contributions and related messages, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab.
To account
-
Or copy the link into your browser window.
http://localhost/community/contributions
-
Please do not reply to this email.
+
To see your common good contributions and related messages, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab.
To account
+
Or copy the link into your browser window.
http://localhost/community/contributions
+
Please do not reply to this email.
Kind regards,
your Gradido team
@@ -1355,11 +1355,11 @@ exports[`sendEmailVariants sendResetPasswordEmail result has the correct html as
Reset password
-
If it was you, please click here.
reset
-
Or copy the link into your browser window.
http://localhost/reset-password/3762660021544901417
+
If it was you, please click here.
reset
+
Or copy the link into your browser window.
http://localhost/reset-password/3762660021544901417
Request new valid link
- The link has a validity of 23 hours and 30 minutes.
+
The link has a validity of 23 hours and 30 minutes.
If the validity of the link has already expired, you can have a new link sent to you here.
New link
@@ -1531,9 +1531,9 @@ exports[`sendEmailVariants sendTransactionLinkRedeemedEmail result has the corre
Transaction details
-
Amount: 17.65 GDD
Message: You deserve it! 🙏🏼
You can find transaction details in your Gradido account.
+
Amount: 17.65 GDD
Message: You deserve it! 🙏🏼
You can find transaction details in your Gradido account.
To account
-
Please do not reply to this email.
+
Please do not reply to this email.
Kind regards,
your Gradido team
@@ -1705,7 +1705,7 @@ exports[`sendEmailVariants sendTransactionReceivedEmail result has the correct h
Message
-
Du bist schon lustiger ;)
+
Du bist schon lustiger ;)
diff --git a/backend/src/emails/sendEmailTranslated.test.ts b/backend/src/emails/sendEmailTranslated.test.ts
index c10c76a62..f38342985 100644
--- a/backend/src/emails/sendEmailTranslated.test.ts
+++ b/backend/src/emails/sendEmailTranslated.test.ts
@@ -23,11 +23,11 @@ jest.mock('nodemailer', () => {
__esModule: true,
createTransport: jest.fn(() => {
return {
- sendMail: jest.fn(() => {
+ sendMail: () => {
return {
messageId: 'message',
}
- }),
+ },
}
}),
}
diff --git a/backend/src/emails/sendEmailVariants.test.ts b/backend/src/emails/sendEmailVariants.test.ts
index 76705deb9..88cd851d2 100644
--- a/backend/src/emails/sendEmailVariants.test.ts
+++ b/backend/src/emails/sendEmailVariants.test.ts
@@ -11,7 +11,8 @@ import { logger, i18n as localization } from '@test/testSetup'
import { CONFIG } from '@/config'
-import { sendEmailTranslated } from './sendEmailTranslated'
+// eslint-disable-next-line import/no-namespace
+import * as sendEmailTranslatedApi from './sendEmailTranslated'
import {
sendAddedContributionMessageEmail,
sendAccountActivationEmail,
@@ -34,6 +35,21 @@ CONFIG.EMAIL_SMTP_HOST = testMailServerHost
CONFIG.EMAIL_SMTP_PORT = testMailServerPort
CONFIG.EMAIL_TLS = testMailTLS
+jest.mock('nodemailer', () => {
+ return {
+ __esModule: true,
+ createTransport: jest.fn(() => {
+ return {
+ sendMail: () => {
+ return {
+ messageId: 'message',
+ }
+ },
+ }
+ }),
+ }
+})
+
let con: Connection
let testEnv: {
mutate: ApolloServerTestClient['mutate']
@@ -50,13 +66,7 @@ afterAll(async () => {
await con.close()
})
-jest.mock('./sendEmailTranslated', () => {
- const originalModule = jest.requireActual('./sendEmailTranslated')
- return {
- __esModule: true,
- sendEmailTranslated: jest.fn((a) => originalModule.sendEmailTranslated(a)),
- }
-})
+const sendEmailTranslatedSpy = jest.spyOn(sendEmailTranslatedApi, 'sendEmailTranslated')
describe('sendEmailVariants', () => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -77,7 +87,7 @@ describe('sendEmailVariants', () => {
describe('calls "sendEmailTranslated"', () => {
it('with expected parameters', () => {
- expect(sendEmailTranslated).toBeCalledWith({
+ expect(sendEmailTranslatedSpy).toBeCalledWith({
receiver: {
to: 'Peter Lustig
',
},
@@ -131,7 +141,7 @@ describe('sendEmailVariants', () => {
describe('calls "sendEmailTranslated"', () => {
it('with expected parameters', () => {
- expect(sendEmailTranslated).toBeCalledWith({
+ expect(sendEmailTranslatedSpy).toBeCalledWith({
receiver: {
to: 'Peter Lustig ',
},
@@ -182,7 +192,7 @@ describe('sendEmailVariants', () => {
describe('calls "sendEmailTranslated"', () => {
it('with expected parameters', () => {
- expect(sendEmailTranslated).toBeCalledWith({
+ expect(sendEmailTranslatedSpy).toBeCalledWith({
receiver: {
to: 'Peter Lustig ',
},
@@ -235,7 +245,7 @@ describe('sendEmailVariants', () => {
describe('calls "sendEmailTranslated"', () => {
it('with expected parameters', () => {
- expect(sendEmailTranslated).toBeCalledWith({
+ expect(sendEmailTranslatedSpy).toBeCalledWith({
receiver: {
to: 'Peter Lustig ',
},
@@ -292,7 +302,7 @@ describe('sendEmailVariants', () => {
describe('calls "sendEmailTranslated"', () => {
it('with expected parameters', () => {
- expect(sendEmailTranslated).toBeCalledWith({
+ expect(sendEmailTranslatedSpy).toBeCalledWith({
receiver: {
to: 'Peter Lustig ',
},
@@ -348,7 +358,7 @@ describe('sendEmailVariants', () => {
describe('calls "sendEmailTranslated"', () => {
it('with expected parameters', () => {
- expect(sendEmailTranslated).toBeCalledWith({
+ expect(sendEmailTranslatedSpy).toBeCalledWith({
receiver: {
to: 'Peter Lustig ',
},
@@ -403,7 +413,7 @@ describe('sendEmailVariants', () => {
describe('calls "sendEmailTranslated"', () => {
it('with expected parameters', () => {
- expect(sendEmailTranslated).toBeCalledWith({
+ expect(sendEmailTranslatedSpy).toBeCalledWith({
receiver: {
to: 'Peter Lustig ',
},
@@ -457,7 +467,7 @@ describe('sendEmailVariants', () => {
describe('calls "sendEmailTranslated"', () => {
it('with expected parameters', () => {
- expect(sendEmailTranslated).toBeCalledWith({
+ expect(sendEmailTranslatedSpy).toBeCalledWith({
receiver: {
to: 'Peter Lustig ',
},
@@ -513,7 +523,7 @@ describe('sendEmailVariants', () => {
describe('calls "sendEmailTranslated"', () => {
it('with expected parameters', () => {
- expect(sendEmailTranslated).toBeCalledWith({
+ expect(sendEmailTranslatedSpy).toBeCalledWith({
receiver: {
to: 'Peter Lustig ',
},
@@ -572,7 +582,7 @@ describe('sendEmailVariants', () => {
describe('calls "sendEmailTranslated"', () => {
it('with expected parameters', () => {
- expect(sendEmailTranslated).toBeCalledWith({
+ expect(sendEmailTranslatedSpy).toBeCalledWith({
receiver: {
to: 'Peter Lustig ',
},
diff --git a/backend/src/emails/templates/includes/webflow.css b/backend/src/emails/templates/includes/webflow.css
index a78c0ed4f..45e4420c4 100644
--- a/backend/src/emails/templates/includes/webflow.css
+++ b/backend/src/emails/templates/includes/webflow.css
@@ -42,7 +42,7 @@ h2 {
.p_content{
margin: 15px 0 15px 0;
line-height: 26px;
- color: #9ca0a8;
+ color: #696c72;
}
.clink {
diff --git a/backend/src/seeds/factory/user.ts b/backend/src/seeds/factory/user.ts
index f0bda3a3f..3e42ab86c 100644
--- a/backend/src/seeds/factory/user.ts
+++ b/backend/src/seeds/factory/user.ts
@@ -18,11 +18,18 @@ export const userFactory = async (
const homeCom = await writeHomeCommunityEntry()
+ const response = await mutate({ mutation: createUser, variables: user })
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
+ if (!response?.data?.createUser) {
+ // eslint-disable-next-line no-console
+ console.log(response)
+ throw new Error('createUser mutation returned unexpected response')
+ }
const {
data: {
createUser: { id },
},
- } = await mutate({ mutation: createUser, variables: user })
+ } = response
// get user from database
let dbUser = await User.findOneOrFail({ where: { id }, relations: ['emailContact', 'userRoles'] })
diff --git a/deployment/bare_metal/start.sh b/deployment/bare_metal/start.sh
index db59b0eed..7b413d3ff 100755
--- a/deployment/bare_metal/start.sh
+++ b/deployment/bare_metal/start.sh
@@ -141,6 +141,8 @@ envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < $NGINX_CONFIG_DIR/$TEMPLATE
# Clean tmp folder - remove yarn files
find /tmp -name "yarn--*" -exec rm -r {} \;
+# Clean user cache folder
+rm -Rf ~/.cache/yarn
# Remove node_modules folders
# we had problems with corrupted node_modules folder