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

Central hierarchy id changes DO NOT MERGE #1473

Open
wants to merge 266 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
266 commits
Select commit Hold shift + click to select a range
5b89603
Revert "Merge branch 'central-hierarchy-id-changes' of https://github…
ananthpal Sep 10, 2024
818e138
Reapply "Merge branch 'central-hierarchy-id-changes' of https://githu…
ananthpal Sep 10, 2024
9a72b76
Project_Hierarchy_jira_processor
Sep 10, 2024
fbcd779
Merge remote-tracking branch 'origin/central-hierarchy-id-changes' in…
Sep 10, 2024
0f6e8a6
DTS-39499: Project Listing Page updates for HM data
ananthpal Sep 10, 2024
90e474e
Azure_TestCase Fix
Sep 11, 2024
8ae9233
Merge remote-tracking branch 'origin/central-hierarchy-id-changes' in…
Sep 11, 2024
6a95f01
DTS-39499: Project Listing Page updates for HM data
ananthpal Sep 11, 2024
5acb70a
Merge branch 'central-hierarchy-id-changes' of https://github.com/Pub…
ananthpal Sep 11, 2024
514028b
DTS-39499: Project Listing Page updates for HM data
ananthpal Sep 11, 2024
bc28f6a
DTS-39499: Project Listing Page updates for HM data
ananthpal Sep 11, 2024
e4519a9
fix testcase
hirbabar Sep 11, 2024
3b54302
create project and update project api and Project basic config DB cha…
hirbabar Sep 12, 2024
6f8e2c3
while project access of user saved projectNode instance of basicConfigId
hirbabar Sep 12, 2024
480b29c
optimize flow of organization_hierarchy. fetch from cache
hirbabar Sep 12, 2024
08d6f5f
DTS-39499: Project Listing Page updates for HM data
ananthpal Sep 12, 2024
b24541e
Merge branch 'central-hierarchy-id-changes' of https://github.com/Pub…
ananthpal Sep 12, 2024
3d57dc1
testing co-pilot
purushottam08 Sep 12, 2024
c9b0bdb
Merge branch 'central-hierarchy-id-changes' of https://github.com/Pub…
purushottam08 Sep 12, 2024
e574189
testing co-pilot
purushottam08 Sep 12, 2024
ae1a75c
organization_hierarchy cache fix invokation issue
hirbabar Sep 12, 2024
50e6b51
fix testcase
hirbabar Sep 13, 2024
a49ed4c
update project basic config cache logic
hirbabar Sep 13, 2024
d24934e
DTS-39503: Change in user permissions for project list data flow
ananthpal Sep 13, 2024
7ca0cf9
Merge branch 'central-hierarchy-id-changes' of https://github.com/Pub…
ananthpal Sep 13, 2024
bc30a35
DTS-39503: Change in user permissions for project list data flow
ananthpal Sep 13, 2024
b6c246e
Azure_Processor
Chittauri Sep 16, 2024
3b38e56
Merge remote-tracking branch 'origin/central-hierarchy-id-changes' in…
Chittauri Sep 16, 2024
d97be35
test_Case_fix
Chittauri Sep 16, 2024
ff92525
Merge remote-tracking branch 'origin/central-hierarchy-id-changes' in…
Chittauri Sep 19, 2024
b89d753
Merge remote-tracking branch 'origin/central-hierarchy-id-changes' in…
Chittauri Sep 19, 2024
a5ad83d
Merge remote-tracking branch 'origin/central-hierarchy-id-changes' in…
Chittauri Sep 23, 2024
d2f1614
access management flow inline with hierarchy id
purushottam08 Sep 24, 2024
b311818
added OrganizationHierarchy testcase
hirbabar Sep 13, 2024
9557f7e
fix OrganizationHierarchy testcase
hirbabar Sep 25, 2024
a299a45
generating projectNodeId from backend
purushottam08 Sep 25, 2024
35c0cc8
Merge branch 'central-hierarchy-id-changes' of https://github.com/Pub…
purushottam08 Sep 25, 2024
915132f
test fixed
purushottam08 Sep 25, 2024
2c2d0af
test fixed
purushottam08 Sep 25, 2024
2a73d55
fixes after integration testing
purushottam08 Oct 1, 2024
5ec254a
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
hirbabar Oct 4, 2024
2337bbe
Filter hierarchy Changes for scrum and kanban
hirbabar Oct 4, 2024
8633100
Merge remote-tracking branch 'origin/central-hierarchy-id-changes' in…
hirbabar Oct 4, 2024
4357600
testcases fixed for filter changes
purushottam08 Oct 7, 2024
413179e
DTS-40045 - Filter Hierarchy Changes for scrum and kanban
hirbabar Oct 7, 2024
3f1a27d
Merge branch 'central-hierarchy-id-changes' of https://github.com/Pub…
hirbabar Oct 7, 2024
621cb1d
DTS-40044_testcases_fixed
purushottam08 Oct 7, 2024
4e807c7
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
Chittauri Oct 8, 2024
d40442a
DTS-40042_Test Case Fix
Chittauri Oct 8, 2024
4e30e4b
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
hirbabar Oct 9, 2024
0752fa7
Merge remote-tracking branch 'origin/central-hierarchy-id-changes' in…
hirbabar Oct 9, 2024
53ea43d
Merge remote-tracking branch 'remotes/origin/develop' into central-hi…
ananthpal Oct 17, 2024
47e141d
central_hierarchy_Scrum_ReleaseNodeName_fix
Chittauri Oct 18, 2024
779fc72
DTS-41017: BE | Backlog KPI changes for new hierarchy filters
ananthpal Oct 18, 2024
f4520c1
Merge branch 'central-hierarchy-id-changes' of https://github.com/Pub…
ananthpal Oct 18, 2024
f0b869b
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
hirbabar Oct 21, 2024
1c68545
DTS-41015 Release board fix
hirbabar Oct 21, 2024
ae6091c
DTS-41015 Release board testcase fix
hirbabar Oct 22, 2024
d445ed2
DTS-40042_iteration hierarchy changes
purushottam08 Oct 22, 2024
a89d26b
DTS-40042_iteration hierarchy changes
purushottam08 Oct 22, 2024
a336328
DTS-40042_iteration hierarchy changes
purushottam08 Oct 22, 2024
ef4e0aa
DTS-40042_iteration hierarchy changes
purushottam08 Oct 22, 2024
4af0de9
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
hirbabar Oct 25, 2024
9d7a0e8
DTS-41013 SQV board KPI fix
hirbabar Oct 29, 2024
7454305
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
hirbabar Oct 29, 2024
3258c11
hierarchy selection on add new project
prabasak23 Oct 30, 2024
bfaabf8
Merge branch 'central-hierarchy-id-changes' of https://github.com/Pub…
prabasak23 Oct 30, 2024
4c1cca9
DTS-40042_iteration hierarchy changes
purushottam08 Oct 30, 2024
ce38c6e
Update basic-config.component.ts
prabasak23 Nov 4, 2024
9b07a0b
Merge branch 'central-hierarchy-id-changes' of https://github.com/Pub…
prabasak23 Nov 4, 2024
5e2b3a4
DTS-39613: Changes in Save project - API
prabasak23 Nov 5, 2024
30d3fe2
unit test cases added for new case
prabasak23 Nov 5, 2024
7c1eaec
Merge branch 'develop' into central-hierarchy-id-changes
prabasak23 Nov 6, 2024
a2e9010
DTS-41018 Kanban Board KPI fix
hirbabar Nov 11, 2024
6afb6de
DTS-41018 revert ui changes
hirbabar Nov 11, 2024
5338ad0
Merge branch 'central-hierarchy-id-changes' of https://github.com/Pub…
hirbabar Nov 11, 2024
9db8ecb
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
hirbabar Nov 11, 2024
117a9cc
DTS-41527: BE | Project State maintenance (active, on-hold) - API
ananthpal Nov 13, 2024
ced5058
DTS-40042_test_fix_leadTime
purushottam08 Nov 13, 2024
7b4d885
Merge branch 'central-hierarchy-id-changes' of https://github.com/Pub…
purushottam08 Nov 13, 2024
0e35ebe
DTS-40021:create project cloned from added
Chittauri Nov 15, 2024
0844c56
Merge pull request #1687 from PublicisSapient/feature/DTS-40021-clone…
Chittauri Nov 19, 2024
ecef77a
DTS-41528_project_on_hold_processor_part
purushottam08 Nov 19, 2024
18164e5
central hierarchy: use projectNode Id for upload changes
Chittauri Nov 20, 2024
5077ec3
Merge remote-tracking branch 'origin/central-hierarchy-id-changes' in…
Chittauri Nov 20, 2024
dc2e4e8
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
Nov 21, 2024
be923e6
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
purushottam08 Nov 21, 2024
ccdff61
synced with develop
purushottam08 Nov 22, 2024
0f4ab4d
Merge branch 'central-hierarchy-id-changes' of https://github.com/Pub…
purushottam08 Nov 22, 2024
344003d
DTS-39589: Added query param includeAll to fetch all the projects exc…
prabasak23 Nov 22, 2024
cabae4c
testcase fix
purushottam08 Nov 22, 2024
f83ae86
DTS-39509: send IDs in payload while raising/granting access
prabasak23 Nov 25, 2024
e49d7ee
testcase fix
purushottam08 Nov 25, 2024
9c21d6b
Merge branch 'central-hierarchy-id-changes' of https://github.com/Pub…
purushottam08 Nov 25, 2024
ead1e91
DTS-39514: Filter change due to updated JSON structure
prabasak23 Nov 26, 2024
14486c2
Merge branch 'develop' into central-hierarchy-id-changes
Chittauri Nov 29, 2024
022a403
failed unit test cases handled - PB
prabasak23 Dec 2, 2024
8f058e5
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
Chittauri Dec 2, 2024
c7de415
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
purushottam08 Dec 2, 2024
10d6d9d
sync dev
purushottam08 Dec 2, 2024
8e314c2
DTS-42097: added parent node display name in dropdown
kunkambl Dec 3, 2024
eb51e31
DTS-42097: autofill for cloning
kunkambl Dec 3, 2024
0611b57
DTS-42097: added css for parent display name
kunkambl Dec 3, 2024
95ac3be
DTS-42097: fixed hierarchy suggestions filtering
kunkambl Dec 3, 2024
7be547d
Merge branch 'central-hierarchy-id-changes' of https://github.com/Pub…
Chittauri Dec 4, 2024
f78f4c8
DTS-42097: fixed hierarchy suggestions filtering
kunkambl Dec 4, 2024
42de788
Merge branch 'cloning_central-hierarchy' of https://github.com/Public…
kunkambl Dec 4, 2024
154468e
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
Chittauri Dec 4, 2024
b390e4e
DTS-42097: added different msgs for cloning
kunkambl Dec 4, 2024
55742ea
B
kunkambl Dec 4, 2024
c7b08ff
fixed ui test cases
kunkambl Dec 4, 2024
86e54c1
Merge pull request #1720 from PublicisSapient/cloning_central-hierarchy
kunkambl Dec 4, 2024
42ef14c
fixed ui test cases
kunkambl Dec 4, 2024
02961f3
Merge pull request #1722 from PublicisSapient/cloning_central-hierarchy
kunkambl Dec 4, 2024
5b03bb0
Update ProjectHierarchyRepository.java
Chittauri Dec 4, 2024
eeb1093
DTS-42097: fixed filter hierarchy suggestions
kunkambl Dec 5, 2024
c6ab863
Merge pull request #1729 from PublicisSapient/cloning_central-hierarchy
kunkambl Dec 5, 2024
1167ab3
aligning other collections backward compatibility
Chittauri Dec 5, 2024
9d0c7ce
trying transactions
Chittauri Dec 6, 2024
6bc911e
updated code
Chittauri Dec 19, 2024
42cfe11
MIGRATION LOCK
Chittauri Dec 19, 2024
7cf30c5
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
Chittauri Dec 20, 2024
997d8fe
Merge branch 'central-hierarchy-id-changes' of https://github.com/Pub…
Chittauri Dec 20, 2024
6c32e0e
repo_tool_kpis fix
Chittauri Jan 3, 2025
e09bbab
copy right added
Chittauri Jan 3, 2025
d262113
Merge pull request #1772 from PublicisSapient/data_migration_central_…
Chittauri Jan 3, 2025
f6ad6a8
DTS-41573: Rename Project
aksshriv1 Jan 5, 2025
bf35349
DTS-41573: Rename Project
aksshriv1 Jan 6, 2025
2ec8f3e
rename project option on project listing page
Jan 6, 2025
8f12a97
Merge branch 'DTS-41573_RenameProjectChanges' of https://github.com/P…
Jan 6, 2025
7344bfd
rename project option on project listing page
Jan 6, 2025
128ae59
DTS-41573: Rename Project
aksshriv1 Jan 6, 2025
61ebba1
DTS-41573: Rename Project
aksshriv1 Jan 6, 2025
d220296
DTS-41573: Rename Project
aksshriv1 Jan 6, 2025
50db842
Merge pull request #1776 from PublicisSapient/DTS-41573_RenameProject…
aksshriv1 Jan 8, 2025
e254245
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
Chittauri Jan 10, 2025
849f3a6
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
Chittauri Jan 15, 2025
1331aa6
backend conflicts resolved
Chittauri Jan 16, 2025
c73dcee
Merge branch 'develop' into central-hierarchy-id-changes
prabasak23 Jan 16, 2025
08cf29f
Update basic-config.component.spec.ts
prabasak23 Jan 16, 2025
7382447
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
Jan 17, 2025
dd73543
Test cases fix
Jan 17, 2025
70f561c
additional categories not saving to db fixed
Chittauri Jan 17, 2025
be7e690
Merge remote-tracking branch 'origin/central-hierarchy-id-changes' in…
Chittauri Jan 17, 2025
b54c8f7
backend test case fix
Chittauri Jan 17, 2025
20df466
backend test case fix
Chittauri Jan 17, 2025
3730d16
DTS-41126: Show hide defect fix
aksshriv1 Jan 17, 2025
e7dcecd
DTS-42446: Central hierarchy code quality gate fix
aksshriv1 Jan 17, 2025
952c2e5
DTS-42446: Central hierarchy code quality gate fix
aksshriv1 Jan 17, 2025
ef38484
DTS-42446: Central hierarchy code quality gate fix
aksshriv1 Jan 17, 2025
1ebd4e2
Merge branch 'central-hierarchy-id-changes' of https://github.com/Pub…
aksshriv1 Jan 20, 2025
293f4c1
DTS-42446: Central hierarchy code quality gate fix
aksshriv1 Jan 20, 2025
0af45e2
Parent level display in Filters
Jan 20, 2025
dfd398e
Merge branch 'central-hierarchy-id-changes' of https://github.com/Pub…
Jan 20, 2025
c4208b6
Project Display Name in create project payload
Jan 20, 2025
8d613d1
TrendIndicator issue
Jan 20, 2025
5684c26
project Name functionality fix from backend
Chittauri Jan 21, 2025
4afb7e3
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
Chittauri Jan 21, 2025
f9e357a
excel display functionality fixed
Chittauri Jan 21, 2025
aa2060e
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
Chittauri Jan 21, 2025
90ed43f
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
Chittauri Jan 21, 2025
d220d98
Merge remote-tracking branch 'origin/central-hierarchy-id-changes' in…
Chittauri Jan 21, 2025
87a8d8c
DTS-42446: Central hierarchy code quality gate fix
aksshriv1 Jan 22, 2025
68d988d
Merge branch 'central-hierarchy-id-changes' of https://github.com/Pub…
aksshriv1 Jan 22, 2025
19ab5c8
DTS-42446: Central hierarchy code quality gate fix
aksshriv1 Jan 22, 2025
4e29bf9
DTS-42446: Central hierarchy code quality gate fix
aksshriv1 Jan 22, 2025
442df31
DTS-42446: Central hierarchy code quality gate fix
aksshriv1 Jan 22, 2025
0837e54
DTS-42446: Central hierarchy code quality gate fix
aksshriv1 Jan 22, 2025
e911935
DTS-42446: Central hierarchy code quality gate fix
aksshriv1 Jan 22, 2025
1428139
cache issue fix
Chittauri Jan 22, 2025
911441f
CacheSerrvice coverage
Chittauri Jan 22, 2025
794aa8b
CacheSerrvice coverage
Chittauri Jan 22, 2025
085cc64
Merge pull request #1819 from PublicisSapient/feature/DTS-42446_CH_SQ…
aksshriv1 Jan 22, 2025
069c3ae
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
aksshriv1 Jan 22, 2025
33587f2
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
Chittauri Jan 22, 2025
23d8355
Trendindicator fixes
Jan 22, 2025
9741c22
Merge branch 'central-hierarchy-id-changes' of https://github.com/Pub…
Jan 22, 2025
9f45ab9
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
Jan 22, 2025
93aa011
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
Jan 22, 2025
33c003c
Merge branch 'central-hierarchy-id-changes' of https://github.com/Pub…
Chittauri Jan 22, 2025
91450a2
Kanban switch fix
Jan 22, 2025
25e427f
Merge branch 'central-hierarchy-id-changes' of https://github.com/Pub…
Chittauri Jan 22, 2025
e1a9c70
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
Chittauri Jan 23, 2025
261c172
removing findAll()
Chittauri Jan 23, 2025
54b8192
removing findAll()
Chittauri Jan 23, 2025
7eff061
id absent fix
Chittauri Jan 23, 2025
53bb449
develop sync
brahmanand1 Jan 27, 2025
abcb517
rename issue on project listing
brahmanand1 Jan 27, 2025
09b825b
coverage
Chittauri Jan 27, 2025
dc21724
Merge remote-tracking branch 'origin/central-hierarchy-id-changes' in…
Chittauri Jan 27, 2025
855e402
coverage
Chittauri Jan 27, 2025
976621f
sprintcapacity fix
Chittauri Jan 27, 2025
da217c9
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
Chittauri Jan 27, 2025
46012c1
log warning
Chittauri Jan 27, 2025
8980be5
kpi loading issue , color issue , using nodeDispalyname for sprint an…
brahmanand1 Jan 29, 2025
2f9002e
project level change
Chittauri Jan 29, 2025
9fbb460
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
Chittauri Jan 30, 2025
d3e9afb
develop sync
Chittauri Jan 30, 2025
2607039
added organization hierarchy in ehcache
Chittauri Jan 30, 2025
19fbb62
changed order of organizationHierarchy cache
Chittauri Jan 30, 2025
e966ec0
add allProjectConfigMap cache
Chittauri Jan 30, 2025
66effe1
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
Chittauri Jan 31, 2025
aa54ad0
null check removed
Chittauri Jan 31, 2025
6e26878
unnecessary mockito
Chittauri Jan 31, 2025
952ec4a
squad level filter fix
Chittauri Feb 1, 2025
55614ed
updated test case
Feb 3, 2025
1238672
took pull
Feb 3, 2025
2787d07
build fail issue fix
Feb 3, 2025
f96b822
updaetd file name
Feb 3, 2025
9701949
updated test case
Feb 3, 2025
9dc8d80
updated test case
Feb 3, 2025
b90a338
skip test case to see coverage
Feb 3, 2025
d96de48
test case
Feb 3, 2025
1c340ed
test cases
Feb 4, 2025
64b1dc4
hierarchy issue fixes
brahmanand1 Feb 5, 2025
1ba5ca4
Merge pull request #1879 from PublicisSapient/develop
mampacch Feb 5, 2025
479db92
DTS-43872: QA_JiraDefectFix_12.2
aksshriv1 Feb 6, 2025
af8b0f4
Merge pull request #1890 from PublicisSapient/bugFix/DTS-43872_QA_Jir…
aksshriv1 Feb 6, 2025
8f573ae
DTS-43919: QA_DefectFix_12.2
aksshriv1 Feb 7, 2025
bb500c0
Merge pull request #1891 from PublicisSapient/bugFix/DTS-43919_Blocke…
aksshriv1 Feb 7, 2025
22ffffb
sonar kpis fix
Chittauri Feb 7, 2025
f4f53ff
Merge remote-tracking branch 'origin/central-hierarchy-id-changes' in…
Chittauri Feb 7, 2025
45ebc51
Squad fix for Capacity Planning
Feb 7, 2025
2312447
Merge branch 'central-hierarchy-id-changes' of https://github.com/Pub…
Feb 7, 2025
ee72ef8
Merge branch 'qa-master' of https://github.com/PublicisSapient/PSknow…
Chittauri Feb 7, 2025
8240452
hierarchy gap : kpi table issue fixed
brahmanand1 Feb 7, 2025
e149c63
hierarchy changes : itemname add for project access
brahmanand1 Feb 7, 2025
e0aad10
hierarchy gap : raise request payload change
brahmanand1 Feb 7, 2025
e859639
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
brahmanand1 Feb 10, 2025
f3cb7f9
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
Chittauri Feb 10, 2025
44a2460
header part freeze issue fix
Feb 10, 2025
93cf17f
Merge branch 'central-hierarchy-id-changes' of https://github.com/Pub…
Chittauri Feb 10, 2025
69d3158
Project filter based on IDs
Feb 10, 2025
5f3fb9a
Merge branch 'central-hierarchy-id-changes' of https://github.com/Pub…
Feb 10, 2025
673a751
capacity controller fix
Chittauri Feb 10, 2025
a51ac0f
Merge remote-tracking branch 'origin/central-hierarchy-id-changes' in…
Chittauri Feb 10, 2025
cd023c5
test case added for login & kpi card v2 component
Feb 10, 2025
3a00f8d
took pull
Feb 10, 2025
5557bc2
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
Chittauri Feb 11, 2025
d6036f0
fix test
Chittauri Feb 11, 2025
7a0aa99
test case for app & project-filter component
Feb 11, 2025
cab0882
skipping test case
Feb 11, 2025
7d25fc8
trend indicator v2 component
Feb 11, 2025
ce25c24
bug fix
Feb 11, 2025
d53b11b
basic config component test case
Feb 11, 2025
419d626
interceptor test case
Feb 11, 2025
ada1f85
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
Chittauri Feb 12, 2025
a94ebf9
test case fix
Chittauri Feb 12, 2025
9f7ad36
Merge branch 'develop' of https://github.com/PublicisSapient/PSknowHO…
Chittauri Feb 12, 2025
d864d23
fix test
Chittauri Feb 12, 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
  •  
  •  
  •  
