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

[#11878] Account request form #13051

Merged
merged 51 commits into from
Apr 18, 2024
Merged

[#11878] Account request form #13051

merged 51 commits into from
Apr 18, 2024

Conversation

ziqing26
Copy link
Contributor

Resolves #11878

Outline of Solution

ziqing26 and others added 30 commits March 12, 2024 09:56
* Remove AccountRequest unique constraint

* Remove EntityAlreadyExistsException from the throws clause

* Remove unused import of EntityAlreadyExistsException

* Fix failing checks

* Remove EntityAlreadyExistsException in dependents

* Remove assertion that is now incorrect

* Remove mysterious trailing whitespaces that appeared out of nowhere

* Remove parts in E2E test that are no longer relevant

* Remove unused import

* Improve clarity of test case

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

---------

Co-authored-by: EuniceSim142 <[email protected]>
* Add AccountRequestStatus

* Add AccountRequest status attribute

* Add status to AccountRequest constructor

* Add AccountRequest comments attribute

* Add comments to AccountRequest constructor

* Wrap lines

* Remove mysterious unnecessary imports that appeared out of nowhere

* Use non-null placeholder

* Use literal placeholder
* Add admin alert email

* Add email type

* Add subject

* Add email content

* Indicate that action is needed in the email subject
* add endpoint

* remove 'all' in class and method names

* fix checkstyle

* add it test

* fix checkstyle

* fix checkstyle

* fix failing test

* update endpoint url

* update it tests

* fix linting

* update param name

* update request param condition
* Add AccountCreateRequest instructorComments attribute

* Add new AccountRequestData attributes

* Remove check for registered instructor

* Remove sending of registration email

* Use AccountCreateRequest comments

* Change output of CreateAccountRequestAction to AccountRequestData

* Add CreateAccountRequestActionIT

* Test execute with null arguments

* Test execute with valid requests

* Test execute on invalid arguments

* Allow anybody to create an account request

* Fix architecture test

* Fix test

* Update tests to verify search indexing
* Add confirmation prompt

* Remove old form iframe

* Improve declaration view spacing

* Edit page heading phrasing for clarity

* Create request form

* Add validation messages

* Fix form validation

* Set up form submission confirmation

* Create submission acknowledgement view

* Fix URL checking regex

* Fix initial state

* Display placeholder when optional field is empty

* Fix code style

* Edit comment for clarity

* Fix institution and country combination

Co-authored-by: Jay Aljelo Ting <[email protected]>

* Fix naming

* Remove hard line break

* Add explanatory comment for regex

* Remove newline

* Add newlines at end of file

* Clear styles file

* Re-add styles file

* Include test

* Add test cases for requestSubmissionEvent

* Improve test case readability

* Edit test case name for clarity

* Add snapshot tests

* Revert "Add snapshot tests"

This reverts commit ec7395d.

* Fix lint errors

* Rename methods to be clearer

* Disable submit button when not ready to submit

---------

Co-authored-by: Jay Aljelo Ting <[email protected]>
* create component for account request table

* cherry pick admin home page changes

* remove testing code

* fix lint and css issues

* fix admin home page snaps

* update admin home snaps

* remove edit approve and reject components

* modify css

* delete edit and reject modal components

* revert spec file changes

* integrate new types

* fix lint

* use enum for status

* fix lint

* fix css lint

* fix lint

* fix lint

* use enum and remove infinite scroll

* remove approve account request code

* remove extra div

* fix url

* modify comments

* revert extra formatting

* remove plural form and use date pipe

* fix naming

* fix spec file and update institute formatting

* fix lint

* combine institute and country columns
* update admin search page to use acc req component

* fix selector for e2e test

* fix spec files and imports

* update e2e selector

* fix column numbers
* Add facade logic method to get an account request by ID

* Add storage method to get an account request by ID

* Add logic method to get an account request by ID
* Add snapshot tests

* Change double quotes to single quotes
…12957)

* Add account request ID query parameter

* Add account request ID to related front-end types
* Create instructor request acknowledgement email

* Add tests for acknowledgement email

* Fix test cases

* Fix comments in expected email

* Use config support email value in email template

* Fix email recipient

* Fix test expected emails

* Remove trailing space

* Use placeholder for support email

* Sanitize acknowledgement email

* Set acknowledgement email to bcc support
* Update chrome driver download link in e2e-testing.md (#12924)

* [#12048] Add SQL configuration into build.properties and build-dev.properties (#12917)

* Add production config

* Remove forgotten host and password

* Fix lint

---------

Co-authored-by: Zhang Ziqing <[email protected]>

* [#12048] Add SQL description for postgres config (#12931)

* Add production config

* Remove forgotten host and password

* Fix lint

* Address changes, include production_user

* Linting

* [#12588] Improve test code coverage of core components - ToastComponent (#12916)

* add test cases

* add test case for isTemplate()

---------

Co-authored-by: Cedric Ong <[email protected]>
Co-authored-by: Dominic Lim <[email protected]>

* [#12588] Add unit tests to question edit answer form (#12935)

* add unit tests to constsum-options-question-edit-answer-form

* add unit tests to constsum-options-question-edit-answer-form

---------

Co-authored-by: Zhang Ziqing <[email protected]>

* add delay to task queuer for indexing account request (#12936)

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

* Make account req data migration script rerunnable (#12932)

* [#12048] Relax read notif verification for migration verification script (#12937)

* Fix account requests with wrong field during seed

* Relax account attributes verification

* Fix lint errors

* Fix order of account request variables

* [#12920] Create script to migrate noSQL test data to SQL schema format (#12922)

* Add classes to migrate test json data

* Add toposort  script

* Add function to remove foreign key data

* Cleanup

* WIP

* Simplify keys for students and instructors

* Fix lint issues

* Output SQL JSON in same folder as JSON

* Change output file name

* Fix bug: wrong jsonkey used

* Fix lint error

* Make section and team name unique

* Set read notification key to be unique

* Delete python file

* [#12588] Improve test code coverage of core components - ViewResultsPanelComponent (#12918)

* add test cases to ViewResultsPanelComponent

* fix lint errors

---------

Co-authored-by: Dominic Lim <[email protected]>
Co-authored-by: Zhang Ziqing <[email protected]>

* fix resetAccountAction (#12934)

Co-authored-by: Zhang Ziqing <[email protected]>

* [#12048] Migrate Feedback Rank Option E2E test (#12902)

* Initial commit

* Fix lint

* Follow convention and add test

* Change file path

* Fix requested changes

* Fixed testcases

* Fix lint

* Add deepcopy

* Fixed e2e test

---------

Co-authored-by: Wei Qing <[email protected]>
Co-authored-by: Cedric Ong <[email protected]>

* [#12048] Migrate FeedbackMcqQuestionE2ETest (#12820)

* Migrate MCQ E2E

* Fix lint

* Fix lint

* Update xml

---------

Co-authored-by: Cedric Ong <[email protected]>

* [#12048] Remove unnecessary loading of datastore entities in InstructorNotificationsPageE2ETest (#12911)

* migrate instructor notif e2e

---------

Co-authored-by: Cedric Ong <[email protected]>

* [#12048] Migrate InstructorCourseDetailsPageE2ETest (#12908)

* Add teammates.e2e.cases.sql.InstructorCourseDetailsPageE2ETest

* Remove data properly to prevent clashes

* Add SQL data bundle

* Verify loaded details

* Use email address when getting a student row

* Check student links

* Verify the sending of invites

* Verify the reminding of all students to join

* Remove SQL data properly to prevent clashes

* Verify the downloading of the student list

* Implement helper methods for Student

* Add BaseTestCaseWithSqlDatabaseAccess::verifyAbsentInDatabase

* Add to testng-e2e-sql.xml

* Verify the deleting of students

* Verify the deleting of all the students

* Fix lint

* Remove duplicate equality check for students

* [#12588] add unit tests for question submission form (#12897)

Co-authored-by: Zhang Ziqing <[email protected]>

* Update developers.json (#12958)

* Merge pull request #12960 from TEAMMATES/master (#12961)

* [#12048] Fix account request indexing (#12967)

* Add isTransactionNeeded method to Action

* Remove delay from taskqueuer

* Change CreateAccountRequest to handle own transactions

* configure agroal connection pool (#12971)

* Fix comment style for merge

* Remove unnecessary check for account request

---------

Co-authored-by: Nada Ayesh <[email protected]>
Co-authored-by: FergusMok <[email protected]>
Co-authored-by: Maureen Chang <[email protected]>
Co-authored-by: Cedric Ong <[email protected]>
Co-authored-by: Dominic Lim <[email protected]>
Co-authored-by: Nicolas <[email protected]>
Co-authored-by: Ching Ming Yuan <[email protected]>
Co-authored-by: Wei Qing <[email protected]>
Co-authored-by: DS <[email protected]>
Co-authored-by: Jay Aljelo Ting <[email protected]>
* Change institute name max length to 128

* Edit test case for new length limit
* update search document and create-core script

* update it

* modify relevant classes to use id instead of (email, institute)

* remove duplicate method

* fix it tests

* fix failing tests

* remove unnecessary comment
* Integrate instructor request form FE with API

* Remove redundant statement

* Move URL regex const to backend const file

* Fix import path

* Move URL regex to FieldValidator

* Add validators to match backend fields

* Add error message box

* Change submit button display when loading

* Combine final action into subscribe

* Add max length validators for institution and country

* Fix lint errors

* Add test cases to test submission

* Add specific error messages for form validation

* Remove home page URL field

* Fix lint errors

* Remove url regex from test

* Update snap

* Clean up test code

* Remove comment about home page URL

* Change canSubmit check to getter

* Fix form submit button not re-enabling on error

* Add name pattern validator to front-end

* Fix snapshot
* create update action and IT

* update javadocs

* update tests

* add more tests

* simplify logic

* remove unused string

* fix test

* allow null comments

* add more tests

* use EntityNotFoundException

* cleanup after create account requests test

* remove unncessary check
* update account request indexing

* add methods to test access control

* refactoring for transactions
* add edit and approve functionality

* remove rejection code

* fix snap

* integrate endpoint

* disable approve button for approved requests

* use comments instead of comment

* use searchString instead of searchQuery

* fix snap
* add rejection-email template and email generator method

* add javadoc for email generator method

* add test

* fix test method names

* fix test method name 2

* fix lint

* add bcc for rejection email
* Create account request rejection endpoint

* Add validation

* Add check for already rejected request when sending email

* Add integration test cases

* Set request method to post

* Fix lint errors

* Update tests list

* Update validation check

* Add test for validation

* Fix lint errors

* Fix validation comparison

* Fix error message test

* Add email sending

* Update test cases

* Refactor reason check code for clarity
* Create rejection modal

* fix lint and tests

* fix placeholders and lint

* remove title

* integrate api

* check undefined title and body

* fix trailing white spaces

* fix whitespace

* change error message

* re-add account request table on home page

* replace support email
* Update to delete by id

* fix lint

* fix lint

* fix frontend lint
* Update reset to reference by id

* fix comments
* add error message for duplicate account request

* add tests
cedricongjh and others added 21 commits April 12, 2024 20:40
* change GetAccountRequestAction to get by id

* fix tests

* remove unncessary todo
* Update chrome driver download link in e2e-testing.md (#12924)

* [#12048] Add SQL configuration into build.properties and build-dev.properties (#12917)

* Add production config

* Remove forgotten host and password

* Fix lint

---------

Co-authored-by: Zhang Ziqing <[email protected]>

* [#12048] Add SQL description for postgres config (#12931)

* Add production config

* Remove forgotten host and password

* Fix lint

* Address changes, include production_user

* Linting

* [#12588] Improve test code coverage of core components - ToastComponent (#12916)

* add test cases

* add test case for isTemplate()

---------

Co-authored-by: Cedric Ong <[email protected]>
Co-authored-by: Dominic Lim <[email protected]>

* [#12588] Add unit tests to question edit answer form (#12935)

* add unit tests to constsum-options-question-edit-answer-form

* add unit tests to constsum-options-question-edit-answer-form

---------

Co-authored-by: Zhang Ziqing <[email protected]>

* add delay to task queuer for indexing account request (#12936)

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

* Make account req data migration script rerunnable (#12932)

* [#12048] Relax read notif verification for migration verification script (#12937)

* Fix account requests with wrong field during seed

* Relax account attributes verification

* Fix lint errors

* Fix order of account request variables

* [#12920] Create script to migrate noSQL test data to SQL schema format (#12922)

* Add classes to migrate test json data

* Add toposort  script

* Add function to remove foreign key data

* Cleanup

* WIP

* Simplify keys for students and instructors

* Fix lint issues

* Output SQL JSON in same folder as JSON

* Change output file name

* Fix bug: wrong jsonkey used

* Fix lint error

* Make section and team name unique

* Set read notification key to be unique

* Delete python file

* [#12588] Improve test code coverage of core components - ViewResultsPanelComponent (#12918)

* add test cases to ViewResultsPanelComponent

* fix lint errors

---------

Co-authored-by: Dominic Lim <[email protected]>
Co-authored-by: Zhang Ziqing <[email protected]>

* fix resetAccountAction (#12934)

Co-authored-by: Zhang Ziqing <[email protected]>

* [#12048] Migrate Feedback Rank Option E2E test (#12902)

* Initial commit

* Fix lint

* Follow convention and add test

* Change file path

* Fix requested changes

* Fixed testcases

* Fix lint

* Add deepcopy

* Fixed e2e test

---------

Co-authored-by: Wei Qing <[email protected]>
Co-authored-by: Cedric Ong <[email protected]>

* [#12048] Migrate FeedbackMcqQuestionE2ETest (#12820)

* Migrate MCQ E2E

* Fix lint

* Fix lint

* Update xml

---------

Co-authored-by: Cedric Ong <[email protected]>

* [#12048] Remove unnecessary loading of datastore entities in InstructorNotificationsPageE2ETest (#12911)

* migrate instructor notif e2e

---------

Co-authored-by: Cedric Ong <[email protected]>

* [#12048] Migrate InstructorCourseDetailsPageE2ETest (#12908)

* Add teammates.e2e.cases.sql.InstructorCourseDetailsPageE2ETest

* Remove data properly to prevent clashes

* Add SQL data bundle

* Verify loaded details

* Use email address when getting a student row

* Check student links

* Verify the sending of invites

* Verify the reminding of all students to join

* Remove SQL data properly to prevent clashes

* Verify the downloading of the student list

* Implement helper methods for Student

* Add BaseTestCaseWithSqlDatabaseAccess::verifyAbsentInDatabase

* Add to testng-e2e-sql.xml

* Verify the deleting of students

* Verify the deleting of all the students

* Fix lint

* Remove duplicate equality check for students

* [#12588] add unit tests for question submission form (#12897)

Co-authored-by: Zhang Ziqing <[email protected]>

* Update developers.json (#12958)

* Merge pull request #12960 from TEAMMATES/master (#12961)

* [#12048] Fix account request indexing (#12967)

* Add isTransactionNeeded method to Action

* Remove delay from taskqueuer

* Change CreateAccountRequest to handle own transactions

* configure agroal connection pool (#12971)

* [#12048] Configure connection pool using hikari (#12978)

* Configure hikari

* Remove spacing

* Lint

* [#12048] Update liquibase configuration (#12930)

* Update gradle config

* Update liquibase config for v9

* Turn off table generate for prod

* Update of changelog file

* Add configuration for generating changelog

* Add schema migration docs

---------

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

* [#12048] Migrate AccountRequestsLogicTest (#12780)

* Migrate test cases for AccountRequestsLogic

* Remove test case

* Split test cases

* [#12048] Migrate AdminSearchPageE2ETest SQL (#12811)

* test e2e changes

* fix: reduce e2e test json file size

* fix student key

* fix course key

* fix instructor keys

* fix filepath

* fix e2e test

* remove extra data from bundle

* Add correct removal logic to avoid constraint violation

* Fix e2e tests and lint

fix reset google id test

fix e2e tests

fix e2e tests

fix tests

remove double click

fix unknown symbol

add toast check

change toast verification message

remove toast check

* fix: add null check

* move admin search page e2e test to sql cases

* Rename AdminSearchPageE2ETest_SQLEntities.json to AdminSearchPageE2ETest_SqlEntities.json

* fix failing test

* fix: remove extra null check

* fix: add test to e2e sql xml file

* fix function call

* remove unnecessary changes

* create new file for sql entities

* revert unnecessary changes

* remove trailing whitespace

* add teardown for account requests

---------

Co-authored-by: Cedric Ong <[email protected]>

* [#12995] Create documentation for unit tests (#12996)

* Create documentation for unit tests

* Update docs/unit-testing.md

Co-authored-by: Zhang Ziqing <[email protected]>

* Update docs/unit-testing.md

Co-authored-by: Zhang Ziqing <[email protected]>

---------

Co-authored-by: Zhang Ziqing <[email protected]>

* [#12048] Remove feedbackSession attributes @fetch annotation (#12992)

* Remove feedbackSession @fetch annotation

* [#12048] create skeleton for sql LNP tests (#12994)

* create skelton for sql LNP tests

* allow lnp test to access sql storage and ensure sql lnp tests are independant of each other

---------

Co-authored-by: Zhang Ziqing <[email protected]>

* [#12048] Migrate FeedbackNumScaleQuestionE2ETest (#12940)

* Migrate num scale e2e

* Fix team id

* Fix bugs

* Add v9.0.0 tag to liquibase changelog (#13005)

* sort courses by id before comparison (#13003)

Co-authored-by: Dominic Lim <[email protected]>

---------

Co-authored-by: Nada Ayesh <[email protected]>
Co-authored-by: FergusMok <[email protected]>
Co-authored-by: Maureen Chang <[email protected]>
Co-authored-by: Cedric Ong <[email protected]>
Co-authored-by: Dominic Lim <[email protected]>
Co-authored-by: Nicolas <[email protected]>
Co-authored-by: Ching Ming Yuan <[email protected]>
Co-authored-by: Wei Qing <[email protected]>
Co-authored-by: DS <[email protected]>
Co-authored-by: Jay Aljelo Ting <[email protected]>
Co-authored-by: Xenos F <[email protected]>
Co-authored-by: domoberzin <[email protected]>
Co-authored-by: Marques Tye Jia Jun <[email protected]>
* add component tests for account request table

* modify tests

* remove old tests

* remove comment

* remove unnecessary code

* add tests

* update disabled criteria

* remove extra builders and update snaps
* Reference by ID in GetCourseJoinStatusActionIT

* Reference by ID in AccountRequestsDbIT

* Reference by ID in AccountRequestsLogicIT

* Reference by ID in CreateAccountActionIT

* Reference by ID in BaseTestCaseWithSqlDatabaseAccess

* Remove now irrelevant reference by email address and institute
* add toasts

* lint
* fix tooltip

* re-add removed lines

* update snap

* update snaps

* lint

* suppress warning

* lint
…ing email (#13032)

* Add check if admin when creating account request

* Trim down test case
* feat: add order-by

* fix: fix failing test case

* fix: add missing created-at field

* fix: test case comment
* Add E2E skeleton

* Fix test and lint

* Add verifyEmailSent

* fix fe tests
* Add get typical account request method

* Migrate AccountRequestsLogicTest

* Remove test for get by email address and institute

---------

Co-authored-by: Jay Aljelo Ting <[email protected]>
* add admin e2e tests

* remove exception catching and update snaps

* fix snaps

* add comment verification

* fix test
@ziqing26 ziqing26 requested a review from jayasting98 April 18, 2024 04:59
@ziqing26 ziqing26 added this to the V9.0.0-beta.5 milestone Apr 18, 2024
@ziqing26 ziqing26 added s.ToReview The PR is waiting for review(s) c.Feature User-facing feature; can be new feature or enhancement to existing feature labels Apr 18, 2024
@ziqing26 ziqing26 self-assigned this Apr 18, 2024
@ziqing26 ziqing26 merged commit c76df68 into master Apr 18, 2024
22 checks passed
@wkurniawan07 wkurniawan07 deleted the account-request-form branch April 19, 2024 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c.Feature User-facing feature; can be new feature or enhancement to existing feature s.ToReview The PR is waiting for review(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Account Request Form Upgrade
7 participants