Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: release v5.14.0 #2167

Merged
merged 58 commits into from
Jun 15, 2021
Merged

build: release v5.14.0 #2167

merged 58 commits into from
Jun 15, 2021

Conversation

mantariksh
Copy link
Contributor

@mantariksh mantariksh commented Jun 15, 2021

New

  • feat(feature-manager): remove GoogleAnalytics feature #2127
  • feat(feature-manager): remove Sentry from feature manager #2130
  • feat(feature-manager): remove feature toggles from frontend #2118
  • feat(feature-manager): tear out AggregateStats feature #2120
  • feat: store only user ID in session #1849

Improved

  • refactor(encrypt-submission): introduce IncomingEncryptSubmission #1987
  • refactor(angularjs): remove angular-moment #2154
  • build: mute Localstack logs #2146
  • feat(feature-manager): hardcode /features API response #2149
  • docs(feature-manager): update docs to reflect FeatureManager removal #2145
  • fix(submissions): remove captcha dependence on feature toggle #2143
  • test(adminsubmissionservice): unit tests for download methods #2129
  • feat(feature-manager): remove Intranet from feature manager #2131
  • refactor(submissions.client.factory): refactored download methods #2054
  • refactor(auth.client.service): refactor to Typescript #2132
  • test: remove basic and full e2e test separation #2128
  • fix(auth): make login emails case-insensitive #2125
  • refactor: formFactoryClientService #2117
  • test: loosen URL check in e2e test #2119
  • chore: remove blocking of SP and RP admin updates #2114
  • refactor(auth.client): (1) extract email validation and send login otp flow to Typescript #2084
  • fix: return storage mode submission version when when retrieving from server #2112
  • refactor: replace $resource in angularjs form-api.client.factory.js with typescript FormService #1947
  • refactor(ts-migration): ndjsonstream and process-decrypted-content #2111
  • refactor(auth.client.service): refactor to Typescript #2132

Dependency upgrades

App dependencies

  • fix(deps): bump @opengovsg/spcp-auth-client from 1.4.7 to 1.4.8 #2164
  • fix(deps): bump @sentry/integrations from 6.6.0 to 6.7.0 #2163
  • fix(deps): bump @sentry/browser from 6.6.0 to 6.7.0 #2160
  • fix(deps): bump zod from 3.1.0 to 3.2.0 #2151
  • fix(deps): bump aws-sdk from 2.925.0 to 2.927.0 #2153
  • fix(deps): bump aws-sdk from 2.924.0 to 2.925.0 #2136
  • fix(deps): bump @sentry/browser from 6.5.1 to 6.6.0 #2135
  • fix(deps): bump @babel/runtime from 7.14.0 to 7.14.5 #2139
  • fix(deps): bump @sentry/integrations from 6.5.1 to 6.6.0 #2137
  • fix(deps): bump aws-sdk from 2.923.0 to 2.924.0 #2123
  • fix(deps): bump zod from 3.0.0 to 3.1.0 #2107
  • fix(deps): bump aws-sdk from 2.922.0 to 2.923.0 #2105

Dev dependencies

  • chore(deps-dev): bump @typescript-eslint/parser from 4.26.1 to 4.27.0 #2162
  • chore(deps-dev): bump @typescript-eslint/eslint-plugin #2161
  • chore(deps-dev): bump @types/mongodb from 3.6.17 to 3.6.18 #2152
  • chore(deps-dev): bump htmlhint from 0.14.2 to 0.15.1 #2150
  • chore(deps-dev): bump @babel/plugin-transform-runtime #2141
  • chore(deps-dev): bump @babel/preset-env from 7.14.4 to 7.14.5 #2140
  • chore(deps-dev): bump @babel/core from 7.14.3 to 7.14.5 #2138
  • chore(deps-dev): bump csv-parse from 4.15.4 to 4.16.0 #2124
  • chore(deps-dev): bump @types/validator from 13.1.3 to 13.1.4 #2122
  • chore(deps-dev): bump @types/node from 14.17.2 to 14.17.3 #2108
  • chore(deps-dev): bump ts-essentials from 7.0.1 to 7.0.2 #2110
  • chore(deps-dev): bump @types/express-rate-limit from 5.1.1 to 5.1.2 #2109

