Skip to content

Commit

Permalink
Merge branch 'main' into feat/move-and-improve-e2e-tests-web
Browse files Browse the repository at this point in the history
  • Loading branch information
Svana committed Nov 22, 2024
2 parents 0964e55 + bd78723 commit 1a4eea6
Show file tree
Hide file tree
Showing 72 changed files with 1,745 additions and 335 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ jobs:
runs-on: ec2-runners
container:
image: public.ecr.aws/m3u4c4h9/island-is/actions-runner-public:latest
timeout-minutes: 35
timeout-minutes: 45
env:
AFFECTED_PROJECTS: ${{ matrix.projects }}
MAX_JOBS: 1
Expand Down Expand Up @@ -220,7 +220,7 @@ jobs:
runs-on: ec2-runners
container:
image: public.ecr.aws/m3u4c4h9/island-is/actions-runner-public:latest
timeout-minutes: 35
timeout-minutes: 45
env:
AFFECTED_PROJECT: ${{ matrix.projects }}
CYPRESS_PROJECT_ID: 4q7jz8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export abstract class BaseNotificationService {
// We use the first one as the main recipient and the rest as CC
let recipients = recipientEmail ? recipientEmail.split(',') : undefined

if (!this.config.production && recipients) {
if (this.config.shouldUseWhitelist && recipients) {
recipients = await this.handleWhitelist(recipients)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export const notificationModuleConfig = defineConfig({
load: (env) => ({
production: env.optional('NODE_ENV') === 'production',
courtOfAppealsId: '4676f08b-aab4-4b4f-a366-697540788088',
shouldUseWhitelist:
env.required('CONTENTFUL_ENVIRONMENT', 'test') !== 'master',
email: {
fromEmail: env.required('EMAIL_FROM', '[email protected]'),
fromName: env.required('EMAIL_FROM_NAME', 'Réttarvörslugátt'),
Expand Down
6 changes: 6 additions & 0 deletions apps/services/auth/admin-api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@
},
"outputs": ["{workspaceRoot}/coverage/apps/services/auth/admin-api"]
},
"dev": {
"executor": "nx:run-commands",
"options": {
"command": "yarn start --project services-auth-admin-api"
}
},
"codegen/backend-schema": {
"executor": "nx:run-commands",
"options": {
Expand Down
2 changes: 2 additions & 0 deletions apps/services/bff/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ConfigModule } from '@island.is/nest/config'
import { Module } from '@nestjs/common'
import { ProblemModule } from '@island.is/nest/problem'
import { BffConfig } from './bff.config'
import { AuthModule as AppAuthModule } from './modules/auth/auth.module'
import { CacheModule } from './modules/cache/cache.module'
Expand All @@ -18,6 +19,7 @@ import { EnhancedFetchModule } from './modules/enhancedFetch/enhanced-fetch.modu
AppAuthModule,
ProxyModule,
EnhancedFetchModule,
ProblemModule,
],
})
export class AppModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,8 @@ describe('AuthController', () => {
expect(res.status).toEqual(HttpStatus.BAD_REQUEST)
// Expect error to be
expect(res.body).toMatchObject({
statusCode: 400,
message: 'No param "logout_token" provided!',
status: 400,
detail: 'No param "logout_token" provided!',
})
})

Expand Down
1 change: 1 addition & 0 deletions apps/services/bff/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ bootstrap({
port: environment.port,
globalPrefix: `${environment.keyPath}/bff`,
healthCheck: true,
jsonBodyLimit: '350kb',
})
11 changes: 11 additions & 0 deletions apps/web/components/Organization/MarkdownText/MarkdownText.css.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
import { globalStyle, style } from '@vanilla-extract/css'

import { theme } from '@island.is/island-ui/theme'

export const markdownText = style({})

globalStyle(`${markdownText} ul`, {
paddingTop: 16,
})

globalStyle(`${markdownText} a`, {
color: theme.color.blue400,
textDecoration: 'underline',
})

globalStyle(`${markdownText} a:hover`, {
color: theme.color.blueberry400,
})
9 changes: 9 additions & 0 deletions apps/web/components/connected/WHODAS/Calculator.css.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { style } from '@vanilla-extract/css'

import { theme } from '@island.is/island-ui/theme'

export const breakdownRowContainer = style({
display: 'grid',
gridTemplateColumns: '180px 1fr',
gap: theme.spacing[5],
})
115 changes: 115 additions & 0 deletions apps/web/components/connected/WHODAS/Calculator.strings.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
import { defineMessages } from 'react-intl'

export const m = {
form: defineMessages({
previousStep: {
id: 'web.whodas.calculator:form.previousStep',
defaultMessage: 'Fyrra skref',
description: 'Fyrra skref',
},
nextStep: {
id: 'web.whodas.calculator:form.nextStep',
defaultMessage: 'Næsta skref',
description: 'Næsta skref',
},
seeResults: {
id: 'web.whodas.calculator:form.seeResults',
defaultMessage: 'Senda inn svör',
description: 'Senda inn svör',
},
progress: {
id: 'web.whodas.calculator:form.progress',
defaultMessage: 'Skref {stepIndex} af {stepCount}',
description: 'Skref {stepIndex} af {stepCount}',
},
}),
answerLabel: defineMessages({
'0': {
id: 'web.whodas.calculator:form.answerLabel0',
defaultMessage: 'Ekkert erfitt',
description: 'Ekkert erfitt',
},
'1': {
id: 'web.whodas.calculator:form.answerLabel1',
defaultMessage: 'Svolítið erfitt',
description: 'Svolítið erfitt',
},
'2': {
id: 'web.whodas.calculator:form.answerLabel2',
defaultMessage: 'Nokkuð erfitt',
description: 'Nokkuð erfitt',
},
'3': {
id: 'web.whodas.calculator:form.answerLabel3',
defaultMessage: 'Talsvert erfitt',
description: 'Talsvert erfitt',
},
'4': {
id: 'web.whodas.calculator:form.answerLabel4',
defaultMessage: 'Mjög erfitt eða gekk ekki',
description: 'Mjög erfitt eða gekk ekki',
},
}),
results: defineMessages({
mainHeading: {
id: 'web.whodas.calculator:form.mainHeading',
defaultMessage: 'Niðurstaða mats á færni',
description: 'Niðurstaða mats á færni',
},
print: {
id: 'web.whodas.calculator:form.print',
defaultMessage: 'Prenta',
description: 'Prenta',
},
scoreHeading: {
id: 'web.whodas.calculator:form.scoreHeading',
defaultMessage: 'Heildarstig',
description: 'Heildarstig',
},
firstBracketScoreText: {
id: 'web.whodas.calculator:form.firstBracketScoreText',
defaultMessage: '0 til 16,9 stig',
description: 'Lítil skerðing á færni - "Score" texti',
},
secondBracketScoreText: {
id: 'web.whodas.calculator:form.secondBracketScoreText',
defaultMessage: '17 til 100 stig',
description: 'Talsverð skerðing á færni - "Score" texti',
},
firstBracketInterpretationText: {
id: 'web.whodas.calculator:form.firstBracketInterpretationText',
defaultMessage: 'Lítil skerðing á færni',
description: 'Lítil skerðing á færni - Túlkun',
},
secondBracketInterpretationText: {
id: 'web.whodas.calculator:form.secondBracketInterpretationText',
defaultMessage: 'Talsverð færniskerðing',
description: 'Talsverð færniskerðing - Túlkun',
},
firstBracketAdviceText: {
id: 'web.whodas.calculator:form.firstBracketAdviceText#markdown',
defaultMessage: 'Mælum með að skoða hvað er í boði í þínu nærsamfélagi.',
description: 'Lítil skerðing á færni - Ráð',
},
secondBracketAdviceText: {
id: 'web.whodas.calculator:form.secondBracketAdviceText#markdown',
defaultMessage: 'Vert er að sækja um heimaþjónustu í þínu sveitarfélagi.',
description: 'Talsverð færniskerðing - Ráð',
},
interpretationHeading: {
id: 'web.whodas.calculator:form.interpretationHeading',
defaultMessage: 'Túlkun',
description: 'Túlkun',
},
adviceHeading: {
id: 'web.whodas.calculator:form.adviceHeading',
defaultMessage: 'Ráðleggingar',
description: 'Ráðleggingar',
},
breakdownHeading: {
id: 'web.whodas.calculator:form.breakdownHeading',
defaultMessage: 'Sundurliðun á niðurstöðum',
description: 'Sundurliðun á niðurstöðum',
},
}),
}
Loading

0 comments on commit 1a4eea6

Please sign in to comment.