Skip to content

Commit

Permalink
Merge pull request #6347 from opengovsg/release_v6.50.0
Browse files Browse the repository at this point in the history
* test: add stories for admin and public forms with payments (#6292)

* test: add stories for admin and public forms

* test: add stories for FormPaymentPage

* fix: misc frontend updates

* fix: UI fixes for payment preview block in form builder and public form

* chore(deps-dev): bump @babel/plugin-transform-runtime from 7.19.6 to 7.21.4 (#6297)

chore(deps-dev): bump @babel/plugin-transform-runtime

Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.19.6 to 7.21.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.21.4/packages/babel-plugin-transform-runtime)

---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-runtime"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.59.2 to 5.59.5 in /shared (#6288)

chore(deps-dev): bump @typescript-eslint/eslint-plugin in /shared

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.59.2 to 5.59.5.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.59.5/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump json5 from 1.0.1 to 1.0.2 in /frontend (#5688)

Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](json5/json5@v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 in /frontend (#5729)

Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](kornelski/http-cache-semantics@v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump type-fest from 2.19.0 to 3.10.0 (#6270)

Bumps [type-fest](https://github.com/sindresorhus/type-fest) from 2.19.0 to 3.10.0.
- [Release notes](https://github.com/sindresorhus/type-fest/releases)
- [Commits](sindresorhus/type-fest@v2.19.0...v3.10.0)

---
updated-dependencies:
- dependency-name: type-fest
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump jest-extended from 1.2.1 to 3.2.4 (#5793)

Bumps [jest-extended](https://github.com/jest-community/jest-extended) from 1.2.1 to 3.2.4.
- [Release notes](https://github.com/jest-community/jest-extended/releases)
- [Changelog](https://github.com/jest-community/jest-extended/blob/main/CHANGELOG.md)
- [Commits](jest-community/jest-extended@v1.2.1...v3.2.4)

---
updated-dependencies:
- dependency-name: jest-extended
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: squished logic block either option (#6305)

* Add minimum width 0 for flex child items that do not respect flex basis settings

* refactor: logicValueWrapperWidth to be more concise

---------

Co-authored-by: Dexter Tan <[email protected]>

* feat: add local dev support for twilio (#5881)

* feat: add prism for twilio

* feat: add localdev env config

* fix: mocktwilio randomly assigning errorCode in response

* feat: route sms body to maildev

* fix: incorrect refernce to determine localdev

* refactor: rename localDev to useMockTwilio

* feat: generalize sendLocalDevMail

* fix: test cases not mocking new mocktwilio

* chore(deps-dev): bump @types/express from 4.17.14 to 4.17.17 (#6311)

Bumps [@types/express](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/express) from 4.17.14 to 4.17.17.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/express)

---
updated-dependencies:
- dependency-name: "@types/express"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump @sentry/browser from 7.28.1 to 7.51.2 (#6314)

Bumps [@sentry/browser](https://github.com/getsentry/sentry-javascript) from 7.28.1 to 7.51.2.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md)
- [Commits](getsentry/sentry-javascript@7.28.1...7.51.2)

---
updated-dependencies:
- dependency-name: "@sentry/browser"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/opossum from 6.2.2 to 6.2.3 (#6316)

Bumps [@types/opossum](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/opossum) from 6.2.2 to 6.2.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/opossum)

---
updated-dependencies:
- dependency-name: "@types/opossum"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump husky from 8.0.2 to 8.0.3 (#6312)

Bumps [husky](https://github.com/typicode/husky) from 8.0.2 to 8.0.3.
- [Release notes](https://github.com/typicode/husky/releases)
- [Commits](typicode/husky@v8.0.2...v8.0.3)

---
updated-dependencies:
- dependency-name: husky
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump axios-mock-adapter from 1.21.2 to 1.21.4 (#6313)

Bumps [axios-mock-adapter](https://github.com/ctimmerm/axios-mock-adapter) from 1.21.2 to 1.21.4.
- [Release notes](https://github.com/ctimmerm/axios-mock-adapter/releases)
- [Changelog](https://github.com/ctimmerm/axios-mock-adapter/blob/master/CHANGELOG.md)
- [Commits](ctimmerm/axios-mock-adapter@v1.21.2...v1.21.4)

---
updated-dependencies:
- dependency-name: axios-mock-adapter
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: prevent prefill editing (#6097)

* chore: add prefill property to model

* feat: admin can lock prefill

* chore: render locked prefill on public form

* chore: update copy

* feat: styling for locked prefill field

* fix: model validation

* chore: add tests

* chore: add stories

* fix: prefill can be locked only when there is a prefill value

* chore: update copy

* chore: update copy

* fix: styling for dropdown input

* chore: copy update

* chore: unwanted import

* feat: show different message based on combination of prefills

* feat: update stories

* chore: update copy for locked fields

* perf: conditionally use hooks based on activeness of field row (#6303)

* perf: refactor active field button group

which separates the hooks relating to handling duplicate fields and deleting fields. Preventing unnecessary re-renders to non-active fields.

* perf: update parent builder field

* perf: update dragging over flag only for active fields

* refactor: available size limit should only be computed on attachment

* chore: remove unnecessary check

* refactor: improve name of activeField

* refactor: improve readability for dragging over

* refactor: only pass extra props when active

* fix: playwright tests cancelled after timeout (and other issues) (#6308)

* fix: add ssm env site name for playwright

* fix: email sort by time in ascending order

* ci: separate playwright test suites into diff steps

* fix: change textbox to combobox for field settings dropdown

* fix: change in fillMultiDropdowns behaviour

- Don't close dropdown between item selections.
- Scroll options into view if they're not in view.

* ci: temporarily comment out responses download

* ci: temp rm of webkit from playwright

- due to secret key download issues only on webkit

* fix: type change due to upgrade in types/express to 4.17.17 (#6319)

fix: type change due to upgrade in types/express

* feat: retain image metadata after compression (#6320)

* chore: bump browser-image-compression to 2.0.2

* feat: preserve exif when image is compressed

* chore(deps-dev): bump @types/jsonfile from 6.1.0 to 6.1.1 (#6329)

Bumps [@types/jsonfile](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jsonfile) from 6.1.0 to 6.1.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jsonfile)

---
updated-dependencies:
- dependency-name: "@types/jsonfile"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @typescript-eslint/parser from 5.59.5 to 5.59.6 in /shared (#6331)

chore(deps-dev): bump @typescript-eslint/parser in /shared

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.59.5 to 5.59.6.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.59.6/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.59.5 to 5.59.6 in /shared (#6332)

chore(deps-dev): bump @typescript-eslint/eslint-plugin in /shared

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.59.5 to 5.59.6.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.59.6/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: add code of conduct from contributor covenant (#6326)

* fix: pin MockPass version (#6324)

* fix(deps): bump twilio from 4.7.2 to 4.11.0 (#6328)

Bumps [twilio](https://github.com/twilio/twilio-node) from 4.7.2 to 4.11.0.
- [Release notes](https://github.com/twilio/twilio-node/releases)
- [Changelog](https://github.com/twilio/twilio-node/blob/main/CHANGES.md)
- [Commits](twilio/twilio-node@4.7.2...4.11.0)

---
updated-dependencies:
- dependency-name: twilio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump vm2 from 3.9.17 to 3.9.18 (#6333)

Bumps [vm2](https://github.com/patriksimek/vm2) from 3.9.17 to 3.9.18.
- [Release notes](https://github.com/patriksimek/vm2/releases)
- [Changelog](https://github.com/patriksimek/vm2/blob/master/CHANGELOG.md)
- [Commits](patriksimek/vm2@3.9.17...3.9.18)

---
updated-dependencies:
- dependency-name: vm2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: required copy updates for payment launch on prod (#6327)

* feat: update banner copy on payment forms preview

* feat: add test card banner for non-production envs

* feat: update payments settings page with guide

* chore: remove unnecessary Box import

* fix: remove external link icon for payment guide

* refactor: extract textProps in preview banner

* fix: put px back into payments input panel infobox

* refactor: extract uat link to constant file

* fix: preview banner env condition

* fix: disable payment resume and duplicate modals in preview (#6334)

* feat: add isPreview context to PublicFormContext

* refactor: change isPreview props to useContext

* fix: disable payment resume modal in preview

* fix: disable payment duplicate modal in preview

* refactor: made isPreview essential

* fix: do not show any payment modal in preview

* fix(deps): bump stripe from 11.1.0 to 12.5.0 (#6330)

Bumps [stripe](https://github.com/stripe/stripe-node) from 11.1.0 to 12.5.0.
- [Release notes](https://github.com/stripe/stripe-node/releases)
- [Changelog](https://github.com/stripe/stripe-node/blob/master/CHANGELOG.md)
- [Commits](stripe/stripe-node@v11.1.0...v12.5.0)

---
updated-dependencies:
- dependency-name: stripe
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: remove support for legacy stripe metadata (#6264)

chore: remove support for legacy metadata

* fix: rm white box for payment preview when disabled (#6342)

* fix: rm white box for payment preview when disabled

* fix: paymentPreview must define paymentDetails

* chore: remove conditional frontend routing (#6190)

* chore: remove react migration vars

* chore: remove more conditional code in angular, backend types

* chore: remove angular from express routing rules!

* chore: add back public route

* chore: remove angular public route

* chore: add react router

* chore: delete home folder, rename frontend to frontend-old and frontend-new to frontend

* chore: remove src_e2e ci test, rename tests to better reflect backend-frontend split

* test: add --openssl-legacy-provider to the ci build step

* chore: update node options for build step

* chore: revert ci to node 14

* fix(deps): bump @aws-sdk/client-cloudwatch-logs from 3.276.0 to 3.332.0 (#6345)

Bumps [@aws-sdk/client-cloudwatch-logs](https://github.com/aws/aws-sdk-js-v3/tree/HEAD/clients/client-cloudwatch-logs) from 3.276.0 to 3.332.0.
- [Release notes](https://github.com/aws/aws-sdk-js-v3/releases)
- [Changelog](https://github.com/aws/aws-sdk-js-v3/blob/main/clients/client-cloudwatch-logs/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js-v3/commits/v3.332.0/clients/client-cloudwatch-logs)

---
updated-dependencies:
- dependency-name: "@aws-sdk/client-cloudwatch-logs"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: add sample-submission endpoint to retrieve sample submission data of a public form (#6325)

* feat: add createSampleSubmissionData function

* feat: add endpoint to get sample submission

* docs: add comments for GET sample submission endpoint

* feat: randomise response, add attachment type

* fix: remove form deactivation check

* tests: add unit tests for sample submission endpoint

* ref: split sample submission creation into smaller functions

* fix: return static fields in createSingleSampleSubmissionAnswer

* chore: bump version to v6.50.0

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Justyn Oh <[email protected]>
Co-authored-by: Lin Huiqing <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dexter Tan <[email protected]>
Co-authored-by: Ken Lee Shu Ming <[email protected]>
Co-authored-by: tshuli <[email protected]>
Co-authored-by: Foo Chi Fa <[email protected]>
Co-authored-by: Timothee Groleau <[email protected]>
Co-authored-by: Ken Jin <[email protected]>
  • Loading branch information
10 people authored May 18, 2023
2 parents 9e2c872 + 295d09b commit 6f54334
Show file tree
Hide file tree
Showing 131 changed files with 17,699 additions and 21,817 deletions.
55 changes: 6 additions & 49 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
outputs:
backend: ${{ steps.filter.outputs.backend }}
frontend: ${{ steps.filter.outputs.frontend }}
angularjs: ${{ steps.filter.outputs.angularjs }}
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
Expand All @@ -23,19 +22,13 @@ jobs:
frontend:
- shared/**
- frontend/**
angularjs:
- shared/**
- src/shared/**
- package.json
- package-lock.json
- src/public/**
backend:
- tests/**
- shared/**
- src/shared/**
- src/**
- package.json
- package-lock.json
- src/app/**
install:
runs-on: ubuntu-latest
steps:
Expand All @@ -51,8 +44,6 @@ jobs:
build:
needs: install
runs-on: ubuntu-latest
env:
NODE_OPTIONS: '--max-old-space-size=4096'
steps:
- uses: actions/checkout@v2
- run: mkdir -p build-output/
Expand All @@ -64,6 +55,8 @@ jobs:
cache-dependency-path: '**/package-lock.json'
- run: npm ci
- run: npm run build
env:
NODE_OPTIONS: '--max-old-space-size=4096'
- name: Upload build files
uses: actions/upload-artifact@v2
if: always()
Expand Down Expand Up @@ -126,24 +119,9 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

angularjs_test:
needs: [changes, install]
if: ${{ needs.changes.outputs.angularjs == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 14
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- run: npm ci
- run: npm run test:angularjs

src_lint:
backend_lint:
needs: [changes, install]
if: ${{ needs.changes.outputs.backend == 'true' || needs.changes.outputs.angularjs == 'true' }}
if: ${{ needs.changes.outputs.backend == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -156,24 +134,3 @@ jobs:
- run: npm ci
- run: npm run lint-ci
- run: npm_config_mode=yes npx lockfile-lint --type npm --path package.json --validate-https --allowed-hosts npm

src_e2e:
needs: [changes, build]
if: ${{ needs.changes.outputs.backend == 'true' || needs.changes.outputs.angularjs == 'true' }}
runs-on: ubuntu-latest
env:
NODE_OPTIONS: '--max-old-space-size=4096'
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v3
if: always()
with:
name: build-output
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 14
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- run: npm ci
- run: npm run test-e2e
8 changes: 6 additions & 2 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ jobs:
NODE_OPTIONS: '--max-old-space-size=4096 --openssl-legacy-provider'
REACT_APP_FORMSG_SDK_MODE: 'test'
run: npm run build
- name: Run Playwright tests
run: npx playwright test
- name: Run Playwright tests (login)
run: npx playwright test __tests__/e2e/login.spec.ts
- name: Run Playwright tests (email-submission)
run: npx playwright test __tests__/e2e/email-submission.spec.ts
- name: Run Playwright tests (encrypt-submission)
run: npx playwright test __tests__/e2e/encrypt-submission.spec.ts
- uses: actions/upload-artifact@v3
if: always()
with:
Expand Down
6 changes: 5 additions & 1 deletion .template-env
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,8 @@ FORMSG_SDK_MODE=

## Per-minute, per-IP request limits applied to specific endpoints
# SUBMISSIONS_RATE_LIMIT=
# SEND_AUTH_OTP_RATE_LIMIT=
# SEND_AUTH_OTP_RATE_LIMIT=

# Used to check if BE Server is currently running on local development environment
# One of boolean: "true" | "false"
# USE_MOCK_TWILIO=
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,55 @@ 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.50.0](https://github.com/opengovsg/FormSG/compare/v6.49.0...v6.50.0)

- feat: add sample-submission endpoint to retrieve sample submission data of a public form [`#6325`](https://github.com/opengovsg/FormSG/pull/6325)
- fix(deps): bump @aws-sdk/client-cloudwatch-logs from 3.276.0 to 3.332.0 [`#6345`](https://github.com/opengovsg/FormSG/pull/6345)
- chore: remove conditional frontend routing [`#6190`](https://github.com/opengovsg/FormSG/pull/6190)
- fix: rm white box for payment preview when disabled [`#6342`](https://github.com/opengovsg/FormSG/pull/6342)
- chore: remove support for legacy stripe metadata [`#6264`](https://github.com/opengovsg/FormSG/pull/6264)
- fix(deps): bump stripe from 11.1.0 to 12.5.0 [`#6330`](https://github.com/opengovsg/FormSG/pull/6330)
- fix: disable payment resume and duplicate modals in preview [`#6334`](https://github.com/opengovsg/FormSG/pull/6334)
- feat: required copy updates for payment launch on prod [`#6327`](https://github.com/opengovsg/FormSG/pull/6327)
- fix(deps): bump vm2 from 3.9.17 to 3.9.18 [`#6333`](https://github.com/opengovsg/FormSG/pull/6333)
- fix(deps): bump twilio from 4.7.2 to 4.11.0 [`#6328`](https://github.com/opengovsg/FormSG/pull/6328)
- fix: pin MockPass version [`#6324`](https://github.com/opengovsg/FormSG/pull/6324)
- chore: add code of conduct from contributor covenant [`#6326`](https://github.com/opengovsg/FormSG/pull/6326)
- chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.59.5 to 5.59.6 in /shared [`#6332`](https://github.com/opengovsg/FormSG/pull/6332)
- chore(deps-dev): bump @typescript-eslint/parser from 5.59.5 to 5.59.6 in /shared [`#6331`](https://github.com/opengovsg/FormSG/pull/6331)
- chore(deps-dev): bump @types/jsonfile from 6.1.0 to 6.1.1 [`#6329`](https://github.com/opengovsg/FormSG/pull/6329)
- feat: retain image metadata after compression [`#6320`](https://github.com/opengovsg/FormSG/pull/6320)
- fix: type change due to upgrade in types/express to 4.17.17 [`#6319`](https://github.com/opengovsg/FormSG/pull/6319)
- fix: playwright tests cancelled after timeout (and other issues) [`#6308`](https://github.com/opengovsg/FormSG/pull/6308)
- perf: conditionally use hooks based on activeness of field row [`#6303`](https://github.com/opengovsg/FormSG/pull/6303)
- feat: prevent prefill editing [`#6097`](https://github.com/opengovsg/FormSG/pull/6097)
- chore(deps-dev): bump axios-mock-adapter from 1.21.2 to 1.21.4 [`#6313`](https://github.com/opengovsg/FormSG/pull/6313)
- chore(deps-dev): bump husky from 8.0.2 to 8.0.3 [`#6312`](https://github.com/opengovsg/FormSG/pull/6312)
- chore(deps-dev): bump @types/opossum from 6.2.2 to 6.2.3 [`#6316`](https://github.com/opengovsg/FormSG/pull/6316)
- fix(deps): bump @sentry/browser from 7.28.1 to 7.51.2 [`#6314`](https://github.com/opengovsg/FormSG/pull/6314)
- chore(deps-dev): bump @types/express from 4.17.14 to 4.17.17 [`#6311`](https://github.com/opengovsg/FormSG/pull/6311)
- feat: add local dev support for twilio [`#5881`](https://github.com/opengovsg/FormSG/pull/5881)
- fix: squished logic block either option [`#6305`](https://github.com/opengovsg/FormSG/pull/6305)
- chore(deps-dev): bump jest-extended from 1.2.1 to 3.2.4 [`#5793`](https://github.com/opengovsg/FormSG/pull/5793)
- chore(deps-dev): bump type-fest from 2.19.0 to 3.10.0 [`#6270`](https://github.com/opengovsg/FormSG/pull/6270)
- build(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 in /frontend [`#5729`](https://github.com/opengovsg/FormSG/pull/5729)
- build(deps): bump json5 from 1.0.1 to 1.0.2 in /frontend [`#5688`](https://github.com/opengovsg/FormSG/pull/5688)
- chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.59.2 to 5.59.5 in /shared [`#6288`](https://github.com/opengovsg/FormSG/pull/6288)
- chore(deps-dev): bump @babel/plugin-transform-runtime from 7.19.6 to 7.21.4 [`#6297`](https://github.com/opengovsg/FormSG/pull/6297)
- build: merge release v6.49.0 to develop [`#6302`](https://github.com/opengovsg/FormSG/pull/6302)
- test: add stories for admin and public forms with payments [`#6292`](https://github.com/opengovsg/FormSG/pull/6292)
- build: release v6.49.0 [`#6298`](https://github.com/opengovsg/FormSG/pull/6298)

#### [v6.49.0](https://github.com/opengovsg/FormSG/compare/v6.48.0...v6.49.0)

> 11 May 2023

- feat: control feature flags through DB [`#6286`](https://github.com/opengovsg/FormSG/pull/6286)
- build: merge release v6.48.0 to develop [`#6295`](https://github.com/opengovsg/FormSG/pull/6295)
- feat: control payment methods through stripe dashboard [`#6272`](https://github.com/opengovsg/FormSG/pull/6272)
- feat: add business field mutation to form-level [`#6236`](https://github.com/opengovsg/FormSG/pull/6236)
- build: release v6.48.0 [`#6291`](https://github.com/opengovsg/FormSG/pull/6291)
- chore: bump version to v6.49.0 [`e0b174b`](https://github.com/opengovsg/FormSG/commit/e0b174b55ccdbdae3c3754cce0540d81d3bc3dc9)

#### [v6.48.0](https://github.com/opengovsg/FormSG/compare/v6.47.0...v6.48.0)

Expand Down
134 changes: 134 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](code_of_conduct.md)

# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

- The use of sexualized language or imagery, and sexual attention or advances of
any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address,
without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[email protected] .
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][mozilla coc].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][faq]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[mozilla coc]: https://github.com/mozilla/diversity
[faq]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

---

[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](code_of_conduct.md)
[![Build Status](https://github.com/opengovsg/FormSG/actions/workflows/deploy-eb.yml/badge.svg)](https://github.com/opengovsg/FormSG/actions/workflows/deploy-eb.yml)
[![Coverage Status](https://coveralls.io/repos/github/opengovsg/FormSG/badge.svg?branch=develop)](https://coveralls.io/github/opengovsg/FormSG?branch=develop)

Expand Down
16 changes: 11 additions & 5 deletions __tests__/e2e/helpers/createForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ const addBasicField = async (
case BasicField.Attachment:
await fillDropdown(
page,
page.getByRole('textbox', {
page.getByRole('combobox', {
name: 'Maximum size of individual attachment',
}),
`${field.attachmentSize} MB`,
Expand Down Expand Up @@ -590,12 +590,12 @@ const addBasicField = async (
case BasicField.Rating:
await fillDropdown(
page,
page.getByRole('textbox', { name: 'Number of steps' }),
page.getByRole('combobox', { name: 'Number of steps' }),
String(field.ratingOptions.steps),
)
await fillDropdown(
page,
page.getByRole('textbox', { name: 'Shape' }),
page.getByRole('combobox', { name: 'Shape' }),
field.ratingOptions.shape,
)
break
Expand Down Expand Up @@ -694,7 +694,11 @@ const addLogics = async (
const valueInput = page.locator(`id=conditions.${i}.value`)
switch (state) {
case LogicConditionState.Either:
await fillMultiDropdown(page, valueInput, value)
await fillMultiDropdown(
page,
page.getByRole('group').filter({ has: valueInput }),
value,
)
break
default:
switch (formFields[field].fieldType) {
Expand All @@ -718,7 +722,9 @@ const addLogics = async (
await fillDropdown(page, logicTypeInput, 'Show field(s)')
await fillMultiDropdown(
page,
page.locator('id=show'),
page
.getByRole('group')
.filter({ has: page.getByLabel('Show').first() }),
logic.show.map((n) => getTitleWithQuestionNumber(formFields, n)),
)
break
Expand Down
Loading

0 comments on commit 6f54334

Please sign in to comment.