Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into feat/payment-by-pr…
Browse files Browse the repository at this point in the history
…oducts

# Conflicts:
#	shared/types/form/form.ts
#	src/app/modules/form/admin-form/admin-form.payments.controller.ts
#	src/app/modules/submission/encrypt-submission/encrypt-submission.controller.ts
  • Loading branch information
KenLSM committed Jul 26, 2023
2 parents 624cd2c + 335637c commit e25ab07
Show file tree
Hide file tree
Showing 125 changed files with 3,504 additions and 1,188 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
branches: [develop, release-al2, master]
jobs:
test:
timeout-minutes: 60
timeout-minutes: 40
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -24,10 +24,13 @@ jobs:
run: npm run build
- name: Run Playwright tests (login)
run: npx playwright test __tests__/e2e/login.spec.ts
timeout-minutes: 5
- name: Run Playwright tests (email-submission)
run: npx playwright test __tests__/e2e/email-submission.spec.ts
timeout-minutes: 15
- name: Run Playwright tests (encrypt-submission)
run: npx playwright test __tests__/e2e/encrypt-submission.spec.ts
timeout-minutes: 10
- uses: actions/upload-artifact@v3
if: always()
with:
Expand Down
64 changes: 55 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,60 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v6.67.1](https://github.com/opengovsg/FormSG/compare/v6.67.0...v6.67.1)

- fix: paynow payout being ignored [`#6556`](https://github.com/opengovsg/FormSG/pull/6556)
- build: release v6.67.0 [`#6555`](https://github.com/opengovsg/FormSG/pull/6555)

#### [v6.67.0](https://github.com/opengovsg/FormSG/compare/v6.66.1...v6.67.0)

> 20 July 2023

- feat: experimental login integration with SGID [`#6552`](https://github.com/opengovsg/FormSG/pull/6552)
- build: merge v6.66.0 into develop [`#6554`](https://github.com/opengovsg/FormSG/pull/6554)
- fix: change instances of invoice to proof of payment [`#6553`](https://github.com/opengovsg/FormSG/pull/6553)
- build: release v6.66.0 [`#6550`](https://github.com/opengovsg/FormSG/pull/6550)
- feat: MyInfo Children compound fields beta [`#6523`](https://github.com/opengovsg/FormSG/pull/6523)
- ci: adjust timeouts for playwright pipe [`#6551`](https://github.com/opengovsg/FormSG/pull/6551)
- fix: use proof-of-payment for payment receipt/invoice [`#6549`](https://github.com/opengovsg/FormSG/pull/6549)
- build(deps-dev): bump word-wrap from 1.2.3 to 1.2.4 in /frontend [`#6548`](https://github.com/opengovsg/FormSG/pull/6548)
- fix(deps): bump word-wrap from 1.2.3 to 1.2.4 [`#6547`](https://github.com/opengovsg/FormSG/pull/6547)
- build(deps): bump winston-cloudwatch to v6.2.0 [`#6545`](https://github.com/opengovsg/FormSG/pull/6545)
- chore: bump version to v6.66.0 [`0233ba8`](https://github.com/opengovsg/FormSG/commit/0233ba8018532d4978d13717fac065f81e2eb515)
- chore: bump version to v6.67.0 [`6ca03c6`](https://github.com/opengovsg/FormSG/commit/6ca03c68cb162a4ae3af01f172425b3305742ae0)

#### [v6.66.1](https://github.com/opengovsg/FormSG/compare/v6.66.0...v6.66.1)

> 18 July 2023

- revert: build(deps): bump winston-cloudwatch version to 6.2.0 [`#6542`](https://github.com/opengovsg/FormSG/pull/6542)
- chore: bump version to v6.66.0 [`b3a9818`](https://github.com/opengovsg/FormSG/commit/b3a9818762e334bc7126c029cdba63156bac85ed)

#### [v6.66.0](https://github.com/opengovsg/FormSG/compare/v6.65.0...v6.66.0)

> 19 July 2023

- fix: use proof-of-payment for payment receipt/invoice [`#6549`](https://github.com/opengovsg/FormSG/pull/6549)
- build(deps-dev): bump word-wrap from 1.2.3 to 1.2.4 in /frontend [`#6548`](https://github.com/opengovsg/FormSG/pull/6548)
- fix(deps): bump word-wrap from 1.2.3 to 1.2.4 [`#6547`](https://github.com/opengovsg/FormSG/pull/6547)
- build(deps): bump winston-cloudwatch to v6.2.0 [`#6545`](https://github.com/opengovsg/FormSG/pull/6545)
- fix(deps): [Snyk] Security upgrade mongoose from 5.13.15 to 5.13.20 [`#6541`](https://github.com/opengovsg/FormSG/pull/6541)
- feat: indicate if GST has been applied to a payment transaction [`#6538`](https://github.com/opengovsg/FormSG/pull/6538)
- chore: reduce max payment limit [`#6543`](https://github.com/opengovsg/FormSG/pull/6543)
- fix: updating csp to fix bypass [`#6535`](https://github.com/opengovsg/FormSG/pull/6535)
- build(deps): bump winston-cloudwatch version to "6.2.0" [`#6542`](https://github.com/opengovsg/FormSG/pull/6542)
- feat: add description to form issue modal [`#6536`](https://github.com/opengovsg/FormSG/pull/6536)
- fix: presub remove additional underscore [`#6533`](https://github.com/opengovsg/FormSG/pull/6533)
- feat: presub-change-icon-to-help [`#6532`](https://github.com/opengovsg/FormSG/pull/6532)
- build: merge v6.65.0 into develop [`#6531`](https://github.com/opengovsg/FormSG/pull/6531)
- build: release v6.65.0 [`#6528`](https://github.com/opengovsg/FormSG/pull/6528)
- fix: add FE validation rule that email domains must be non empty [`#6529`](https://github.com/opengovsg/FormSG/pull/6529)
- chore: bump version to v6.66.0 [`0233ba8`](https://github.com/opengovsg/FormSG/commit/0233ba8018532d4978d13717fac065f81e2eb515)

#### [v6.65.0](https://github.com/opengovsg/FormSG/compare/v6.64.0...v6.65.0)

> 11 July 2023

- fix: issue report icon for mobile [`#6527`](https://github.com/opengovsg/FormSG/pull/6527)
- feat: Create issue feedback UI on public form interface [`#6452`](https://github.com/opengovsg/FormSG/pull/6452)
- chore: variable payments UI review changes [`#6524`](https://github.com/opengovsg/FormSG/pull/6524)
Expand All @@ -26,6 +78,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- build: release v6.64.0 [`#6509`](https://github.com/opengovsg/FormSG/pull/6509)
- chore: fix typo maxmium -> maximum [`#6510`](https://github.com/opengovsg/FormSG/pull/6510)
- feat: deep link myinfo settings message in builder [`#6503`](https://github.com/opengovsg/FormSG/pull/6503)
- chore: bump version to v6.65.0 [`3ca3ca7`](https://github.com/opengovsg/FormSG/commit/3ca3ca76a7d347953ea5b4153de4575c2f4be3c0)

#### [v6.64.0](https://github.com/opengovsg/FormSG/compare/v6.63.0...v6.64.0)

Expand Down Expand Up @@ -515,7 +568,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- build: merge v6.37.0 into develop [`#5989`](https://github.com/opengovsg/FormSG/pull/5989)
- build: release v6.37.0 [`#5988`](https://github.com/opengovsg/FormSG/pull/5988)

#### [v6.37.0](https://github.com/opengovsg/FormSG/compare/v6.36.1...v6.37.0)
#### [v6.37.0](https://github.com/opengovsg/FormSG/compare/v6.36.0...v6.37.0)

> 24 March 2023

Expand Down Expand Up @@ -545,17 +598,10 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- chore(deps-dev): bump @typescript-eslint/parser from 5.54.1 to 5.55.0 in /shared [`#5922`](https://github.com/opengovsg/FormSG/pull/5922)
- test(e2e/email): add form auth tests [`#5876`](https://github.com/opengovsg/FormSG/pull/5876)
- build: merge v6.36.0 into develop [`#5914`](https://github.com/opengovsg/FormSG/pull/5914)
- build: release v6.36.0 [`#5913`](https://github.com/opengovsg/FormSG/pull/5913)
- chore: bump version to v6.37.0 [`b4d24eb`](https://github.com/opengovsg/FormSG/commit/b4d24eb14f8a80bff56d19e6fa23975d5661cce9)
- chore: bump version to 6.36.1 [`faf75b5`](https://github.com/opengovsg/FormSG/commit/faf75b5a7d0d12745e9a0104c541fb66cca17258)

#### [v6.36.1](https://github.com/opengovsg/FormSG/compare/v6.36.0...v6.36.1)

> 17 March 2023

- build: release v6.36.0 [`#5913`](https://github.com/opengovsg/FormSG/pull/5913)
- chore: bump version to 6.36.1 [`7bc8b06`](https://github.com/opengovsg/FormSG/commit/7bc8b0669b29565be1d7a8b4cb8b76801a9a44ba)
- fix: trim dropdown options for logic check [`25e197a`](https://github.com/opengovsg/FormSG/commit/25e197a22eecec527b2b284aee0b95ccb1cd3797)

#### [v6.36.0](https://github.com/opengovsg/FormSG/compare/v6.35.0...v6.36.0)

> 9 March 2023
Expand Down
29 changes: 29 additions & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2200,6 +2200,35 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

-------------------------------------------------------------------------------

## Project
python_stdnum

### Source
https://github.com/arthurdejong/python-stdnum/

### License
uen.py - functions for handling Singapore UEN numbers
coding: utf-8

Copyright (C) 2020 Leandro Regueiro
Copyright (C) 2020 Arthur de Jong

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA


## Project
toastr

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,15 @@ npm run test:frontend
#### End-to-end tests

```bash
npm run test-e2e
npm run test:e2e-v2
```

will build both the frontend and backend then run our end-to-end tests. The tests are located at [`__tests__/e2e`](./__tests__/e2e). You will need to stop the Docker dev container to be able to run the end-to-end tests.

If you do not need to rebuild the frontend and backend, you can run

```bash
npm run test-e2e-ci
npx playwright test
```

#### Cross-browser testing
Expand Down
2 changes: 1 addition & 1 deletion __tests__/e2e/constants/field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ export const ALL_FIELDS: E2eFieldMetadata[] = [
{
title: 'Some UEN here please',
fieldType: BasicField.Uen,
val: 'T09LL0001B',
val: 'T09SS0050A',
},
{
title: 'Yes or No?',
Expand Down
16 changes: 5 additions & 11 deletions __tests__/e2e/helpers/createForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,18 +302,12 @@ const addAuthSettings = async (
page.getByRole('heading', { name: 'Enable Singpass authentication' }),
).toBeVisible()

const name = `Singpass${
formSettings.authType === FormAuthType.SP
? ''
: formSettings.authType === FormAuthType.SGID
? ' App-only Login'
: formSettings.authType === FormAuthType.MyInfo
? ' with MyInfo'
: ' (Corporate)'
}`

await page
.locator('label', { has: page.getByRole('radio', { name }) })
.locator('label', {
has: page.locator(
`input[type='radio'][value='${formSettings.authType}']`,
),
})
.first() // Since 'Singpass' will match all radio options, pick the first matching one.
.click({ position: { x: 1, y: 1 } }) // Clicking the center of the sgid button launches the sgid contact form, put this here until we get rid of the link

Expand Down
10 changes: 2 additions & 8 deletions __tests__/setup/.test-env
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ SINGPASS_ESRVC_ID=Test-eServiceId-Sp # Needed for MyInfo
SGID_HOSTNAME=http://localhost:5156/sgid
SGID_CLIENT_ID=sgidclientid
SGID_CLIENT_SECRET=sgidclientsecret
SGID_REDIRECT_URI=http://localhost:5000/sgid/login
SGID_FORM_LOGIN_REDIRECT_URI=http://localhost:5000/sgid/login
SGID_ADMIN_LOGIN_REDIRECT_URI=http://localhost:5000/api/v3/auth/sgid/login
SGID_PRIVATE_KEY=./node_modules/@opengovsg/mockpass/static/certs/key.pem
SGID_PUBLIC_KEY=./node_modules/@opengovsg/mockpass/static/certs/server.crt

Expand Down Expand Up @@ -74,13 +75,6 @@ APP_URL=http://localhost:5000
SECRET_ENV=development
INTRANET_IP_LIST_PATH=__tests__/setup/mock-intranet-ips.txt

REACT_SWITCH_ENV_FEEDBACK_FORM_ID_ADMIN=62da6a569ee8e90143b5da26
REACT_SWITCH_ENV_FEEDBACK_FORM_ID_RESPONDENT=62da6a569ee8e90143b5da26
REACT_MIGRATION_ANGULAR_END_DATE=15 September 2022
REACT_MIGRATION_RESP_ROLLOUT_EMAIL=100
REACT_MIGRATION_RESP_ROLLOUT_STORAGE=100
REACT_MIGRATION_ADMIN_ROLLOUT=100

# Mockpass env vars
MOCKPASS_NRIC=S9812379B
MOCKPASS_UID=S8979373D # Not used by mockpass but keep in sync with MOCKPASS_UEN for Corppass tests
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ services:
- SGID_HOSTNAME=http://localhost:5156/sgid
- SGID_CLIENT_ID=sgidclientid
- SGID_CLIENT_SECRET=sgidclientsecret
- SGID_REDIRECT_URI=http://localhost:5001/sgid/login
- SGID_ADMIN_LOGIN_REDIRECT_URI=http://localhost:5001/api/v3/auth/sgid/login
- SGID_FORM_LOGIN_REDIRECT_URI=http://localhost:5001/sgid/login
- SGID_PRIVATE_KEY=./node_modules/@opengovsg/mockpass/static/certs/key.pem
- SGID_PUBLIC_KEY=./node_modules/@opengovsg/mockpass/static/certs/server.crt
- SES_PASS
Expand Down
16 changes: 8 additions & 8 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "form-frontend",
"version": "6.65.0",
"version": "6.67.0",
"homepage": ".",
"private": true,
"dependencies": {
Expand Down
45 changes: 39 additions & 6 deletions frontend/src/app/AppRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
LANDING_PAYMENTS_ROUTE,
LANDING_ROUTE,
LOGIN_ROUTE,
OGP_LOGIN_ROUTE,
PAYMENT_PAGE_SUBROUTE,
PRIVACY_POLICY_ROUTE,
PUBLICFORM_ROUTE,
Expand All @@ -34,10 +35,12 @@ import {
ResponsesPage,
} from '~features/admin-form/responses'
import { SettingsPage } from '~features/admin-form/settings/SettingsPage'
import { SgidLoginPage } from '~features/login'
import { FormPaymentPage } from '~features/public-form/components/FormPaymentPage/FormPaymentPage'
import { BillingPage } from '~features/user/billing'

import { HashRouterElement } from './HashRouterElement'
import { ParamIdValidator } from './ParamIdValidator'
import { PrivateElement } from './PrivateElement'
import { PublicElement } from './PublicElement'

Expand Down Expand Up @@ -88,6 +91,10 @@ export const AppRouter = (): JSX.Element => {
path={LOGIN_ROUTE}
element={<PublicElement strict element={<LoginPage />} />}
/>
<Route
path={OGP_LOGIN_ROUTE}
element={<PublicElement strict element={<SgidLoginPage />} />}
/>
<Route
path={PRIVACY_POLICY_ROUTE}
element={<PublicElement element={<PrivacyPolicyPage />} />}
Expand All @@ -103,20 +110,38 @@ export const AppRouter = (): JSX.Element => {
<Route path={PUBLICFORM_ROUTE}>
<Route
index
element={<PublicElement element={<PublicFormPage />} />}
element={
<ParamIdValidator
element={<PublicElement element={<PublicFormPage />} />}
/>
}
/>
<Route
path={USE_TEMPLATE_REDIRECT_SUBROUTE}
element={<PublicElement element={<UseTemplateRedirectPage />} />}
element={
<ParamIdValidator
element={
<PublicElement element={<UseTemplateRedirectPage />} />
}
/>
}
/>
<Route
path={PAYMENT_PAGE_SUBROUTE}
element={<PublicElement element={<FormPaymentPage />} />}
element={
<ParamIdValidator
element={<PublicElement element={<FormPaymentPage />} />}
/>
}
/>
</Route>
<Route
path={`${ADMINFORM_ROUTE}/:formId`}
element={<PrivateElement element={<AdminFormLayout />} />}
element={
<ParamIdValidator
element={<PrivateElement element={<AdminFormLayout />} />}
/>
}
>
<Route index element={<CreatePage />} />
<Route path={ADMINFORM_SETTINGS_SUBROUTE} element={<SettingsPage />}>
Expand All @@ -141,11 +166,19 @@ export const AppRouter = (): JSX.Element => {
</Route>
<Route
path={`${ADMINFORM_ROUTE}/:formId/${ADMINFORM_PREVIEW_ROUTE}`}
element={<PrivateElement element={<PreviewFormPage />} />}
element={
<ParamIdValidator
element={<PrivateElement element={<PreviewFormPage />} />}
/>
}
/>
<Route
path={`${ADMINFORM_ROUTE}/:formId/${ADMINFORM_USETEMPLATE_ROUTE}`}
element={<PrivateElement element={<TemplateFormPage />} />}
element={
<ParamIdValidator
element={<PrivateElement element={<TemplateFormPage />} />}
/>
}
/>
<Route path="*" element={<NotFoundErrorPage />} />
</Routes>
Expand Down
Loading

0 comments on commit e25ab07

Please sign in to comment.