frankchn and others added 30 commits June 8, 2021 19:34
* feat: Add webhook support for storage mode attachments

* fix tests post rebase

* remove merge error
chore: merge release v5.13.0 into develop
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.922.0 to 2.923.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-js@v2.922.0...v2.923.0)

---
updated-dependencies:
- dependency-name: aws-sdk
  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>
Bumps [zod](https://github.com/colinhacks/zod) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/colinhacks/zod/releases)
- [Changelog](https://github.com/colinhacks/zod/blob/master/CHANGELOG.md)
- [Commits](colinhacks/zod@v3.0.0...v3.1.0)

---
updated-dependencies:
- dependency-name: zod
  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>
…2109)

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

---
updated-dependencies:
- dependency-name: "@types/express-rate-limit"
  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>
Bumps [ts-essentials](https://github.com/krzkaczor/ts-essentials) from 7.0.1 to 7.0.2.
- [Release notes](https://github.com/krzkaczor/ts-essentials/releases)
- [Commits](https://github.com/krzkaczor/ts-essentials/commits)

---
updated-dependencies:
- dependency-name: ts-essentials
  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>
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.17.2 to 14.17.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  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>
…text, long text and number fields (#2040)

* chore: script to verify that db is consistent

* chore: remove references to customMin, customMax, Range for short text, long text and number fields in backend

* chore: remove references to customMin, customMax for short text, long text and number fields in frontend

* chore: add customMin and customMax virtuals for backward compatibility

* chore: script to unset customMin and customMax for text and number fields

* chore: remove Number casting for customVal

* chore: add todos for virtuals

* chore: correct types for virtuals

* refactor: combine TextValidationOptionsSchema

* chore: add elemMatch for field type at start of aggregation

* chore: add check for non-text/number fields

* style: lint

* chore: refine filter for update (doesn't affect outcome)

* chore: improve query syntax

* chore: rename folder to common
…2111)

* refactor(process-decrypted-content): ported over process-decrypted-content to typescript

* refactor(public/modules/forms/admin): changed callsites for process-decrypted-content

* refactor(process-decrypted-content): updated type predicate

* refactor(process-decrypted-content): inlined typeguard for neatness

* refactor(ts-migration): migrates ndjsonstream to typescript (#2053)

* feat(ndjsonstream): refactored ndjsonstream and removed old js version

* refactor(submissions.client.factory): updated callsite to use new version of ndjsonstream

* revert(ndjsonstream): adds data_buf back to prevent regression

* fix(ndjsonstream): fixed errorneous initial conditional

* fix(ndjsontream): fixed insidious bug causing occasional off by 1

* revert(ndjsonstream): reverts slice/map to for loops

* revert(ndjsonstream): reverts single line return
…ith typescript FormService (#1947)

* refactor: replace  object with typescript FormService

* test: add test for FormService

* refactor: edit calls to fit new function signature and remove angularjs

* rfix: add missing parameter in transferOwner and cfix reading error message in collaborators client controller

* refactor: add .when to all FormApi calls

* refactor: extract interceptors from FormService and replace original interceptors

* test: remove interceptor from FormService tests

* refactor: add .when to FormApi calls

* docs: add documentation and reaname some functions

* refactor: edit calls to fit new function signature and remove angularjs

* refactor: add .when to all FormApi calls

* refactor: add .when to FormApi calls

* refactor: rename getDashboardViews to getDashboardView

* fix: rename getDashboardViews in form-api.client.factory.js

* refactor: remove headers for IE11 support

* refactor: split FormService into different services

* split test into relevant files

* refactor: update other files after rename of AdminFormService

* refactor: change services and rename formapi functions

* refactor: remove outdated comment

* refactor: remove unnecessary

* docs: update jsdocs regarding AdminFormService

* refactor: remove unnecessary q.when

* refactor: change from absolute to relative import in AdminViewFormService

* refactor: shift deleteForm to UpdateFormService

* fix: change service deleteForm

* refactor: make tcalls to transformations explicit

* test: edit tests to improve readability

* refactor: update imports

* test: fix imports in tests

* style: fix eslint style in tests

* style: fix prettier errors

* fix: fix import statement in AdminSubmissionService

* fix: fix import statement in test

* fix: replace formApi.template with formApi.queryTemplate

* fix: fix incorrect endpoint for query and use of template
… server (#2112)

* fix: add version key when retrieving storage mode submission data

* fix(tests): update tests to account for version key

* feat: add version key, make types primitive for EncryptedSubmissionDto

* feat: pass in version param when decrypting on client

* test: update tests for change in EncryptSubmissionDto shape
* feat: store only user ID in session

* fix: fix test breakage

* fix: update schema correctly

* chore: remove TODO because done

* fix: update login logger to reference sessionUser._id instead of email

email is now removed from the logged in user

Co-authored-by: Kar Rui Lau <[email protected]>
…p flow to Typescript (#2084)

* feat(AdminAuthService):  add checkIsEmailAllowed service function

* ref: condense vm.checkEmail and vm.checkUser into single vm.login fn

* feat(AdminAuthService): add sendLoginOtp function

* ref: use AdminAuthService.sendLoginOtp

* ref: rename AdminAuthService to AuthService

better fit API prefix

* feat: remove all catch transformations from AuthService

not needed, may interfere with React migration. Should just handle it in the caller

# Conflicts:
#	src/public/modules/users/controllers/authentication.client.controller.js
#	src/public/services/AuthService.ts

* test(AuthService): unit tests for checkIsEmailAllowed + sendLoginOtp

* feat: remove unused functions from old auth.client

* fix(auth.client.ctl): correctly retrieve error msg when sendOtp fails

* test(AuthService): add clarity to test block

Co-authored-by: tshuli <[email protected]>

* feat(AuthService): remove throw documentation on sendLoginOtp

Co-authored-by: tshuli <[email protected]>
* feat: add v3 API for retrieving admin form by id

* feat: remove `@routes` JSDoc line as they do not add info

and can be often wrong, and the real route is already lines away

* feat(AdminViewFormService): call v3 API to retrieve admin form

this allows us to eventually deprecate the old GET /adminform endpoints (and its ilk)
Bumps [@types/validator](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/validator) from 13.1.3 to 13.1.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/validator)

---
updated-dependencies:
- dependency-name: "@types/validator"
  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>
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.923.0 to 2.924.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-js@v2.923.0...v2.924.0)

---
updated-dependencies:
- dependency-name: aws-sdk
  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>
Bumps [csv-parse](https://github.com/wdavidw/node-csv-parse) from 4.15.4 to 4.16.0.
- [Release notes](https://github.com/wdavidw/node-csv-parse/releases)
- [Changelog](https://github.com/adaltas/node-csv-parse/blob/master/CHANGELOG.md)
- [Commits](adaltas/node-csv-parse@v4.15.4...v4.16.0)

---
updated-dependencies:
- dependency-name: csv-parse
  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>
* refactor: remove form-factory.client.service.js

* fix: wrap form params in object

* refactor: change function names and arguments based on formapi changes
* feat(feature-manager): remove frontend toggles

* feat(feature-manager): remove API call for feature states

* test: fix e2e test selector for MyInfo tab
* feat: tear out FeatureNames.AggregateStats

* test: update tests to not rely on RetrievalType

* chore: remove unnecessary describe blocks

* chore: remove mentions of AGGREGATE_COLLECTION
* fix(auth): lowercase auth emails through Joi

* test: add tests for email case-insensitivity

* refactor: move lowercase after email validation message

* test: fix POST endpoint in new tests

* test: fix remaining tests
* feat(AuthService): add verifyLoginOtp fn

* ref: use AdminAuthService.verifyLoginOtp

* ref: rename Admin to User

better fit API prefix

* ref(AuthService): move User related fns to UserService

* test(AuthService): add unit tests for verifyLoginOtp

* chore: add jest-localstorage-mock package

for mocking localstorage in the frontend jest tests

* test(UserService): add unit tests for saveUserToLocalStorage

* chore: move date-fns from devDeps to deps

* feat: add base typings for Agency and User

in preparation for extending from to close #2066

* feat: remove unused verifyOtp function

* chore: set VSCode default TS version to follow node_modules

* ref: move saveUserToLocalStorage responsibility to calling controller

* feat(UserService): add fetchUser function

* ref(avatar-dropdown.client): use UserService.fetchUser()

* test(UserService): add unit tests for fetchUser

* feat: remove unused refreshUser function

* feat(UserService): add clearUserFromLocalStorage function (and tests)

* feat: move responsibility of clearing user from localStorage to ctl

* fix: correctly set truser when fetching user from server

* ref: use UserService.saveUserToLocalStorage

* feat(AuthService): add and use logout function

* feat: remove unused Auth.signOut and setUser functions

* test(AuthService): add unit test for logout

test(UserService): add tests for clearUserFromLocalStorage

* feat(UserService): add getUserFromLocalStorage function

* ref: replace all instances of Auth.getUser with UserService equivalent

* feat: delete unused auth.client.service.js

* test(UserService): add unit tests for getUserFromLocalStorage

* chore: run npm run lint

i didn't even touch this part of the code...
)

* feat(adminsubmissionsservice): ported over download related methods to service

* refactor(submissions.client.factory): removed functions that was shifted to admin subimssion service

* refactor(public): changed frontend call site for migrated methods

* feat(formsgsdkservice): migrates form sg sdk service to ts

* refactor(formsgsdk.client.factory): removed old file

* refactor(formsgsdkservice): refactored to check mode using window and use named export

* refactor(main.js): removed formsgsdk client fatory

* refactor(formsgsdkservice): changed frontend callsites to use named imports

* refactor(adminsubmissionservice): adds return type and exports downloadAndDecryptAttachment

* feat(injectedvariables): adds be injected variables into fe

* refactor(formsgsdkservice): uses new injectedvariables for sdk mode

* style(adminsubmissionservice): use ?? instead of ||

* fix(response-attachment.client): fixed no UI response on empty bytes array

* fix(response-attachment.client.component): added early return to avoid fall through
* feat(feature-manager): remove Intranet feature

* feat: allow IP list path to default to empty string
* test(adminsubmissionsservice): adds tests for download related methoids

* test(adminsubmissionsservice): adds new test case for when sdk returns null
Bumps [@sentry/integrations](https://github.com/getsentry/sentry-javascript) from 6.5.1 to 6.6.0.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](getsentry/sentry-javascript@6.5.1...6.6.0)

---
updated-dependencies:
- dependency-name: "@sentry/integrations"
  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>
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.14.3 to 7.14.5.
- [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.14.5/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  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>
LoneRifle and others added 8 commits June 14, 2021 17:33
As we have no need for the AngularJS filters and directives that
angular-moment provides, remove it completely, referencing moment
as a CommonJS module instead
Bumps [@sentry/browser](https://github.com/getsentry/sentry-javascript) from 6.6.0 to 6.7.0.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](getsentry/sentry-javascript@6.6.0...6.7.0)

---
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>
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.26.1 to 4.27.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.27.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  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>
…#2162)

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.26.1 to 4.27.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.27.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  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>
Bumps [@sentry/integrations](https://github.com/getsentry/sentry-javascript) from 6.6.0 to 6.7.0.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](getsentry/sentry-javascript@6.6.0...6.7.0)

---
updated-dependencies:
- dependency-name: "@sentry/integrations"
  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>
Bumps [@opengovsg/spcp-auth-client](https://github.com/opengovsg/spcp-auth-client) from 1.4.7 to 1.4.8.
- [Release notes](https://github.com/opengovsg/spcp-auth-client/releases)
- [Commits](opengovsg/spcp-auth-client@v1.4.7...v1.4.8)

---
updated-dependencies:
- dependency-name: "@opengovsg/spcp-auth-client"
  dependency-type: direct:production
  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>
* refactor: simplify isUenValid logic

* fix: use stricter regex matching
@mantariksh
Copy link
Contributor Author

mantariksh commented Jun 15, 2021

@seaerchin

Tests

IncomingEncryptSubmission
Do the following tests with the network tab open so you can copy the request body for testing.

  • Duplicate this storage mode form. Submit with all optional fields left empty. No errors should occur.
  • Use the same form and fill everything up. No errors should occur. You should get an auto-reply email.
  • Go to the network tab and copy the request as cURL. paste in terminal, modify the responses field by setting the email field to be a non-email. Should fail and tell you that there's something wrong with the submission
  • Paste the same request you copied earlier into the terminal, modify the responses array by deleting one element. Should fail and tell you that the form has been updated.
  • I'm sorry but you'll have to repeat the above 4 again, but this time in the preview page.
  • Decrypt responses and ensure that none were lost.

@mantariksh
Copy link
Contributor Author

mantariksh commented Jun 15, 2021

@chowyiyin

Tests

Remove angular-moment

  • Modify a form and check that the "last modified" under the form title in the admin dashboard is formatted the same way as in production
  • Check that the "last modified" date for forms in the form dashboard is formatted the same way as in production
  • Storage mode CSV download works correctly
  • Formatting of submission date in end page (page after submitting form) works correctly

@mantariksh
Copy link
Contributor Author

mantariksh commented Jun 15, 2021

@chowyiyin

Tests

Frontend submissions factory
First create a storage mode form with an attachment field and publish it. Go to the form and submit it >1 times with attachment and a few times without.

  • Go to the admin panel and unlock the form. Click on export and attempt both actions. This should succeed and the csv should contain the correct # of responses.
  • Click into a single response (with data) then select download as zip. The download should succeed.
  • Click into a single response (with data) and click on the attachment. The download should succeed

@mantariksh
Copy link
Contributor Author

mantariksh commented Jun 15, 2021

@seaerchin

Tests

Frontend auth service

  • Reach verify OTP flow. Invalid OTP should be rejected. Valid OTP should succeed
  • On successful log in, the user object should be stored in localStorage
  • Chrome network tab. Refresh at the dashboard page. There should be a call to /user. The call should succeed and return the current user. Localstorage should also be replaced (or unchanged)
  • Logout from the app. The user item from localStorage should be cleared and you should be kicked out to the login page.
  • Open avatar dropdown. Should load current user successfully.
  • Open edit contact number modal. Should load current user successfully.
  • Look at Google Analytics when you have downloaded a storage mode form responses. The label should be ${params.formTitle} (${params.formId}), ${<your email>}- tested with kr's help
  • In your admin form, go to the share form page. There should be a "use go link" lightbulb tooltip thingy
  • Should be able to successfully view admin form page (of your form) when logged in
  • Should be able to successfully view the edit form field modal successfully when logged in
  • Should be able to view form dashboard successfully when logged in
  • Should be able to view form settings successfully when logged in
  • Should be able to view examples page successfully when logged in
  • Should be able to view billing page successfully when logged in
  • In an admin form page, delete the user object from localStorage.
    • Should be logged out and redirected to the login page when navigating to another page
    • After login, should be redirected back to the admin form dashboard

@mantariksh
Copy link
Contributor Author

mantariksh commented Jun 15, 2021

@seaerchin

Tests

Frontend form factory service

  • Duplicate any form. Ensure duplicate form modal appears and duplicated form appears on the dashboard upon completion.
  • Create a form from scratch in storage mode and email mode. Should be redirected to edit page with no existing fields. Check that form appears on dashboard.
  • Select create new form and select any covid template. Modal with template form in public view should be displayed. Select "Use Template", and follow steps to create form. Ensure relevant form fields are present on edit page.
  • Select any template under examples. Select "Use Template", and follow steps to create form. Ensure relevant form fields are present on edit page.

@mantariksh
Copy link
Contributor Author

mantariksh commented Jun 15, 2021

@seaerchin

Tests

Email validation

  • Login with invalid email. Should return and display not-whitelisted error message below the input
  • Login with disconnected internet (chrome console > network > offline). Should display error message below the input
  • Login with valid email. Should proceed to verify OTP page
  • Enter invalid OTP. Should reject.
  • Click resend OTP, then use previous valid OTP. Should reject. Should receive new OTP.

@mantariksh
Copy link
Contributor Author

mantariksh commented Jun 15, 2021

@yong-jie

Tests

Storage mode submission version

  • View individual storage mode response. Should decrypt and display correctly
  • Download storage mode response (without attachment). Should download correctly and correct responses decrypted.
  • Download storage mode response. same as above.

@mantariksh
Copy link
Contributor Author

mantariksh commented Jun 15, 2021

@seaerchin

Tests

Frontend form API factory

  • Load forms dashboard page. Check that all available forms are present. (query)
  • Click on any form. Should be redirected to edit page. Check that previous fields (if any) are present. (getAdmin)
  • Click on open in new window in share tab without activating form. Should be redirected to error page. (getPublic)
  • Click on open in new window in share tab after activating form. Should be redirected to public view of form. (getPublic)
  • Duplicate a field in a form. Check that the field is duplicated correctly i.e. contents of the field are correct (update)
  • Duplicate any form. Ensure duplicate form modal appears and duplicated form appears on the dashboard upon completion (save)
  • Delete a form. Ensure that the form is no longer visible on the dashboard (delete)
  • Create a form from scratch in storage mode and email mode. Should be redirected to edit page with no existing fields. Check that form appears on dashboard. (create)
  • Select create new form and select any template. Modal with template form in public view should be displayed. (template)
  • Select use template (following from previous check). Perform same checks done for create form.
  • Select preview mode of any existing form. Should be redirected to preview page. (preview)
  • Add a collaborator and change role to owner. Ownership should have changed. (transferOwner)
  • Create myinfo fields. Check that myinfo fields are correctly stripped and injected.
  • Duplicate myinfo fields. Check that myinfo fields are correctly stripped and injected.
  • Duplicate a form with myinfo fields. Check that myinfo fields are correctly stripped and injected.
  • Check that myinfo fields are correctly injected into public form view
  • Check that forms can be createdfrom the examples page
  • Check that forms can be created from the "Share Template" link under the "Share" tab

@mantariksh
Copy link
Contributor Author

mantariksh commented Jun 15, 2021

@mantariksh

Tests

Prerequisites

  • Create email form with email field that has autoreply toggled
  • Create storage mode form with email field that has autoreply toggled

IE 11 public facing submission

  • Can access email form
  • Can submit email form
  • For email forms, should receive autoreply email (with pdf if toggled)
    • As admin, should receive submission email
  • For storage forms, should receive autoreply email
    • As admin, check responses tab and a new submission should have been made. (no need to be on IE11)
    • As admin, response should be decrypt-able (no need to be on IE11)
  • Should be able to submit feedback (check on admin side)

* Revert "refactor: simplify isUenValid logic (#2156)"

This reverts commit 8f0eda6.

* Revert "feat: add UEN field (#2100)"

This reverts commit 35eeeaf.

* Revert "feat: add and call v3 API for retrieving individual admin form (#2113)"

This reverts commit e55e1a9.

* Revert "chore: remove redundant ValidationOption object properties for short text, long text and number fields (#2040)"

This reverts commit 95b6297.

* Revert "feat: Add webhook support for storage mode attachments (#1713)"

This reverts commit 332d3ce.
@mantariksh mantariksh merged commit 66911f7 into release Jun 15, 2021
@karrui karrui deleted the release-v5.14.0 branch August 17, 2021 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants