Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
209 commits
Select commit Hold shift + click to select a range
d92a020
initial backend structure for activity post, likes, comments
AlexanderChiuy Feb 23, 2023
ab5f7fe
Correct model relations + adjust DTOs/Orchestrations
ty-labs Feb 24, 2023
a4450d7
Register data models with database
ty-labs Feb 25, 2023
1ecbdca
Update index.ts file to export repo models
ty-labs Feb 25, 2023
be6841d
Add skeleton for backend orchestrations + services
ty-labs Feb 25, 2023
f3ada7a
created activity feed client folder; mapped to it from navbar
Mar 1, 2023
8bb0301
Merge branch 'backend/activity_post' into frontend/activityfeed
ty-labs Mar 4, 2023
5c653eb
Add client implementation of ActivityPost/Comment orchestrations
ty-labs Mar 4, 2023
8774004
Fix BE user service to reflect new models
ty-labs Mar 5, 2023
d6e5b18
Add NgRx connection FE -> BE
ty-labs Mar 5, 2023
cda2b3d
Add carousel/slides to the ActivityPost
ty-labs Mar 6, 2023
cf3d4ff
like functionality implemented
AlexanderChiuy Mar 15, 2023
f4e3d0b
unlike functionality complete
AlexanderChiuy Mar 15, 2023
4d8966d
working like button
AlexanderChiuy Mar 16, 2023
456a5ae
Comments page skeleton
Bwillia2 Mar 17, 2023
b1dbffb
Prevent Full Post Re-Render on Liking, Prevent Click Spam, Fix data race
ty-labs Mar 18, 2023
c047bb6
Working to begin with except for issue in html
rgorham Mar 19, 2023
52ada48
Working test for creation
rgorham Mar 19, 2023
c3925e5
Added comment for this code block
rgorham Mar 19, 2023
db2684b
Working test for creation
rgorham Mar 19, 2023
fe89166
included imStorageUrlPipeModule
rgorham Mar 19, 2023
c9f6b08
Re-added accidently deleted files environment.ts and sp-application.s…
Mar 19, 2023
3479e9a
Add like/unlike testing for Activity-Post service
ty-labs Mar 20, 2023
1d34a60
Merge branch 'frontend/activityfeed' of github.com:involveMINT/iMPubl…
ty-labs Mar 20, 2023
54a53d5
Added modalController for comments, tried to add backend, doesn't com…
Mar 20, 2023
e97759f
Add reducer test template
ty-labs Mar 21, 2023
06e895d
Add NgRx Action Tests For ActivityPosts
ty-labs Mar 21, 2023
c3a50ca
Add NgRx Effects Testing Framework + 1 Working Test
ty-labs Mar 21, 2023
c0dcf8c
createComments dispatched but not received by server
Jareltey Mar 22, 2023
37116b3
Add comments to index.ts file, refactor hide and unhide operations in…
Jareltey Mar 22, 2023
b8cb0d6
basic display of backend comments and user comment creation
Bwillia2 Mar 22, 2023
9596bc2
Add NgRx ActivityPost Effect Tests
ty-labs Mar 23, 2023
3fc0da3
comments show handle of author's name and profile picture
Bwillia2 Mar 23, 2023
d6856ef
cleaned up some lingering POI text
AlexanderChiuy Mar 24, 2023
0e3f183
Remove dead /activitypost directory
ty-labs Mar 26, 2023
a1ee4fa
Merge pull request #33 from involveMINT/frontend/activityfeed
AlexanderChiuy Mar 27, 2023
efb4d2b
automatically create activity post from poi submission
AlexanderChiuy Mar 28, 2023
5b8d6c0
fixed small bug with activity post status 'stopped'
AlexanderChiuy Mar 28, 2023
280bc18
Merge pull request #38 from involveMINT/frontend/activityfeed
ty-labs Mar 28, 2023
ea2c0bd
Add NgRx State to Coment Modal
ty-labs Mar 29, 2023
75fa65c
added in notification digest service
AlexanderChiuy Mar 29, 2023
1822b61
Add Digest Modal Location
ty-labs Mar 29, 2023
471abe0
re-upload accidently deleted activity-post carousel
Mar 30, 2023
0988fbe
fix merge conflicts with feature/activity-feed
isong2 Mar 30, 2023
c2a6b40
first iteration notification digest
AlexanderChiuy Mar 30, 2023
a8ebf5e
Merge branch 'feature/activity-feed' into feature/notifications
ty-labs Mar 30, 2023
14fe835
Update Notification Digest UI + Scrollable
ty-labs Mar 30, 2023
74451ee
trying to get digest to show recent posts
AlexanderChiuy Mar 30, 2023
0b34b86
fixed compilation errors and merge conflicts
isong2 Mar 31, 2023
8ec43be
fixed merge conflicts 2.0
isong2 Mar 31, 2023
5169f3a
Add Digest Post Orchestration + Load Digest on Feed Start
ty-labs Mar 31, 2023
665d33f
Merge branch 'feature/notifications' of github.com:involveMINT/iMPubl…
ty-labs Mar 31, 2023
e8a6843
comment flagging implementation
Bwillia2 Mar 31, 2023
4aabb3d
Rebase and merge activity-feed into frontend/comments.
isong2 Mar 31, 2023
bdcdfc8
unflagging and one flag per user functionality
Bwillia2 Apr 3, 2023
e4428c7
Add Get Post API + Fix Notifications UI
ty-labs Apr 3, 2023
0d00206
Display activity feed in admin page
Jareltey Apr 3, 2023
f45b1d1
added flags to user service
Bwillia2 Apr 3, 2023
a64db01
Add Tests for 'Get' + 'Digest' API & NgRx
ty-labs Apr 3, 2023
46c7057
Added hi/fi comments UI and relevant functionalities
isong2 Apr 4, 2023
c01726d
Tweak Digest Modal to Display Better & Remove Viewed
ty-labs Apr 4, 2023
db16772
Hiding and unhiding functionality complete for admin
Jareltey Apr 5, 2023
9251c87
Hiding/unhiding observable to user, but ugly
Jareltey Apr 5, 2023
586cc93
Hiding/unhiding made pretty
Jareltey Apr 5, 2023
8c1a453
sms notification
AlexanderChiuy Apr 6, 2023
ae2b461
added isolated post rediration from notification page and added date …
AlexanderChiuy Apr 6, 2023
d06ace6
added flag count to admin portal, removed dead code from comments com…
Bwillia2 Apr 5, 2023
142030f
removed loader from flags. refactored comment actions for testing
Bwillia2 Apr 6, 2023
370fd19
Add Post Modal For Notifications + Track State
ty-labs Apr 6, 2023
7d08366
Merge branch 'feature/activity-feed' into feature/notifications
AlexanderChiuy Apr 7, 2023
2af29e6
rebased from feature/activity-feed branch to update moderation branch
Bwillia2 Apr 7, 2023
eb7917a
fix for gap inbetween comments when flagged comment is filtered out
Bwillia2 Apr 7, 2023
0f0b697
resolved merging issues and made UI consistent
AlexanderChiuy Apr 7, 2023
0ba4ba6
removed redundant function
AlexanderChiuy Apr 7, 2023
aba5d75
Admin moderation panel with hifi
Jareltey Apr 9, 2023
714cf29
replaced text of hidden comments to show 'this comment has been remov…
Bwillia2 Apr 9, 2023
6fe1e5e
added unit tests for comments and comment moderation
Bwillia2 Apr 9, 2023
f035bf0
fixed error related to showing removal message
Bwillia2 Apr 9, 2023
9756593
bug fix: first flagged comment now responds correctly
Bwillia2 Apr 9, 2023
6c21de1
bug fix: comment state updates when modal is closed
Bwillia2 Apr 9, 2023
a35ecb5
cleaned up leftover code
AlexanderChiuy Apr 9, 2023
f2f9276
Merge pull request #53 from involveMINT/feature/notifications
AlexanderChiuy Apr 9, 2023
37b4c1a
Merge branch 'moderation' of https://github.com/involveMINT/iMPublic …
Jareltey Apr 11, 2023
a47c39d
bug fix: comment state updates when modal is closed in admin page
Jareltey Apr 11, 2023
365540a
rebase with feature/activity-feed branch
Bwillia2 Apr 12, 2023
d81eb2b
Merge pull request #64 from involveMINT/moderation
Bwillia2 Apr 12, 2023
15cfb62
Add Functional Infinite Scroll to ActivityPost Feed (#72)
ty-labs Apr 15, 2023
80af64b
Add ActivityPost Code Documentation (#75)
ty-labs Apr 16, 2023
6e281e6
bug fix: comments show up for right post
Jareltey Apr 17, 2023
f50b731
Merge pull request #79 from involveMINT/fix/shared-comments
Jareltey Apr 17, 2023
be39521
enhanced activity feed UI to hifi with dark mode
isong2 Apr 18, 2023
bb44210
fixed bug where project title showed twice
isong2 Apr 18, 2023
329dc88
Disable like button in admin moderation
Jareltey Apr 17, 2023
4c0a1e8
Make admin moderation panel hifi
Jareltey Apr 18, 2023
241616d
Add method descriptions, remove refresh button, load more posts buggy
Jareltey Apr 18, 2023
2ded1e3
Fix minor bugs in loading more posts
Jareltey Apr 18, 2023
586e24b
Remove dead code
Jareltey Apr 18, 2023
d51236d
Copied html and css files to admin page
Jareltey Apr 18, 2023
b3c8bd0
Fix 'loadMore' Event Stuck @ 1-Page-Only Situation (#84)
ty-labs Apr 19, 2023
c5bd45c
Made admin moderation hifi work with dark mode
Jareltey Apr 19, 2023
0dc5535
Remove dead code in post.component.scss file
Jareltey Apr 20, 2023
9a2d4eb
redirect activity post project link tothe project cover page
AlexanderChiuy Apr 21, 2023
0efdd21
added badge to notification bell icon
AlexanderChiuy Apr 24, 2023
68e06f5
Merge pull request #86 from involveMINT/feature/project_cover_page
AlexanderChiuy Apr 24, 2023
ad64974
removed dead code
AlexanderChiuy Apr 24, 2023
f5ef84e
Merge pull request #91 from involveMINT/notification_chip
AlexanderChiuy Apr 24, 2023
ad1663a
Add Updates to Feed Images (#92)
ty-labs Apr 25, 2023
a5ada58
Add Default User Icon + Notifications Modal Rename
ty-labs Apr 25, 2023
d19ae98
Add Double-Touch Like/Unlike Event To Images
ty-labs Apr 25, 2023
1c6b36d
Back button for project cover page displays the correct previous page:
AlexanderChiuy Apr 25, 2023
fc6b93b
Fix Next/Prev Buttons Broken on Mobile
ty-labs Apr 25, 2023
cca4c5c
Add Chatroom When @<handle> Clicked
ty-labs Apr 25, 2023
9eea897
Remove Dead Code
ty-labs Apr 25, 2023
1eee73e
Make @<handle> Have Cursor on Hover
ty-labs Apr 26, 2023
0e9412f
Add Spacing to Images
ty-labs Apr 26, 2023
cb5aae7
added in image statistic text
AlexanderChiuy Apr 26, 2023
9e5a655
Merge pull request #93 from involveMINT/bugs/tyler-feed-ui-fixes
AlexanderChiuy Apr 26, 2023
a2511ec
Merge branch 'feature/activity-feed' into fix/project-back-button
AlexanderChiuy Apr 26, 2023
3e6fba8
Merge pull request #95 from involveMINT/fix/project-back-button
AlexanderChiuy Apr 26, 2023
ceb5d10
Add toggling for posts with flagged comments
Jareltey Apr 26, 2023
6cdc2c6
Fix bug where hiding comments when toggled to flagged comments would …
Jareltey Apr 26, 2023
650d9d3
Add space between toggle button and description
Jareltey Apr 26, 2023
8e1869e
Add missing css class
Jareltey Apr 26, 2023
2e6924d
poi image retrieval
AlexanderChiuy Apr 26, 2023
8377bfb
Update menu item name and icon
Jareltey Apr 26, 2023
3bde169
added word ellipsis for project titles, default image, truncated seco…
AlexanderChiuy Apr 27, 2023
ded051f
Fix bugs where icons disappear
Jareltey Apr 27, 2023
1c61289
Merge branch 'feature/activity-feed' into frontend/hifi-moderation
Jareltey Apr 27, 2023
d2b0cf5
Merge pull request #97 from involveMINT/frontend/hifi-moderation
Jareltey Apr 27, 2023
5151a43
Merge branch 'feature/activity-feed' into fix/poi-images
AlexanderChiuy Apr 27, 2023
eb08ee3
Remove Logging
ty-labs Apr 27, 2023
2529336
Merge pull request #100 from involveMINT/enhancement/images
AlexanderChiuy Apr 27, 2023
e7d4e3d
increased font size for desktop view
AlexanderChiuy Apr 27, 2023
bf9f151
Merge pull request #99 from involveMINT/fix/poi-images
AlexanderChiuy Apr 27, 2023
61798df
Rename activity feed to activity, redirect to activity feed on login …
Jareltey Apr 27, 2023
4c06c00
Rename headers in html to activity and comment moderation
Jareltey Apr 27, 2023
8b0142e
Fix Projects Page Data Race
ty-labs Apr 29, 2023
eee9da4
Fix Pre-Existing Chat Bug
ty-labs Apr 29, 2023
09dc91b
Merge pull request #104 from involveMINT/bugs/finals
AlexanderChiuy Apr 29, 2023
0ca284a
fixed the double icon issue
AlexanderChiuy Apr 29, 2023
168ae21
Merge pull request #105 from involveMINT/double-icon-fix
AlexanderChiuy Apr 29, 2023
6ebd3d6
Add prev/next chevrons, disable like button for multiple pois, need t…
Jareltey Apr 29, 2023
51f1cda
Overlay project statistics
Jareltey Apr 29, 2023
5dc8be8
Add css styling for ellipses and overflow
Jareltey Apr 29, 2023
568fcf3
added unit testing for moderation
Bwillia2 Apr 30, 2023
1ddbd96
made onboading banner hidden when on activity feed
Bwillia2 Apr 30, 2023
5e6af88
Merge pull request #106 from involveMINT/enhancement/admin-panel-migr…
Jareltey Apr 30, 2023
54aca8f
Merge pull request #108 from involveMINT/enhancement/banner_control+m…
Bwillia2 Apr 30, 2023
878c926
fixed sliders, style, and toggles
isong2 Apr 30, 2023
d1f0b68
fixed spacing issues, removed dead code
isong2 Apr 30, 2023
baae0a0
added desktop-specific styles
isong2 Apr 30, 2023
17ffc04
removed error message upon attempting to post empty comment
isong2 Apr 30, 2023
d9eae77
sorted comments w/ most recent at top, and autoscroll to top upon pos…
isong2 Apr 30, 2023
ac3d161
moved avatar to left for space; added hyphens for broken words
isong2 Apr 30, 2023
e27d65a
add consistency between feed and comments, default text when no comme…
isong2 Apr 30, 2023
1a40467
added light/dark mode for comments
isong2 Apr 30, 2023
011a5d1
fixed light/dark mode comment border
isong2 Apr 30, 2023
91c242d
Update admin page to match latest activity feed UI, bug in ellipses o…
Jareltey Apr 30, 2023
2c0c5b9
Merge pull request #110 from involveMINT/frontend/fix_comments
Jareltey Apr 30, 2023
0711e92
Merge pull request #111 from involveMINT/enhancement/admin-page-ui
Jareltey Apr 30, 2023
4ddf5e3
final frontend touches
AlexanderChiuy Apr 30, 2023
8f4a7a8
Merge pull request #115 from involveMINT/final_touches
AlexanderChiuy Apr 30, 2023
449577b
npm install
rgorham Jun 12, 2023
1db6fcd
Added environment.ts to .gitignore
wengf2086 Jul 1, 2023
f1214ec
Added package-lock.json to .gitignore
wengf2086 Jul 2, 2023
b447f50
Removed package-lock.json from .gitignore
wengf2086 Jul 11, 2023
41c01b9
Merge pull request #122 from involveMINT/remove-package-lock-from-git…
rgorham Jul 20, 2023
c57f534
Feature/add org environment file (#123)
rgorham Aug 2, 2023
49530e8
Develop (#126)
anishsinha-io Aug 3, 2023
0d59a77
Feature/im test env init (#129)
QuinnNTonic Oct 26, 2023
c3432f5
Feature/resolving npm install issue (#130)
QuinnNTonic Nov 21, 2023
5f4c58d
Merge branch 'develop' of https://github.com/involveMINT/iMPublic int…
Nov 28, 2023
c5964d1
feat: Updates to get this branch running with the changes from dev an…
QuinnNTonic Dec 9, 2023
669786d
Enhancement/admin page UI (#420)
QuinnNTonic May 21, 2025
3a75604
Moved waiver to create-cm-profile.component (#421)
QuinnNTonic May 21, 2025
ab85c87
Merge branch 'release/1.0-public' of https://github.com/involveMINT/i…
QuinnNTonic May 21, 2025
c81762e
17413 spring23 main (#422)
QuinnNTonic May 21, 2025
72b9849
17413 spring23 main (#423)
QuinnNTonic May 21, 2025
5826ca5
17413 spring23 main (#424)
QuinnNTonic May 21, 2025
a1135cd
Merge branch 'release/1.0-public' of https://github.com/involveMINT/i…
QuinnNTonic May 21, 2025
af5fd7e
Updating Temporary Main Branch for merging outstanding code with the …
QuinnNTonic Jun 6, 2025
f29f937
feat: Saving gitignore to ignore the prod configurations.
QuinnNTonic Aug 18, 2025
14c2e83
Merge branch 'main_temp' of https://github.com/involveMINT/iMPublic i…
QuinnNTonic Aug 18, 2025
725ec32
feat: Ran ui tests and we appear good to go.
QuinnNTonic Aug 18, 2025
db4b98c
Merge branch '17413_spring23_main' of https://github.com/involveMINT/…
QuinnNTonic Aug 18, 2025
9bbe3d8
feat: Reinstalling dependencies after the merge.
QuinnNTonic Aug 18, 2025
a02d3c0
chore: auto-generated migration - approved 🤖 This migration was autom…
github-actions[bot] Aug 18, 2025
23dc430
feat: Removed the beginning of the move of waiver signing since it do…
QuinnNTonic Sep 10, 2025
74572af
Merge branch 'main_temp' of https://github.com/involveMINT/iMPublic i…
QuinnNTonic Sep 10, 2025
11a9a4d
docs: Add architecture documentation and branch integration plan
QuinnNTonic Dec 19, 2025
c965785
chore: cherry-pick 69b2b38 - pgadmin auto-add and local config
QuinnNTonic Dec 19, 2025
92ff864
chore: cherry-pick a026599 - Docker port update
QuinnNTonic Dec 19, 2025
70e4fa4
chore: cherry-pick e2a0cad - Firebase emulator container support
QuinnNTonic Dec 19, 2025
dae21a4
feat: Remove Orcha framework in favor of REST API pattern
QuinnNTonic Dec 19, 2025
ca15391
feat: Win24 features - E2E test cleanup and domain reorganization
QuinnNTonic Dec 19, 2025
eb9b259
fix: Photo aspect ratios in market component
QuinnNTonic Dec 19, 2025
01cf447
fix: Win25 issue 376 - ChangeMaker profile creation fix
QuinnNTonic Dec 19, 2025
08d8b34
feat: Auto-create ChangeMaker for new users
QuinnNTonic Dec 19, 2025
ebf33cd
fix: Email validation improvements
QuinnNTonic Dec 19, 2025
38d4757
refactor: Rename 'Invite business' UI text
QuinnNTonic Dec 19, 2025
9429e47
fix: Prepopulate data fixes
QuinnNTonic Dec 19, 2025
0111a10
fix: Prepopulate backend service fix
QuinnNTonic Dec 19, 2025
d0acd0c
feat: Red dot notification feature
QuinnNTonic Dec 19, 2025
2e7b41d
feat: Red dot notification locations
QuinnNTonic Dec 19, 2025
40ea36f
feat: Migrate Activity Feed from Orcha to REST clients
QuinnNTonic Dec 19, 2025
94c47c9
fix: Complete Activity Feed migration to REST clients
QuinnNTonic Dec 19, 2025
dafbf07
fix: Update firebase-emulators Dockerfile to node:18-slim
QuinnNTonic Dec 19, 2025
ec20618
fix: Remove unused EnrollmentsModule import from CreateCmProfileModule
QuinnNTonic Dec 19, 2025
0c52325
fix: Fix CM profile creation submit button on handle slide
QuinnNTonic Dec 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .docker/firebase-emulators/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-slim
FROM node:18-slim
ARG BUILD_DATE
ARG FIREBASE_TOOLS_VERSION
ARG HOME
Expand Down
2 changes: 1 addition & 1 deletion .docker/init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ SELECT 'CREATE DATABASE "involvemint"'
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'involvemint')\gexec

SELECT 'CREATE DATABASE "involvemint-e2e"'
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'involvemint-e2e')\gexec
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'involvemint-e2e')\gexec
29 changes: 29 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Chrome",
"request": "launch",
"type": "chrome",
"url": "http://localhost:4202/",
"webRoot": "${workspaceFolder}"
},
{
"type": "node",
"request": "launch",
"name": "Debug Program",
"skipFiles": ["<node_internals>/**"],
"env": {
"NODE_OPTIONS": "--openssl-legacy-provider",
"FIREBASE_STORAGE_EMULATOR_HOST": "localhost:9199",
"FIRESTORE_EMULATOR_HOST": "localhost:8080"
},
"preLaunchTask": "npm: build:server:local",
"program": "${workspaceFolder}/dist/apps/api/main.js",
"console": "integratedTerminal"
}
]
}
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ Run the following commands.
3. `[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"`
4. Refresh your shell (close and reopen). If you're using zsh, here's a shortcut: `source ~/.zshrc`
5. If the following command does not throw an error, you're good so far: `nvm -v`
6. `nvm install lts/gallium`
7. `nvm use lts/gallium`
6. `nvm install lts/jod`
7. `nvm use lts/jod`

### Configuring Firebase

Expand Down Expand Up @@ -127,13 +127,15 @@ If you are prompted for the pasword (below screenshot) when opening PgAdmin at h

### Starting the Apps

- Open a terminal and run `npm i` from root directory to install all the required packages.
- Run `export FIREBASE_STORAGE_EMULATOR_HOST=localhost:9199`.
- Run `export FIRESTORE_EMULATOR_HOST='localhost:8080'`.
- Open a terminal and run `npm i` from root directory to install all the required packages.
- Run `export FIREBASE_STORAGE_EMULATOR_HOST=localhost:9199`.
- Run `export FIRESTORE_EMULATOR_HOST='localhost:8080'`.
- Run `export NODE_OPTIONS=--openssl-legacy-provider` because otherwise there will be an error with OpenSSL.
- Run `npm run start:client:local` which will start the client app.
- Leave that terminal open and running and open a new terminal
- In the new terminal: Run `export FIREBASE_STORAGE_EMULATOR_HOST=localhost:9199`.
- In the new terminal: Run `export FIRESTORE_EMULATOR_HOST='localhost:8080'`.
- In the new terminal: Run `export FIREBASE_STORAGE_EMULATOR_HOST=localhost:9199`.
- In the new terminal: Run `export FIRESTORE_EMULATOR_HOST='localhost:8080'`.
- In the new terminal: Run `export NODE_OPTIONS=--openssl-legacy-provider`.
- Then Run `npm run start:server:local` which will start the server app.

Once running, the client can be accessed via `http://localhost:4202` and the api/server will be running on `http://127.0.0.1:3335`
Expand Down
24 changes: 12 additions & 12 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"fileReplacements": [
{
"replace": "libs/shared/domain/src/lib/environments/environment.ts",
"with": "libs/shared/domain/src/lib/environments/environment.prod.ts"
"with": "libs/shared/domain/src/lib/environments/environment.prod.ui.ts"
}
],
"optimization": true,
Expand All @@ -77,7 +77,7 @@
"fileReplacements": [
{
"replace": "libs/shared/domain/src/lib/environments/environment.ts",
"with": "libs/shared/domain/src/lib/environments/environment.test.ts"
"with": "libs/shared/domain/src/lib/environments/environment.test.ui.ts"
}
],
"optimization": true,
Expand Down Expand Up @@ -205,7 +205,7 @@
"fileReplacements": [
{
"replace": "libs/shared/domain/src/lib/environments/environment.ts",
"with": "libs/shared/domain/src/lib/environments/environment.prod.ts"
"with": "libs/shared/domain/src/lib/environments/environment.prod.api.ts"
}
]
},
Expand All @@ -216,7 +216,7 @@
"fileReplacements": [
{
"replace": "libs/shared/domain/src/lib/environments/environment.ts",
"with": "libs/shared/domain/src/lib/environments/environment.test.ts"
"with": "libs/shared/domain/src/lib/environments/environment.test.api.ts"
}
]
},
Expand Down Expand Up @@ -814,22 +814,22 @@
}
}
},
"server-orcha": {
"root": "libs/server/orcha",
"sourceRoot": "libs/server/orcha/src",
"server-api": {
"root": "libs/server/api",
"sourceRoot": "libs/server/api/src",
"projectType": "library",
"architect": {
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": ["libs/server/orcha/**/*.ts"]
"lintFilePatterns": ["libs/server/api/**/*.ts"]
}
},
"test": {
"builder": "@nrwl/jest:jest",
"outputs": ["coverage/libs/server/orcha"],
"outputs": ["coverage/libs/server/api"],
"options": {
"jestConfig": "libs/server/orcha/jest.config.js",
"jestConfig": "libs/server/api/jest.config.js",
"passWithNoTests": true
}
}
Expand Down Expand Up @@ -858,7 +858,7 @@
"fileReplacements": [
{
"replace": "apps/migrate/src/environments/environment.ts",
"with": "apps/migrate/src/environments/environment.prod.ts"
"with": "apps/migrate/src/environments/environment.prod.api.ts"
}
]
},
Expand All @@ -869,7 +869,7 @@
"fileReplacements": [
{
"replace": "apps/migrate/src/environments/environment.ts",
"with": "apps/migrate/src/environments/environment.test.ts"
"with": "apps/migrate/src/environments/environment.test.api.ts"
}
]
}
Expand Down
6 changes: 3 additions & 3 deletions apps/api-e2e/src/core/app-test.module.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ServerOrchaModule } from '@involvemint/server/orcha';
import { ServerAPIModule } from '@involvemint/server/api';
import { Module } from '@nestjs/common';
import { ScheduleModule } from '@nestjs/schedule';
import { TypeOrmModule } from '@nestjs/typeorm';
Expand All @@ -14,7 +14,7 @@ patchTypeORMRepositoryWithBaseRepository();