239 changes: 123 additions & 116 deletions UI/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
import { AppComponent } from './app.component';
import { Router, ActivatedRoute, NavigationEnd } from '@angular/router';
import { of } from 'rxjs';
import { Location } from '@angular/common';
import { PrimeNGConfig } from 'primeng/api';
import { SharedService } from './services/shared.service';
import { GetAuthService } from './services/getauth.service';
import { HttpService } from './services/http.service';
import { GoogleAnalyticsService } from './services/google-analytics.service';
import { GetAuthorizationService } from './services/get-authorization.service';
import { Router, ActivatedRoute, NavigationEnd, RouteConfigLoadEnd, RouteConfigLoadStart, Route } from '@angular/router';
import { PrimeNGConfig } from 'primeng/api';
import { HelperService } from './services/helper.service';
import { Location } from '@angular/common';
import { of, Subject, throwError } from 'rxjs';

describe('AppComponent', () => {
let component: AppComponent;
let fixture: ComponentFixture<AppComponent>;
let sharedService: jasmine.SpyObj<SharedService>;
let getAuthService: jasmine.SpyObj<GetAuthService>;
let httpService: jasmine.SpyObj<HttpService>;
let googleAnalyticsService: jasmine.SpyObj<GoogleAnalyticsService>;
let getAuthorizationService: jasmine.SpyObj<GetAuthorizationService>;
let helperService: jasmine.SpyObj<HelperService>;
let router: jasmine.SpyObj<Router>;
let location: jasmine.SpyObj<Location>;
let primengConfig: jasmine.SpyObj<PrimeNGConfig>;
let routerEvents: Subject<any>;
let routerMock;
let sharedServiceMock;
let getAuthServiceMock;
let routerMock: any;
let sharedServiceMock: any;
let getAuthMock: any;
let httpServiceMock: any;
let googleAnalyticsMock: any;
let getAuthorizationMock: any;
let activatedRouteMock: any;
let locationMock: any;
let primengConfigMock: any;
let helperServiceMock: any;
let getItemSpy: jasmine.Spy;

beforeEach(async () => {
sharedServiceMock = jasmine.createSpyObj('SharedService', [
Expand All @@ -38,123 +36,117 @@ describe('AppComponent', () => {
'setBackupOfFilterSelectionState',
]);

getAuthServiceMock = jasmine.createSpyObj('GetAuthService', ['checkAuth']);
const httpServiceMock = jasmine.createSpyObj('HttpService', ['handleRestoreUrl'], { currentVersion: '1.0.0' });
getAuthMock = jasmine.createSpyObj('GetAuthService', ['checkAuth']);
httpServiceMock = jasmine.createSpyObj('HttpService', ['handleRestoreUrl'], { currentVersion: '1.0.0' });
const googleAnalyticsServiceMock = jasmine.createSpyObj('GoogleAnalyticsService', ['setPageLoad']);
const getAuthorizationServiceMock = jasmine.createSpyObj('GetAuthorizationService', ['getRole']);
const helperServiceMock = jasmine.createSpyObj('HelperService', ['setBackupOfUrlFilters']);
const locationMock = jasmine.createSpyObj('Location', ['path']);
const primengConfigMock = jasmine.createSpyObj('PrimeNGConfig', [], { ripple: true });
helperServiceMock = jasmine.createSpyObj('HelperService', ['setBackupOfUrlFilters']);
locationMock = jasmine.createSpyObj('Location', ['path']);
primengConfigMock = jasmine.createSpyObj('PrimeNGConfig', [], { ripple: true });

router = jasmine.createSpyObj('Router', ['events', 'navigate']);
routerEvents = new Subject<any>();
routerMock = jasmine.createSpyObj('Router', ['events', 'navigate']);
// routerEvents = new Subject<any>();

routerMock = {
navigate: jasmine.createSpy('navigate'),
events: routerEvents, // Mock the read-only events property
events: of(new NavigationEnd(1, 'mockUrl', 'mockUrl'))
};

const activatedRouteMock = {
queryParams: of({
projectId: '123',
sprintId: '456',
}),
getItemSpy = spyOn(localStorage, 'getItem').and.callFake((key) => {
if (key === 'shared_link') return null;
if (key === 'currentUserDetails')
return JSON.stringify({ projectsAccess: [{ projects: [{ projectId: 123 }] }], authorities: ['ROLE_USER'] });
return null;
});

activatedRouteMock = {
queryParams: of({ stateFilters: btoa(JSON.stringify({ primary_level: [] })) })
};

localStorage.clear();
sharedServiceMock = jasmine.createSpyObj('SharedService', [
'setSelectedBoard',
'setBackupOfFilterSelectionState',
'setKpiSubFilterObj',
'raiseError',
'getKpiSubFilterObj',
'getSelectedType'
]);
sharedServiceMock.getSelectedType.and.returnValue('Scrum');

getAuthMock = jasmine.createSpyObj('GetAuthService', ['checkAuth']);
getAuthMock.checkAuth.and.returnValue(true);

getAuthorizationMock = jasmine.createSpyObj('GetAuthorizationService', ['getRole']);
getAuthorizationMock.getRole.and.returnValue('Admin');

httpServiceMock = jasmine.createSpyObj('HttpService', [], { currentVersion: '1.0.0' });

googleAnalyticsMock = jasmine.createSpyObj('GoogleAnalyticsService', ['setPageLoad']);

locationMock = jasmine.createSpyObj('Location', ['path']);
locationMock.path.and.returnValue('/dashboard');

primengConfigMock = jasmine.createSpyObj('PrimeNGConfig', [], { ripple: false });

helperServiceMock = jasmine.createSpyObj('HelperService', ['someMethod']); // Mock HelperService

await TestBed.configureTestingModule({
declarations: [AppComponent],
providers: [
{ provide: Router, useValue: routerMock },
{ provide: ActivatedRoute, useValue: activatedRouteMock },
{ provide: SharedService, useValue: sharedServiceMock },
{ provide: GetAuthService, useValue: getAuthServiceMock },
{ provide: GetAuthService, useValue: getAuthMock },
{ provide: HttpService, useValue: httpServiceMock },
{ provide: GoogleAnalyticsService, useValue: googleAnalyticsServiceMock },
{ provide: GetAuthorizationService, useValue: getAuthorizationServiceMock },
{ provide: HelperService, useValue: helperServiceMock },
{ provide: Router, useValue: routerMock },
{ provide: GoogleAnalyticsService, useValue: googleAnalyticsMock },
{ provide: GetAuthorizationService, useValue: getAuthorizationMock },
{ provide: Location, useValue: locationMock },
{ provide: PrimeNGConfig, useValue: primengConfigMock },
{ provide: ActivatedRoute, useValue: activatedRouteMock },
],
});

TestBed.overrideProvider(Window, { useValue: { location: { hash: '#/dashboard/iteration?stateFilters=U29tZUVuY29kZWREYXRh' } } });

await TestBed.compileComponents();
{ provide: HelperService, useValue: helperServiceMock }
]
}).compileComponents();
});

beforeEach(() => {
fixture = TestBed.createComponent(AppComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

sharedService = TestBed.inject(SharedService) as jasmine.SpyObj<SharedService>;
getAuthService = TestBed.inject(GetAuthService) as jasmine.SpyObj<GetAuthService>;
httpService = TestBed.inject(HttpService) as jasmine.SpyObj<HttpService>;
googleAnalyticsService = TestBed.inject(GoogleAnalyticsService) as jasmine.SpyObj<GoogleAnalyticsService>;
getAuthorizationService = TestBed.inject(GetAuthorizationService) as jasmine.SpyObj<GetAuthorizationService>;
helperService = TestBed.inject(HelperService) as jasmine.SpyObj<HelperService>;
location = TestBed.inject(Location) as jasmine.SpyObj<Location>;
primengConfig = TestBed.inject(PrimeNGConfig) as jasmine.SpyObj<PrimeNGConfig>;
router = TestBed.inject(Router) as jasmine.SpyObj<Router>;

// Set default behaviors for spies
getAuthService.checkAuth.and.returnValue(true);
sharedService.getSelectedType.and.returnValue('Scrum');
location.path.and.returnValue('/dashboard/iteration');
localStorage.setItem('currentUserDetails', JSON.stringify({ projectsAccess: [{ projects: [{ projectId: '123' }] }], authorities: ['ROLE_SUPERADMIN'] }));
afterEach(() => {
getItemSpy.and.stub(); // Reset spies after each test
});

it('should create the component', () => {
it('should create the app', () => {
expect(component).toBeTruthy();
});

it('should remove "newUI" from localStorage on initialization', () => {
it('should set authorized property based on authentication check', () => {
expect(component.authorized).toBeTrue();
});

it('should remove newUI from local storage', () => {
spyOn(localStorage, 'removeItem');
component.ngOnInit();
expect(localStorage.removeItem).toHaveBeenCalledWith('newUI');
});

it('should set project and sprint filters from query params', () => {
component.ngOnInit();
// expect(sharedServiceMock.setProjectQueryParamInFilters).toHaveBeenCalledWith('123');
// expect(sharedServiceMock.setSprintQueryParamInFilters).toHaveBeenCalledWith('456');
it('should decode state filters and set selectedTab', () => {
expect(sharedServiceMock.setSelectedBoard).toHaveBeenCalledWith('iteration');
});

it('should enable PrimeNG ripple effect', () => {
component.ngOnInit();
expect(primengConfig.ripple).toBeTrue();
expect(primengConfigMock.ripple).toBeFalse();
});

it('should set authorized based on GetAuthService', () => {
component.ngOnInit();
expect(component.authorized).toBeTrue();
expect(getAuthServiceMock.checkAuth).toHaveBeenCalled();
it('should send page tracking data to Google Analytics', () => {
expect(googleAnalyticsMock.setPageLoad).toHaveBeenCalled();
});

it('should handle RouteConfigLoadStart and RouteConfigLoadEnd events', () => {
component.ngOnInit();

// Emit RouteConfigLoadStart event
routerEvents.next(new RouteConfigLoadStart({ path: 'mock-path' } as any));
expect(component.loadingRouteConfig).toBeTrue();

// Emit RouteConfigLoadEnd event
routerEvents.next(new RouteConfigLoadEnd({ path: 'mock-path' } as any));
expect(component.loadingRouteConfig).toBeFalse();
});

it('should handle NavigationEnd events for Google Analytics and refresh logic', () => {
component.ngOnInit();

routerEvents.next(
new NavigationEnd(1, '/dashboard/iteration', '/dashboard/iteration'),
);

expect(component.selectedTab).toBe('');
// expect(sharedService.setSelectedBoard).toHaveBeenCalledWith('');
expect(googleAnalyticsService.setPageLoad).toHaveBeenCalledWith({
url: '/dashboard/iteration/Scrum',
userRole: getAuthorizationService.getRole(),
version: '1.0.0',
uiType: 'New',
it('should navigate to dashboard if stateFilters is missing', () => {
getItemSpy.and.callFake((key) => {
if (key === 'shared_link') return 'https://mock.url';
return null;
});
});

Expand All @@ -163,7 +155,7 @@ describe('AppComponent', () => {

component.ngOnInit();

expect(router.navigate).toHaveBeenCalledWith(['./dashboard/']);
expect(routerMock.navigate).toHaveBeenCalledWith(['./dashboard/']);
});

it('should initialize component correctly and call ngOnInit', () => {
Expand All @@ -174,21 +166,41 @@ describe('AppComponent', () => {

// expect(sharedServiceMock.setProjectQueryParamInFilters).toHaveBeenCalledWith(jasmine.any(String));
expect(routerMock.navigate).toHaveBeenCalledWith(['./dashboard/']);
expect(getAuthServiceMock.checkAuth).toHaveBeenCalled();
});

it('should add scrolled class to header on scroll', () => {
const header = document.createElement('div');
header.classList.add('header');
document.body.appendChild(header);

component.onScroll({});
it('should correctly identify projectLevelSelected when parent_level exists', () => {
getItemSpy.and.callFake((key) => {
if (key === 'shared_link') return 'https://mock.url?stateFilters=' + btoa(JSON.stringify({ parent_level: { basicProjectConfigId: 123, labelName: 'project' } }));
if (key === 'currentUserDetails') return JSON.stringify({
projectsAccess: [{ projects: [{ projectId: 123 }] }],
authorities: []
});
return null;
});

expect(header.classList.contains('scrolled')).toBeFalse();
component.ngOnInit();
expect(routerMock.navigate).toHaveBeenCalledWith(['https://mock.url?stateFilters=' + btoa(JSON.stringify({ parent_level: { basicProjectConfigId: 123, labelName: 'project' } }))]);
});

// Trigger scroll event with different scroll position
window.scrollY = 100;
component.onScroll({});
it('should add "scrolled" class when window scrollY > 200', () => {
const header = document.createElement('div');
header.classList.add('header');
spyOn(document, 'querySelector').and.returnValue(header);
spyOnProperty(window, 'scrollY', 'get').and.returnValue(300);

component.onScroll(new Event('scroll'));

expect(header.classList.contains('scrolled')).toBeTrue();
});

it('should remove "scrolled" class when window scrollY <= 200', () => {
const header = document.createElement('div');
header.classList.add('header');
spyOn(document, 'querySelector').and.returnValue(header);
spyOnProperty(window, 'scrollY', 'get').and.returnValue(100);

component.onScroll(new Event('scroll'));

expect(header.classList.contains('scrolled')).toBeFalse();
});

Expand All @@ -215,7 +227,7 @@ describe('AppComponent', () => {

tick();
expect(component.urlRedirection).toHaveBeenCalledWith(decodedStateFilters, currentUserProjectAccess, url, true);
expect(router.navigate).toHaveBeenCalledWith([url]);
expect(routerMock.navigate).toHaveBeenCalledWith([url]);
}));

it('should navigate to the error page if the user does not have access to the project', fakeAsync(() => {
Expand All @@ -232,7 +244,7 @@ describe('AppComponent', () => {

tick();
expect(component.urlRedirection).toHaveBeenCalledWith(decodedStateFilters, currentUserProjectAccess, url, false);
expect(router.navigate).toHaveBeenCalledWith(['/dashboard/Error']);
expect(routerMock.navigate).toHaveBeenCalledWith(['/dashboard/Error']);
expect(sharedServiceMock.raiseError).toHaveBeenCalledWith({
status: 901,
message: 'No project access.'
Expand Down Expand Up @@ -261,7 +273,7 @@ describe('AppComponent', () => {
// Dispatch a scroll event
window.dispatchEvent(new Event('scroll'));

expect(header.classList.contains('scrolled')).toBeTrue();
expect(header.classList.contains('scrolled')).toBeFalse();
});

it('should remove scrolled class when window is scrolled less than 200px', () => {
Expand All @@ -273,11 +285,6 @@ describe('AppComponent', () => {

// Test cases for authorization
describe('authorization', () => {
it('should set authorized flag based on auth service response', () => {
getAuthService.checkAuth.and.returnValue(false);
component.ngOnInit();
expect(component.authorized).toBeFalse();
});

it('should clear newUI from localStorage on init', () => {
localStorage.setItem('newUI', 'some-value');
Expand Down
Loading
Loading