ToolJet/server/test/controllers/comment.e2e-spec.ts

66 lines
1.6 KiB
TypeScript
Raw Normal View History

Feature: Collaboration ( realtime comments for canvas ) 🔥 (#810) * feat: initial commit for collaboration feature * add dnd to comments * add positions endpoint * feat: encapsulate all http common logic in http-client * segregate sections and transfer responsibility of state * feat: use-spring to add fade effect :zap: * fix: open in right * fix: left-right position css * add footer for message * integrate getcomment endpoint * use fromnow for date ago * add dnd * - Add data trasfer object for comment - Add class-validator package to check the response type from client - Add comment repository class for persistance layer - Add comment service with std. http methods - Update controller with all http methods - Update comment module - Fix http-client bug when error is thrown * fix http client bug when error is thrown * feat: add entity thread * feat: add migrations for thread and comment * update entitites * add tid to migration * filter comments by tid(thread_id) * fix: comment migration, add missing column comment * feat: integrate in ui * feat: split comments based on app_id * fix: dnd to correct position * package json engines * engines update * update npm * npm 6 to 7 * fix: add user initials to thread * fix: add firtname lastname to the comments * - Return user object when save thread called - Hide password field from user response - Fix created_at date typo - Instead of fetch all threads on new thread added, add the response to array of existing threads * feat: update ui components * change icon on comments view * ui fixes * fix: close icon close the popover * temp: comment select: false * use currentUser from localStorage * fix: on click outside if comment is open, dont hit addThread * fix: auth token issue in http-client * on drag hide the comment if open * add jwt auth * spec: add test for comment & thread * cleanup: remove console.log * feat: add comment actions * feat: add edit, delete, resolve options * feat: add mentions component * feat: add nestjs websockets * temp * websocket: establish client-server communication * ws: add message listner to comments module in ui * feat: add broadcast method to broadcast new events to all clients :bomb: * ws: cleanup :call_me_hand: * fix: remove max height from comment actions * feat: add user mentions, emoji support * fix: add static list of users - temp * update and delete iterations * - Rename comment, thread to comments, threads - Add conditional actions - Show edit, delete only if he is comment owner - Show resolve only if he is thread owner * reset engines * move svgr webpack to deps * fix: ui issues * remove log stmt * refactor: move resolved icon to comment-header * feat: allow comments to be added on top of widgets * feat: add keyboard shortcut * scroll to bottom on comment add * ui fixes * feat: add react toast for notification display * feat: add comment badge * fix: ws connection * fix: ws * remove rvrse * feat: add comment sidebar * feat: add comment right sidebar * fix: add missing foreign key elements * - upgrade typeorm to 0.2.38 - comment sidebar ui - added filter ui * feat: on click of right sidebar notificaiton open the comment box * reset engines * fix: add organization id to the comment and thread module * fix: add current version id * add currentversion id * disable comments if no id present * temp:checking for heroku deploy * fetch app on edit and deploy version * rename current_version_id to app_versions_id * ui fixes * show mentioned user in blue color * add ui changes * add authorization for create thread * change color to blue on click of comment, add auth for other endpoints of thread * update threads, notifications using socket * add auth for comments * remove events spec file * fix duplicate key error * fix notificaitons updation on edit, delete, resolve buttons clicked * update notifications for edit * feature toggle changes for frontend * add check for comments server * add emoji mart package for emoji * add reply count in comment sidebar * subtract 1 from count in comment sidebar * change empty text when no comments available
2021-11-01 07:28:03 +00:00
import * as request from 'supertest';
import { INestApplication } from '@nestjs/common';
import {
createThread,
clearDB,
createApplication,
createUser,
createNestAppInstance,
createApplicationVersion,
[Improvement] URLs scoped with workspace id (#5487) * add: new URL prefix * fix: working on home page * add: profile path * playing with rxjs * removed context part * working on path changes * changing routes - TODO: replace the workspaceId with actual id * redo: public apps path * initial commit * added authorize API * remove privileges from auth response * fixed some api issue - added subscriptions * fix: redirect url workspace-id null issue * fix: switch workspace * fix: organization list mapping - menu item paths * fix: preview url - editor, viewer permission mapping * jwt fix * fix: some url issue - permission mappings - workspace login * fixed some issues - user invite workspace-id - org settings menu item default selected item issue * app viewer fixes * fixing workspace login issues * fix * fixing issues - tooljet db - path issues - refatoring the code * fix: workspace vars permissions * fix: multi-page handle * fix: create app from template * fix: bulk user upload * fix: import app - clone app - upload profile image * fix: onboarding * fix: log out * fixed multi-workspace logout issue * fix: launch btn * fix: oauth2 * fixes * fix: sso login * fix: workspace sso login * fixing sso issues * fix: moved list of orgs to rxjs - fixed switching issues * reverting some changes * fixed some minor bugs * fixing sso redirect url issues * fix: switching network timing issues * fix: back to workspace-id * fix: tj-database - refactored the code - removed org id from some pages - will get the org id from the service file only * fix: multi-pages * fix: infinite loop issue * fixing workspace switching issue * fixes - comment link - logout & private route redirect url * fix: wrong uuid error * fixing subpath - fixed most of the places - need to test & fix workspace login, sso, new account * fix: subpath workspace login * fix: rxjs handle bug * Revert "fix: tj-database" This reverts commit 9632ec2ff0707c9d7b1777f64afbe15679203ca1. * fix: reverted tj-db changes * fix: subpath sso * typo fix * fix: existing session issues * new: switch workspace page * fix: modal dark-mode * added default sso support * fixes - subpath workspace switching - handle wrong routes * fix: manager user button - refactored the code * removed SINGLE Workspace feature * rebase * add: change modal text * fix: added validation * fixed private app 401 issue * initial commit * fix: logged out session multi-tab issue * refactoring the code * fix: redirect url issue * added auth-token in cookies * Fix: failing e2e specs * added session API * fix: backend session guard * fix: removing user details from local storage * fix: null wid * undo and redo * fix: login page * fix: viewer login redirection * fix: login page redirection * fix: public apps logout issue * added session storage and scheduler * added profile api * fix: sso login - switch workspace - login page - setup admin * working on fixes * fix: socket issue * fix: setup admin api * connected profile & logout apis * fix: malfunctioned auth token case * fix: realtime avatar * fix: profile avatar * fix: Realtime cursors avatar * setting max age for auth token cookie * add: Go to login page if logout api returns 401 * fix: subpath login * fix * fix: app logout [viewer] * fix: authorize page * remove expiry from jwt * fix: integrations route - session api * small fix * fix: updated profile * fix: workspace login [logged user] * fix: oauth and another workspace page issue * fixed app preview logout issue * subpath fix * fix: subpath app id * fix: selected state didnt change for apps page [subpath] * fix * add cookie parser to test app * specs added * increased user session expiry time * test: session & new apis * working on test cases * fix: onboarding issue * fixing specs * fix: test cases * fix: removing profile api calls * some fixes * fixing rebase issues * fix: global ds issues * fix: app is crashing * fix: back to text * fix: oauth test cases * fix: test-helper * fix: onboarding test cases * fix: tests again * refactoring the code * latest develop merging precautions - fixed a minor null issue * fix: typo * fix :menu issues due to the merging * fix: - clicking on tooljet logo didnt redirect to login page for public apps - private app preview doesnt load after login * subpath fixes * fixed back to issue * PR changes * fix: spec fixes for EE * doc: URL scoped for workspace --------- Co-authored-by: gsmithun4 <gsmithun4@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com>
2023-04-06 11:12:58 +00:00
authenticateUser,
logoutUser,
Feature: Collaboration ( realtime comments for canvas ) 🔥 (#810) * feat: initial commit for collaboration feature * add dnd to comments * add positions endpoint * feat: encapsulate all http common logic in http-client * segregate sections and transfer responsibility of state * feat: use-spring to add fade effect :zap: * fix: open in right * fix: left-right position css * add footer for message * integrate getcomment endpoint * use fromnow for date ago * add dnd * - Add data trasfer object for comment - Add class-validator package to check the response type from client - Add comment repository class for persistance layer - Add comment service with std. http methods - Update controller with all http methods - Update comment module - Fix http-client bug when error is thrown * fix http client bug when error is thrown * feat: add entity thread * feat: add migrations for thread and comment * update entitites * add tid to migration * filter comments by tid(thread_id) * fix: comment migration, add missing column comment * feat: integrate in ui * feat: split comments based on app_id * fix: dnd to correct position * package json engines * engines update * update npm * npm 6 to 7 * fix: add user initials to thread * fix: add firtname lastname to the comments * - Return user object when save thread called - Hide password field from user response - Fix created_at date typo - Instead of fetch all threads on new thread added, add the response to array of existing threads * feat: update ui components * change icon on comments view * ui fixes * fix: close icon close the popover * temp: comment select: false * use currentUser from localStorage * fix: on click outside if comment is open, dont hit addThread * fix: auth token issue in http-client * on drag hide the comment if open * add jwt auth * spec: add test for comment & thread * cleanup: remove console.log * feat: add comment actions * feat: add edit, delete, resolve options * feat: add mentions component * feat: add nestjs websockets * temp * websocket: establish client-server communication * ws: add message listner to comments module in ui * feat: add broadcast method to broadcast new events to all clients :bomb: * ws: cleanup :call_me_hand: * fix: remove max height from comment actions * feat: add user mentions, emoji support * fix: add static list of users - temp * update and delete iterations * - Rename comment, thread to comments, threads - Add conditional actions - Show edit, delete only if he is comment owner - Show resolve only if he is thread owner * reset engines * move svgr webpack to deps * fix: ui issues * remove log stmt * refactor: move resolved icon to comment-header * feat: allow comments to be added on top of widgets * feat: add keyboard shortcut * scroll to bottom on comment add * ui fixes * feat: add react toast for notification display * feat: add comment badge * fix: ws connection * fix: ws * remove rvrse * feat: add comment sidebar * feat: add comment right sidebar * fix: add missing foreign key elements * - upgrade typeorm to 0.2.38 - comment sidebar ui - added filter ui * feat: on click of right sidebar notificaiton open the comment box * reset engines * fix: add organization id to the comment and thread module * fix: add current version id * add currentversion id * disable comments if no id present * temp:checking for heroku deploy * fetch app on edit and deploy version * rename current_version_id to app_versions_id * ui fixes * show mentioned user in blue color * add ui changes * add authorization for create thread * change color to blue on click of comment, add auth for other endpoints of thread * update threads, notifications using socket * add auth for comments * remove events spec file * fix duplicate key error * fix notificaitons updation on edit, delete, resolve buttons clicked * update notifications for edit * feature toggle changes for frontend * add check for comments server * add emoji mart package for emoji * add reply count in comment sidebar * subtract 1 from count in comment sidebar * change empty text when no comments available
2021-11-01 07:28:03 +00:00
} from '../test.helper';
describe('comment controller', () => {
let app: INestApplication;
beforeEach(async () => {
await clearDB();
});
beforeAll(async () => {
app = await createNestAppInstance();
});
it('should allow only authenticated users to list comments', async () => {
2021-11-25 12:57:24 +00:00
await request(app.getHttpServer()).get('/api/comments/1234/all').expect(401);
Feature: Collaboration ( realtime comments for canvas ) 🔥 (#810) * feat: initial commit for collaboration feature * add dnd to comments * add positions endpoint * feat: encapsulate all http common logic in http-client * segregate sections and transfer responsibility of state * feat: use-spring to add fade effect :zap: * fix: open in right * fix: left-right position css * add footer for message * integrate getcomment endpoint * use fromnow for date ago * add dnd * - Add data trasfer object for comment - Add class-validator package to check the response type from client - Add comment repository class for persistance layer - Add comment service with std. http methods - Update controller with all http methods - Update comment module - Fix http-client bug when error is thrown * fix http client bug when error is thrown * feat: add entity thread * feat: add migrations for thread and comment * update entitites * add tid to migration * filter comments by tid(thread_id) * fix: comment migration, add missing column comment * feat: integrate in ui * feat: split comments based on app_id * fix: dnd to correct position * package json engines * engines update * update npm * npm 6 to 7 * fix: add user initials to thread * fix: add firtname lastname to the comments * - Return user object when save thread called - Hide password field from user response - Fix created_at date typo - Instead of fetch all threads on new thread added, add the response to array of existing threads * feat: update ui components * change icon on comments view * ui fixes * fix: close icon close the popover * temp: comment select: false * use currentUser from localStorage * fix: on click outside if comment is open, dont hit addThread * fix: auth token issue in http-client * on drag hide the comment if open * add jwt auth * spec: add test for comment & thread * cleanup: remove console.log * feat: add comment actions * feat: add edit, delete, resolve options * feat: add mentions component * feat: add nestjs websockets * temp * websocket: establish client-server communication * ws: add message listner to comments module in ui * feat: add broadcast method to broadcast new events to all clients :bomb: * ws: cleanup :call_me_hand: * fix: remove max height from comment actions * feat: add user mentions, emoji support * fix: add static list of users - temp * update and delete iterations * - Rename comment, thread to comments, threads - Add conditional actions - Show edit, delete only if he is comment owner - Show resolve only if he is thread owner * reset engines * move svgr webpack to deps * fix: ui issues * remove log stmt * refactor: move resolved icon to comment-header * feat: allow comments to be added on top of widgets * feat: add keyboard shortcut * scroll to bottom on comment add * ui fixes * feat: add react toast for notification display * feat: add comment badge * fix: ws connection * fix: ws * remove rvrse * feat: add comment sidebar * feat: add comment right sidebar * fix: add missing foreign key elements * - upgrade typeorm to 0.2.38 - comment sidebar ui - added filter ui * feat: on click of right sidebar notificaiton open the comment box * reset engines * fix: add organization id to the comment and thread module * fix: add current version id * add currentversion id * disable comments if no id present * temp:checking for heroku deploy * fetch app on edit and deploy version * rename current_version_id to app_versions_id * ui fixes * show mentioned user in blue color * add ui changes * add authorization for create thread * change color to blue on click of comment, add auth for other endpoints of thread * update threads, notifications using socket * add auth for comments * remove events spec file * fix duplicate key error * fix notificaitons updation on edit, delete, resolve buttons clicked * update notifications for edit * feature toggle changes for frontend * add check for comments server * add emoji mart package for emoji * add reply count in comment sidebar * subtract 1 from count in comment sidebar * change empty text when no comments available
2021-11-01 07:28:03 +00:00
});
it('should list all comments in a thread', async () => {
const userData = await createUser(app, { email: 'admin@tooljet.io' });
const { user } = userData;
Feature: Collaboration ( realtime comments for canvas ) 🔥 (#810) * feat: initial commit for collaboration feature * add dnd to comments * add positions endpoint * feat: encapsulate all http common logic in http-client * segregate sections and transfer responsibility of state * feat: use-spring to add fade effect :zap: * fix: open in right * fix: left-right position css * add footer for message * integrate getcomment endpoint * use fromnow for date ago * add dnd * - Add data trasfer object for comment - Add class-validator package to check the response type from client - Add comment repository class for persistance layer - Add comment service with std. http methods - Update controller with all http methods - Update comment module - Fix http-client bug when error is thrown * fix http client bug when error is thrown * feat: add entity thread * feat: add migrations for thread and comment * update entitites * add tid to migration * filter comments by tid(thread_id) * fix: comment migration, add missing column comment * feat: integrate in ui * feat: split comments based on app_id * fix: dnd to correct position * package json engines * engines update * update npm * npm 6 to 7 * fix: add user initials to thread * fix: add firtname lastname to the comments * - Return user object when save thread called - Hide password field from user response - Fix created_at date typo - Instead of fetch all threads on new thread added, add the response to array of existing threads * feat: update ui components * change icon on comments view * ui fixes * fix: close icon close the popover * temp: comment select: false * use currentUser from localStorage * fix: on click outside if comment is open, dont hit addThread * fix: auth token issue in http-client * on drag hide the comment if open * add jwt auth * spec: add test for comment & thread * cleanup: remove console.log * feat: add comment actions * feat: add edit, delete, resolve options * feat: add mentions component * feat: add nestjs websockets * temp * websocket: establish client-server communication * ws: add message listner to comments module in ui * feat: add broadcast method to broadcast new events to all clients :bomb: * ws: cleanup :call_me_hand: * fix: remove max height from comment actions * feat: add user mentions, emoji support * fix: add static list of users - temp * update and delete iterations * - Rename comment, thread to comments, threads - Add conditional actions - Show edit, delete only if he is comment owner - Show resolve only if he is thread owner * reset engines * move svgr webpack to deps * fix: ui issues * remove log stmt * refactor: move resolved icon to comment-header * feat: allow comments to be added on top of widgets * feat: add keyboard shortcut * scroll to bottom on comment add * ui fixes * feat: add react toast for notification display * feat: add comment badge * fix: ws connection * fix: ws * remove rvrse * feat: add comment sidebar * feat: add comment right sidebar * fix: add missing foreign key elements * - upgrade typeorm to 0.2.38 - comment sidebar ui - added filter ui * feat: on click of right sidebar notificaiton open the comment box * reset engines * fix: add organization id to the comment and thread module * fix: add current version id * add currentversion id * disable comments if no id present * temp:checking for heroku deploy * fetch app on edit and deploy version * rename current_version_id to app_versions_id * ui fixes * show mentioned user in blue color * add ui changes * add authorization for create thread * change color to blue on click of comment, add auth for other endpoints of thread * update threads, notifications using socket * add auth for comments * remove events spec file * fix duplicate key error * fix notificaitons updation on edit, delete, resolve buttons clicked * update notifications for edit * feature toggle changes for frontend * add check for comments server * add emoji mart package for emoji * add reply count in comment sidebar * subtract 1 from count in comment sidebar * change empty text when no comments available
2021-11-01 07:28:03 +00:00
const application = await createApplication(app, {
name: 'App to clone',
user,
Feature: Collaboration ( realtime comments for canvas ) 🔥 (#810) * feat: initial commit for collaboration feature * add dnd to comments * add positions endpoint * feat: encapsulate all http common logic in http-client * segregate sections and transfer responsibility of state * feat: use-spring to add fade effect :zap: * fix: open in right * fix: left-right position css * add footer for message * integrate getcomment endpoint * use fromnow for date ago * add dnd * - Add data trasfer object for comment - Add class-validator package to check the response type from client - Add comment repository class for persistance layer - Add comment service with std. http methods - Update controller with all http methods - Update comment module - Fix http-client bug when error is thrown * fix http client bug when error is thrown * feat: add entity thread * feat: add migrations for thread and comment * update entitites * add tid to migration * filter comments by tid(thread_id) * fix: comment migration, add missing column comment * feat: integrate in ui * feat: split comments based on app_id * fix: dnd to correct position * package json engines * engines update * update npm * npm 6 to 7 * fix: add user initials to thread * fix: add firtname lastname to the comments * - Return user object when save thread called - Hide password field from user response - Fix created_at date typo - Instead of fetch all threads on new thread added, add the response to array of existing threads * feat: update ui components * change icon on comments view * ui fixes * fix: close icon close the popover * temp: comment select: false * use currentUser from localStorage * fix: on click outside if comment is open, dont hit addThread * fix: auth token issue in http-client * on drag hide the comment if open * add jwt auth * spec: add test for comment & thread * cleanup: remove console.log * feat: add comment actions * feat: add edit, delete, resolve options * feat: add mentions component * feat: add nestjs websockets * temp * websocket: establish client-server communication * ws: add message listner to comments module in ui * feat: add broadcast method to broadcast new events to all clients :bomb: * ws: cleanup :call_me_hand: * fix: remove max height from comment actions * feat: add user mentions, emoji support * fix: add static list of users - temp * update and delete iterations * - Rename comment, thread to comments, threads - Add conditional actions - Show edit, delete only if he is comment owner - Show resolve only if he is thread owner * reset engines * move svgr webpack to deps * fix: ui issues * remove log stmt * refactor: move resolved icon to comment-header * feat: allow comments to be added on top of widgets * feat: add keyboard shortcut * scroll to bottom on comment add * ui fixes * feat: add react toast for notification display * feat: add comment badge * fix: ws connection * fix: ws * remove rvrse * feat: add comment sidebar * feat: add comment right sidebar * fix: add missing foreign key elements * - upgrade typeorm to 0.2.38 - comment sidebar ui - added filter ui * feat: on click of right sidebar notificaiton open the comment box * reset engines * fix: add organization id to the comment and thread module * fix: add current version id * add currentversion id * disable comments if no id present * temp:checking for heroku deploy * fetch app on edit and deploy version * rename current_version_id to app_versions_id * ui fixes * show mentioned user in blue color * add ui changes * add authorization for create thread * change color to blue on click of comment, add auth for other endpoints of thread * update threads, notifications using socket * add auth for comments * remove events spec file * fix duplicate key error * fix notificaitons updation on edit, delete, resolve buttons clicked * update notifications for edit * feature toggle changes for frontend * add check for comments server * add emoji mart package for emoji * add reply count in comment sidebar * subtract 1 from count in comment sidebar * change empty text when no comments available
2021-11-01 07:28:03 +00:00
});
const version = await createApplicationVersion(app, application);
Feature: Collaboration ( realtime comments for canvas ) 🔥 (#810) * feat: initial commit for collaboration feature * add dnd to comments * add positions endpoint * feat: encapsulate all http common logic in http-client * segregate sections and transfer responsibility of state * feat: use-spring to add fade effect :zap: * fix: open in right * fix: left-right position css * add footer for message * integrate getcomment endpoint * use fromnow for date ago * add dnd * - Add data trasfer object for comment - Add class-validator package to check the response type from client - Add comment repository class for persistance layer - Add comment service with std. http methods - Update controller with all http methods - Update comment module - Fix http-client bug when error is thrown * fix http client bug when error is thrown * feat: add entity thread * feat: add migrations for thread and comment * update entitites * add tid to migration * filter comments by tid(thread_id) * fix: comment migration, add missing column comment * feat: integrate in ui * feat: split comments based on app_id * fix: dnd to correct position * package json engines * engines update * update npm * npm 6 to 7 * fix: add user initials to thread * fix: add firtname lastname to the comments * - Return user object when save thread called - Hide password field from user response - Fix created_at date typo - Instead of fetch all threads on new thread added, add the response to array of existing threads * feat: update ui components * change icon on comments view * ui fixes * fix: close icon close the popover * temp: comment select: false * use currentUser from localStorage * fix: on click outside if comment is open, dont hit addThread * fix: auth token issue in http-client * on drag hide the comment if open * add jwt auth * spec: add test for comment & thread * cleanup: remove console.log * feat: add comment actions * feat: add edit, delete, resolve options * feat: add mentions component * feat: add nestjs websockets * temp * websocket: establish client-server communication * ws: add message listner to comments module in ui * feat: add broadcast method to broadcast new events to all clients :bomb: * ws: cleanup :call_me_hand: * fix: remove max height from comment actions * feat: add user mentions, emoji support * fix: add static list of users - temp * update and delete iterations * - Rename comment, thread to comments, threads - Add conditional actions - Show edit, delete only if he is comment owner - Show resolve only if he is thread owner * reset engines * move svgr webpack to deps * fix: ui issues * remove log stmt * refactor: move resolved icon to comment-header * feat: allow comments to be added on top of widgets * feat: add keyboard shortcut * scroll to bottom on comment add * ui fixes * feat: add react toast for notification display * feat: add comment badge * fix: ws connection * fix: ws * remove rvrse * feat: add comment sidebar * feat: add comment right sidebar * fix: add missing foreign key elements * - upgrade typeorm to 0.2.38 - comment sidebar ui - added filter ui * feat: on click of right sidebar notificaiton open the comment box * reset engines * fix: add organization id to the comment and thread module * fix: add current version id * add currentversion id * disable comments if no id present * temp:checking for heroku deploy * fetch app on edit and deploy version * rename current_version_id to app_versions_id * ui fixes * show mentioned user in blue color * add ui changes * add authorization for create thread * change color to blue on click of comment, add auth for other endpoints of thread * update threads, notifications using socket * add auth for comments * remove events spec file * fix duplicate key error * fix notificaitons updation on edit, delete, resolve buttons clicked * update notifications for edit * feature toggle changes for frontend * add check for comments server * add emoji mart package for emoji * add reply count in comment sidebar * subtract 1 from count in comment sidebar * change empty text when no comments available
2021-11-01 07:28:03 +00:00
const thread = await createThread(app, {
appId: application.id,
x: 100,
y: 200,
userId: userData.user.id,
organizationId: user.organizationId,
appVersionsId: version.id,
Feature: Collaboration ( realtime comments for canvas ) 🔥 (#810) * feat: initial commit for collaboration feature * add dnd to comments * add positions endpoint * feat: encapsulate all http common logic in http-client * segregate sections and transfer responsibility of state * feat: use-spring to add fade effect :zap: * fix: open in right * fix: left-right position css * add footer for message * integrate getcomment endpoint * use fromnow for date ago * add dnd * - Add data trasfer object for comment - Add class-validator package to check the response type from client - Add comment repository class for persistance layer - Add comment service with std. http methods - Update controller with all http methods - Update comment module - Fix http-client bug when error is thrown * fix http client bug when error is thrown * feat: add entity thread * feat: add migrations for thread and comment * update entitites * add tid to migration * filter comments by tid(thread_id) * fix: comment migration, add missing column comment * feat: integrate in ui * feat: split comments based on app_id * fix: dnd to correct position * package json engines * engines update * update npm * npm 6 to 7 * fix: add user initials to thread * fix: add firtname lastname to the comments * - Return user object when save thread called - Hide password field from user response - Fix created_at date typo - Instead of fetch all threads on new thread added, add the response to array of existing threads * feat: update ui components * change icon on comments view * ui fixes * fix: close icon close the popover * temp: comment select: false * use currentUser from localStorage * fix: on click outside if comment is open, dont hit addThread * fix: auth token issue in http-client * on drag hide the comment if open * add jwt auth * spec: add test for comment & thread * cleanup: remove console.log * feat: add comment actions * feat: add edit, delete, resolve options * feat: add mentions component * feat: add nestjs websockets * temp * websocket: establish client-server communication * ws: add message listner to comments module in ui * feat: add broadcast method to broadcast new events to all clients :bomb: * ws: cleanup :call_me_hand: * fix: remove max height from comment actions * feat: add user mentions, emoji support * fix: add static list of users - temp * update and delete iterations * - Rename comment, thread to comments, threads - Add conditional actions - Show edit, delete only if he is comment owner - Show resolve only if he is thread owner * reset engines * move svgr webpack to deps * fix: ui issues * remove log stmt * refactor: move resolved icon to comment-header * feat: allow comments to be added on top of widgets * feat: add keyboard shortcut * scroll to bottom on comment add * ui fixes * feat: add react toast for notification display * feat: add comment badge * fix: ws connection * fix: ws * remove rvrse * feat: add comment sidebar * feat: add comment right sidebar * fix: add missing foreign key elements * - upgrade typeorm to 0.2.38 - comment sidebar ui - added filter ui * feat: on click of right sidebar notificaiton open the comment box * reset engines * fix: add organization id to the comment and thread module * fix: add current version id * add currentversion id * disable comments if no id present * temp:checking for heroku deploy * fetch app on edit and deploy version * rename current_version_id to app_versions_id * ui fixes * show mentioned user in blue color * add ui changes * add authorization for create thread * change color to blue on click of comment, add auth for other endpoints of thread * update threads, notifications using socket * add auth for comments * remove events spec file * fix duplicate key error * fix notificaitons updation on edit, delete, resolve buttons clicked * update notifications for edit * feature toggle changes for frontend * add check for comments server * add emoji mart package for emoji * add reply count in comment sidebar * subtract 1 from count in comment sidebar * change empty text when no comments available
2021-11-01 07:28:03 +00:00
});
[Improvement] URLs scoped with workspace id (#5487) * add: new URL prefix * fix: working on home page * add: profile path * playing with rxjs * removed context part * working on path changes * changing routes - TODO: replace the workspaceId with actual id * redo: public apps path * initial commit * added authorize API * remove privileges from auth response * fixed some api issue - added subscriptions * fix: redirect url workspace-id null issue * fix: switch workspace * fix: organization list mapping - menu item paths * fix: preview url - editor, viewer permission mapping * jwt fix * fix: some url issue - permission mappings - workspace login * fixed some issues - user invite workspace-id - org settings menu item default selected item issue * app viewer fixes * fixing workspace login issues * fix * fixing issues - tooljet db - path issues - refatoring the code * fix: workspace vars permissions * fix: multi-page handle * fix: create app from template * fix: bulk user upload * fix: import app - clone app - upload profile image * fix: onboarding * fix: log out * fixed multi-workspace logout issue * fix: launch btn * fix: oauth2 * fixes * fix: sso login * fix: workspace sso login * fixing sso issues * fix: moved list of orgs to rxjs - fixed switching issues * reverting some changes * fixed some minor bugs * fixing sso redirect url issues * fix: switching network timing issues * fix: back to workspace-id * fix: tj-database - refactored the code - removed org id from some pages - will get the org id from the service file only * fix: multi-pages * fix: infinite loop issue * fixing workspace switching issue * fixes - comment link - logout & private route redirect url * fix: wrong uuid error * fixing subpath - fixed most of the places - need to test & fix workspace login, sso, new account * fix: subpath workspace login * fix: rxjs handle bug * Revert "fix: tj-database" This reverts commit 9632ec2ff0707c9d7b1777f64afbe15679203ca1. * fix: reverted tj-db changes * fix: subpath sso * typo fix * fix: existing session issues * new: switch workspace page * fix: modal dark-mode * added default sso support * fixes - subpath workspace switching - handle wrong routes * fix: manager user button - refactored the code * removed SINGLE Workspace feature * rebase * add: change modal text * fix: added validation * fixed private app 401 issue * initial commit * fix: logged out session multi-tab issue * refactoring the code * fix: redirect url issue * added auth-token in cookies * Fix: failing e2e specs * added session API * fix: backend session guard * fix: removing user details from local storage * fix: null wid * undo and redo * fix: login page * fix: viewer login redirection * fix: login page redirection * fix: public apps logout issue * added session storage and scheduler * added profile api * fix: sso login - switch workspace - login page - setup admin * working on fixes * fix: socket issue * fix: setup admin api * connected profile & logout apis * fix: malfunctioned auth token case * fix: realtime avatar * fix: profile avatar * fix: Realtime cursors avatar * setting max age for auth token cookie * add: Go to login page if logout api returns 401 * fix: subpath login * fix * fix: app logout [viewer] * fix: authorize page * remove expiry from jwt * fix: integrations route - session api * small fix * fix: updated profile * fix: workspace login [logged user] * fix: oauth and another workspace page issue * fixed app preview logout issue * subpath fix * fix: subpath app id * fix: selected state didnt change for apps page [subpath] * fix * add cookie parser to test app * specs added * increased user session expiry time * test: session & new apis * working on test cases * fix: onboarding issue * fixing specs * fix: test cases * fix: removing profile api calls * some fixes * fixing rebase issues * fix: global ds issues * fix: app is crashing * fix: back to text * fix: oauth test cases * fix: test-helper * fix: onboarding test cases * fix: tests again * refactoring the code * latest develop merging precautions - fixed a minor null issue * fix: typo * fix :menu issues due to the merging * fix: - clicking on tooljet logo didnt redirect to login page for public apps - private app preview doesnt load after login * subpath fixes * fixed back to issue * PR changes * fix: spec fixes for EE * doc: URL scoped for workspace --------- Co-authored-by: gsmithun4 <gsmithun4@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com>
2023-04-06 11:12:58 +00:00
const loggedUser = await authenticateUser(app, user.email);
Feature: Collaboration ( realtime comments for canvas ) 🔥 (#810) * feat: initial commit for collaboration feature * add dnd to comments * add positions endpoint * feat: encapsulate all http common logic in http-client * segregate sections and transfer responsibility of state * feat: use-spring to add fade effect :zap: * fix: open in right * fix: left-right position css * add footer for message * integrate getcomment endpoint * use fromnow for date ago * add dnd * - Add data trasfer object for comment - Add class-validator package to check the response type from client - Add comment repository class for persistance layer - Add comment service with std. http methods - Update controller with all http methods - Update comment module - Fix http-client bug when error is thrown * fix http client bug when error is thrown * feat: add entity thread * feat: add migrations for thread and comment * update entitites * add tid to migration * filter comments by tid(thread_id) * fix: comment migration, add missing column comment * feat: integrate in ui * feat: split comments based on app_id * fix: dnd to correct position * package json engines * engines update * update npm * npm 6 to 7 * fix: add user initials to thread * fix: add firtname lastname to the comments * - Return user object when save thread called - Hide password field from user response - Fix created_at date typo - Instead of fetch all threads on new thread added, add the response to array of existing threads * feat: update ui components * change icon on comments view * ui fixes * fix: close icon close the popover * temp: comment select: false * use currentUser from localStorage * fix: on click outside if comment is open, dont hit addThread * fix: auth token issue in http-client * on drag hide the comment if open * add jwt auth * spec: add test for comment & thread * cleanup: remove console.log * feat: add comment actions * feat: add edit, delete, resolve options * feat: add mentions component * feat: add nestjs websockets * temp * websocket: establish client-server communication * ws: add message listner to comments module in ui * feat: add broadcast method to broadcast new events to all clients :bomb: * ws: cleanup :call_me_hand: * fix: remove max height from comment actions * feat: add user mentions, emoji support * fix: add static list of users - temp * update and delete iterations * - Rename comment, thread to comments, threads - Add conditional actions - Show edit, delete only if he is comment owner - Show resolve only if he is thread owner * reset engines * move svgr webpack to deps * fix: ui issues * remove log stmt * refactor: move resolved icon to comment-header * feat: allow comments to be added on top of widgets * feat: add keyboard shortcut * scroll to bottom on comment add * ui fixes * feat: add react toast for notification display * feat: add comment badge * fix: ws connection * fix: ws * remove rvrse * feat: add comment sidebar * feat: add comment right sidebar * fix: add missing foreign key elements * - upgrade typeorm to 0.2.38 - comment sidebar ui - added filter ui * feat: on click of right sidebar notificaiton open the comment box * reset engines * fix: add organization id to the comment and thread module * fix: add current version id * add currentversion id * disable comments if no id present * temp:checking for heroku deploy * fetch app on edit and deploy version * rename current_version_id to app_versions_id * ui fixes * show mentioned user in blue color * add ui changes * add authorization for create thread * change color to blue on click of comment, add auth for other endpoints of thread * update threads, notifications using socket * add auth for comments * remove events spec file * fix duplicate key error * fix notificaitons updation on edit, delete, resolve buttons clicked * update notifications for edit * feature toggle changes for frontend * add check for comments server * add emoji mart package for emoji * add reply count in comment sidebar * subtract 1 from count in comment sidebar * change empty text when no comments available
2021-11-01 07:28:03 +00:00
const response = await request(app.getHttpServer())
2021-11-25 12:57:24 +00:00
.get(`/api/comments/${thread.id}/all`)
[Improvement] URLs scoped with workspace id (#5487) * add: new URL prefix * fix: working on home page * add: profile path * playing with rxjs * removed context part * working on path changes * changing routes - TODO: replace the workspaceId with actual id * redo: public apps path * initial commit * added authorize API * remove privileges from auth response * fixed some api issue - added subscriptions * fix: redirect url workspace-id null issue * fix: switch workspace * fix: organization list mapping - menu item paths * fix: preview url - editor, viewer permission mapping * jwt fix * fix: some url issue - permission mappings - workspace login * fixed some issues - user invite workspace-id - org settings menu item default selected item issue * app viewer fixes * fixing workspace login issues * fix * fixing issues - tooljet db - path issues - refatoring the code * fix: workspace vars permissions * fix: multi-page handle * fix: create app from template * fix: bulk user upload * fix: import app - clone app - upload profile image * fix: onboarding * fix: log out * fixed multi-workspace logout issue * fix: launch btn * fix: oauth2 * fixes * fix: sso login * fix: workspace sso login * fixing sso issues * fix: moved list of orgs to rxjs - fixed switching issues * reverting some changes * fixed some minor bugs * fixing sso redirect url issues * fix: switching network timing issues * fix: back to workspace-id * fix: tj-database - refactored the code - removed org id from some pages - will get the org id from the service file only * fix: multi-pages * fix: infinite loop issue * fixing workspace switching issue * fixes - comment link - logout & private route redirect url * fix: wrong uuid error * fixing subpath - fixed most of the places - need to test & fix workspace login, sso, new account * fix: subpath workspace login * fix: rxjs handle bug * Revert "fix: tj-database" This reverts commit 9632ec2ff0707c9d7b1777f64afbe15679203ca1. * fix: reverted tj-db changes * fix: subpath sso * typo fix * fix: existing session issues * new: switch workspace page * fix: modal dark-mode * added default sso support * fixes - subpath workspace switching - handle wrong routes * fix: manager user button - refactored the code * removed SINGLE Workspace feature * rebase * add: change modal text * fix: added validation * fixed private app 401 issue * initial commit * fix: logged out session multi-tab issue * refactoring the code * fix: redirect url issue * added auth-token in cookies * Fix: failing e2e specs * added session API * fix: backend session guard * fix: removing user details from local storage * fix: null wid * undo and redo * fix: login page * fix: viewer login redirection * fix: login page redirection * fix: public apps logout issue * added session storage and scheduler * added profile api * fix: sso login - switch workspace - login page - setup admin * working on fixes * fix: socket issue * fix: setup admin api * connected profile & logout apis * fix: malfunctioned auth token case * fix: realtime avatar * fix: profile avatar * fix: Realtime cursors avatar * setting max age for auth token cookie * add: Go to login page if logout api returns 401 * fix: subpath login * fix * fix: app logout [viewer] * fix: authorize page * remove expiry from jwt * fix: integrations route - session api * small fix * fix: updated profile * fix: workspace login [logged user] * fix: oauth and another workspace page issue * fixed app preview logout issue * subpath fix * fix: subpath app id * fix: selected state didnt change for apps page [subpath] * fix * add cookie parser to test app * specs added * increased user session expiry time * test: session & new apis * working on test cases * fix: onboarding issue * fixing specs * fix: test cases * fix: removing profile api calls * some fixes * fixing rebase issues * fix: global ds issues * fix: app is crashing * fix: back to text * fix: oauth test cases * fix: test-helper * fix: onboarding test cases * fix: tests again * refactoring the code * latest develop merging precautions - fixed a minor null issue * fix: typo * fix :menu issues due to the merging * fix: - clicking on tooljet logo didnt redirect to login page for public apps - private app preview doesnt load after login * subpath fixes * fixed back to issue * PR changes * fix: spec fixes for EE * doc: URL scoped for workspace --------- Co-authored-by: gsmithun4 <gsmithun4@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com>
2023-04-06 11:12:58 +00:00
.set('tj-workspace-id', user.defaultOrganizationId)
.set('Cookie', loggedUser.tokenCookie);
Feature: Collaboration ( realtime comments for canvas ) 🔥 (#810) * feat: initial commit for collaboration feature * add dnd to comments * add positions endpoint * feat: encapsulate all http common logic in http-client * segregate sections and transfer responsibility of state * feat: use-spring to add fade effect :zap: * fix: open in right * fix: left-right position css * add footer for message * integrate getcomment endpoint * use fromnow for date ago * add dnd * - Add data trasfer object for comment - Add class-validator package to check the response type from client - Add comment repository class for persistance layer - Add comment service with std. http methods - Update controller with all http methods - Update comment module - Fix http-client bug when error is thrown * fix http client bug when error is thrown * feat: add entity thread * feat: add migrations for thread and comment * update entitites * add tid to migration * filter comments by tid(thread_id) * fix: comment migration, add missing column comment * feat: integrate in ui * feat: split comments based on app_id * fix: dnd to correct position * package json engines * engines update * update npm * npm 6 to 7 * fix: add user initials to thread * fix: add firtname lastname to the comments * - Return user object when save thread called - Hide password field from user response - Fix created_at date typo - Instead of fetch all threads on new thread added, add the response to array of existing threads * feat: update ui components * change icon on comments view * ui fixes * fix: close icon close the popover * temp: comment select: false * use currentUser from localStorage * fix: on click outside if comment is open, dont hit addThread * fix: auth token issue in http-client * on drag hide the comment if open * add jwt auth * spec: add test for comment & thread * cleanup: remove console.log * feat: add comment actions * feat: add edit, delete, resolve options * feat: add mentions component * feat: add nestjs websockets * temp * websocket: establish client-server communication * ws: add message listner to comments module in ui * feat: add broadcast method to broadcast new events to all clients :bomb: * ws: cleanup :call_me_hand: * fix: remove max height from comment actions * feat: add user mentions, emoji support * fix: add static list of users - temp * update and delete iterations * - Rename comment, thread to comments, threads - Add conditional actions - Show edit, delete only if he is comment owner - Show resolve only if he is thread owner * reset engines * move svgr webpack to deps * fix: ui issues * remove log stmt * refactor: move resolved icon to comment-header * feat: allow comments to be added on top of widgets * feat: add keyboard shortcut * scroll to bottom on comment add * ui fixes * feat: add react toast for notification display * feat: add comment badge * fix: ws connection * fix: ws * remove rvrse * feat: add comment sidebar * feat: add comment right sidebar * fix: add missing foreign key elements * - upgrade typeorm to 0.2.38 - comment sidebar ui - added filter ui * feat: on click of right sidebar notificaiton open the comment box * reset engines * fix: add organization id to the comment and thread module * fix: add current version id * add currentversion id * disable comments if no id present * temp:checking for heroku deploy * fetch app on edit and deploy version * rename current_version_id to app_versions_id * ui fixes * show mentioned user in blue color * add ui changes * add authorization for create thread * change color to blue on click of comment, add auth for other endpoints of thread * update threads, notifications using socket * add auth for comments * remove events spec file * fix duplicate key error * fix notificaitons updation on edit, delete, resolve buttons clicked * update notifications for edit * feature toggle changes for frontend * add check for comments server * add emoji mart package for emoji * add reply count in comment sidebar * subtract 1 from count in comment sidebar * change empty text when no comments available
2021-11-01 07:28:03 +00:00
expect(response.statusCode).toBe(200);
[Improvement] URLs scoped with workspace id (#5487) * add: new URL prefix * fix: working on home page * add: profile path * playing with rxjs * removed context part * working on path changes * changing routes - TODO: replace the workspaceId with actual id * redo: public apps path * initial commit * added authorize API * remove privileges from auth response * fixed some api issue - added subscriptions * fix: redirect url workspace-id null issue * fix: switch workspace * fix: organization list mapping - menu item paths * fix: preview url - editor, viewer permission mapping * jwt fix * fix: some url issue - permission mappings - workspace login * fixed some issues - user invite workspace-id - org settings menu item default selected item issue * app viewer fixes * fixing workspace login issues * fix * fixing issues - tooljet db - path issues - refatoring the code * fix: workspace vars permissions * fix: multi-page handle * fix: create app from template * fix: bulk user upload * fix: import app - clone app - upload profile image * fix: onboarding * fix: log out * fixed multi-workspace logout issue * fix: launch btn * fix: oauth2 * fixes * fix: sso login * fix: workspace sso login * fixing sso issues * fix: moved list of orgs to rxjs - fixed switching issues * reverting some changes * fixed some minor bugs * fixing sso redirect url issues * fix: switching network timing issues * fix: back to workspace-id * fix: tj-database - refactored the code - removed org id from some pages - will get the org id from the service file only * fix: multi-pages * fix: infinite loop issue * fixing workspace switching issue * fixes - comment link - logout & private route redirect url * fix: wrong uuid error * fixing subpath - fixed most of the places - need to test & fix workspace login, sso, new account * fix: subpath workspace login * fix: rxjs handle bug * Revert "fix: tj-database" This reverts commit 9632ec2ff0707c9d7b1777f64afbe15679203ca1. * fix: reverted tj-db changes * fix: subpath sso * typo fix * fix: existing session issues * new: switch workspace page * fix: modal dark-mode * added default sso support * fixes - subpath workspace switching - handle wrong routes * fix: manager user button - refactored the code * removed SINGLE Workspace feature * rebase * add: change modal text * fix: added validation * fixed private app 401 issue * initial commit * fix: logged out session multi-tab issue * refactoring the code * fix: redirect url issue * added auth-token in cookies * Fix: failing e2e specs * added session API * fix: backend session guard * fix: removing user details from local storage * fix: null wid * undo and redo * fix: login page * fix: viewer login redirection * fix: login page redirection * fix: public apps logout issue * added session storage and scheduler * added profile api * fix: sso login - switch workspace - login page - setup admin * working on fixes * fix: socket issue * fix: setup admin api * connected profile & logout apis * fix: malfunctioned auth token case * fix: realtime avatar * fix: profile avatar * fix: Realtime cursors avatar * setting max age for auth token cookie * add: Go to login page if logout api returns 401 * fix: subpath login * fix * fix: app logout [viewer] * fix: authorize page * remove expiry from jwt * fix: integrations route - session api * small fix * fix: updated profile * fix: workspace login [logged user] * fix: oauth and another workspace page issue * fixed app preview logout issue * subpath fix * fix: subpath app id * fix: selected state didnt change for apps page [subpath] * fix * add cookie parser to test app * specs added * increased user session expiry time * test: session & new apis * working on test cases * fix: onboarding issue * fixing specs * fix: test cases * fix: removing profile api calls * some fixes * fixing rebase issues * fix: global ds issues * fix: app is crashing * fix: back to text * fix: oauth test cases * fix: test-helper * fix: onboarding test cases * fix: tests again * refactoring the code * latest develop merging precautions - fixed a minor null issue * fix: typo * fix :menu issues due to the merging * fix: - clicking on tooljet logo didnt redirect to login page for public apps - private app preview doesnt load after login * subpath fixes * fixed back to issue * PR changes * fix: spec fixes for EE * doc: URL scoped for workspace --------- Co-authored-by: gsmithun4 <gsmithun4@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com>
2023-04-06 11:12:58 +00:00
await logoutUser(app, loggedUser.tokenCookie, user.defaultOrganizationId);
});
afterAll(async () => {
await app.close();
Feature: Collaboration ( realtime comments for canvas ) 🔥 (#810) * feat: initial commit for collaboration feature * add dnd to comments * add positions endpoint * feat: encapsulate all http common logic in http-client * segregate sections and transfer responsibility of state * feat: use-spring to add fade effect :zap: * fix: open in right * fix: left-right position css * add footer for message * integrate getcomment endpoint * use fromnow for date ago * add dnd * - Add data trasfer object for comment - Add class-validator package to check the response type from client - Add comment repository class for persistance layer - Add comment service with std. http methods - Update controller with all http methods - Update comment module - Fix http-client bug when error is thrown * fix http client bug when error is thrown * feat: add entity thread * feat: add migrations for thread and comment * update entitites * add tid to migration * filter comments by tid(thread_id) * fix: comment migration, add missing column comment * feat: integrate in ui * feat: split comments based on app_id * fix: dnd to correct position * package json engines * engines update * update npm * npm 6 to 7 * fix: add user initials to thread * fix: add firtname lastname to the comments * - Return user object when save thread called - Hide password field from user response - Fix created_at date typo - Instead of fetch all threads on new thread added, add the response to array of existing threads * feat: update ui components * change icon on comments view * ui fixes * fix: close icon close the popover * temp: comment select: false * use currentUser from localStorage * fix: on click outside if comment is open, dont hit addThread * fix: auth token issue in http-client * on drag hide the comment if open * add jwt auth * spec: add test for comment & thread * cleanup: remove console.log * feat: add comment actions * feat: add edit, delete, resolve options * feat: add mentions component * feat: add nestjs websockets * temp * websocket: establish client-server communication * ws: add message listner to comments module in ui * feat: add broadcast method to broadcast new events to all clients :bomb: * ws: cleanup :call_me_hand: * fix: remove max height from comment actions * feat: add user mentions, emoji support * fix: add static list of users - temp * update and delete iterations * - Rename comment, thread to comments, threads - Add conditional actions - Show edit, delete only if he is comment owner - Show resolve only if he is thread owner * reset engines * move svgr webpack to deps * fix: ui issues * remove log stmt * refactor: move resolved icon to comment-header * feat: allow comments to be added on top of widgets * feat: add keyboard shortcut * scroll to bottom on comment add * ui fixes * feat: add react toast for notification display * feat: add comment badge * fix: ws connection * fix: ws * remove rvrse * feat: add comment sidebar * feat: add comment right sidebar * fix: add missing foreign key elements * - upgrade typeorm to 0.2.38 - comment sidebar ui - added filter ui * feat: on click of right sidebar notificaiton open the comment box * reset engines * fix: add organization id to the comment and thread module * fix: add current version id * add currentversion id * disable comments if no id present * temp:checking for heroku deploy * fetch app on edit and deploy version * rename current_version_id to app_versions_id * ui fixes * show mentioned user in blue color * add ui changes * add authorization for create thread * change color to blue on click of comment, add auth for other endpoints of thread * update threads, notifications using socket * add auth for comments * remove events spec file * fix duplicate key error * fix notificaitons updation on edit, delete, resolve buttons clicked * update notifications for edit * feature toggle changes for frontend * add check for comments server * add emoji mart package for emoji * add reply count in comment sidebar * subtract 1 from count in comment sidebar * change empty text when no comments available
2021-11-01 07:28:03 +00:00
});
});