@Module({
imports: [
ServerOrchaModule,
ServerAPIModule,
TypeOrmModule.forRoot({
type: 'postgres',
host: '127.0.0.1',
Expand All @@ -29,4 +29,4 @@ patchTypeORMRepositoryWithBaseRepository();
ScheduleModule.forRoot(),
],
})
export class AppTestModule {}
export class AppTestModule {}
116 changes: 82 additions & 34 deletions apps/api-e2e/src/specs/change-maker/change-maker-e2e.spec.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@

import { ChangeMakerRepository } from '@involvemint/server/core/domain-services';
import { ChangeMaker, IChangeMakerOrchestration, IUserOrchestration, User } from '@involvemint/shared/domain';
import { ChangeMaker, DTO_KEY, EditCmProfileDto, QUERY_KEY, TOKEN_KEY, User } from '@involvemint/shared/domain';
import { HttpStatus } from '@nestjs/common';
import { NestFastifyApplication } from '@nestjs/platform-fastify';
import { Test } from '@nestjs/testing';
import { createQuery, IParser } from '@orcha/common';
import { ITestOrchestration } from '@orcha/testing';
import supertest from 'supertest';
import { INestApplication } from '@nestjs/common';
import { createQuery, IParser } from '@involvemint/shared/domain';
import { AppTestModule } from '../../core/app-test.module';
import { DatabaseService } from '../../core/database.service';
import { createUserOrchestration } from '../user/user.orchestration';
import { createChangeMakerOrchestration } from './change-maker.orchestration';

describe('ChangeMaker Orchestration Integration Tests', () => {
let app: NestFastifyApplication;
describe('ChangeMaker Integration Tests', () => {
let app: INestApplication;
let db: DatabaseService;

let userOrcha: ITestOrchestration<IUserOrchestration>;
let cmOrcha: ITestOrchestration<IChangeMakerOrchestration>;

let cmRepo: ChangeMakerRepository;

const creds = { id: '[email protected]', password: 'GoodPwd@341' };
let auth: { body: { token: string }; statusCode: HttpStatus };
let token: string;

const cmQuery = createQuery<ChangeMaker>()({ id: true, firstName: true, handle: { id: true } });
let cmProfile: IParser<ChangeMaker, typeof cmQuery>;
Expand All @@ -36,53 +32,105 @@ describe('ChangeMaker Orchestration Integration Tests', () => {
app = moduleRef.createNestApplication();
db = moduleRef.get(DatabaseService);

userOrcha = createUserOrchestration(app);
cmOrcha = createChangeMakerOrchestration(app);

cmRepo = moduleRef.get(ChangeMakerRepository);

await app.init();
});

beforeEach(async () => {
await db.clearDb();
auth = await userOrcha.signUp({ token: true }, '', creds);
const { body, statusCode } = await cmOrcha.createProfile(cmQuery, auth.body.token, {
handle: 'bobby',
firstName: 'fn',
lastName: 'ln',
phone: '(555) 555-5555',
const signUpResult = await supertest(app.getHttpServer())
.post('/user/signUp')
.send({
[QUERY_KEY]: { [TOKEN_KEY]: true },
[DTO_KEY]: creds,
});
token = signUpResult.body[TOKEN_KEY];
const profileCreationResult = await supertest(app.getHttpServer())
.post('/changeMaker/createProfile')
.set('token', token)
.set('Content-Type', 'application/json')
.set('Accept', 'application/json')
.send({
[QUERY_KEY]: cmQuery,
[DTO_KEY]: {
handle: 'bobby',
firstName: 'fn',
lastName: 'ln',
phone: '(555) 555-5555',
}
});
cmProfile = body;
expect(statusCode).toBe(HttpStatus.CREATED);

cmProfile = profileCreationResult.body as IParser<ChangeMaker, typeof cmQuery>;
expect(profileCreationResult.statusCode).toBe(HttpStatus.CREATED);
});

afterAll(async () => await app.close());

describe('createProfile', () => {
it('should create profile', async () => {
const res = await userOrcha.getUserData(userQuery, auth.body.token);
const getUserData = await supertest(app.getHttpServer())
.post('/user/getUserData')
.set(TOKEN_KEY, token)
.send({
[QUERY_KEY]: userQuery
});

const cmEntity = await cmRepo.findOneOrFail(cmProfile.id, cmQuery);
expect(res.body.changeMaker).toMatchObject(cmEntity);
expect(getUserData.body.changeMaker).toMatchObject(cmEntity);

});

it('should verify handle uniqueness', async () => {
const { error } = await cmOrcha.createProfile(cmQuery, auth.body.token, {
firstName: 'Bobby',
lastName: 'Smith',
handle: 'bobby',
phone: '(412) 232-2953',

const profileCreationResult = await supertest(app.getHttpServer())
.post('/changeMaker/createProfile')
.set('token', token)
.set('Content-Type', 'application/json')
.set('Accept', 'application/json')
.send({
[QUERY_KEY]: cmQuery,
[DTO_KEY]: {
firstName: 'Bobby',
lastName: 'Smith',
handle: 'bobby',
phone: '(412) 232-2953',
}
});
expect(error).toBe(`Handle @bobby already exists.`);

if(profileCreationResult.error !== false)
{
expect(JSON.parse(profileCreationResult.error.text).message).toBe(`Handle @bobby already exists.`);
}

});
});

describe('editProfile', () => {
it('should edit profile', async () => {
const firstName = 'Jessie';
await cmOrcha.editProfile(cmQuery, auth.body.token, { firstName });
const res = await userOrcha.getUserData(userQuery, auth.body.token);
expect(res.body.changeMaker?.firstName).toBe(firstName);

const editProfileArgument: EditCmProfileDto = {
firstName: 'Jessie'
}
await supertest(app.getHttpServer())
.post('/changeMaker/editProfile')
.set('token', token)
.set('Content-Type', 'application/json')
.set('Accept', 'application/json')
.send({
[QUERY_KEY]: cmQuery,
[DTO_KEY]: editProfileArgument
});

const getUserDataResponse = await supertest(app.getHttpServer())
.post('/user/getUserData')
.set(TOKEN_KEY, token)
.send({
[QUERY_KEY]: userQuery
});

expect(getUserDataResponse.body.changeMaker?.firstName).toBe(firstName);
});
});
});
22 changes: 0 additions & 22 deletions apps/api-e2e/src/specs/change-maker/change-maker.orchestration.ts

This file was deleted.

Loading