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

feat: tracked entity input (DHIS2-16023) #451

Merged
merged 300 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
300 commits
Select commit Hold shift + click to select a range
726bc4b
Merge branch 'master' into feat/DHIS2-15454-sidebar-ui-changes
martinkrulltott Sep 28, 2023
8c346f9
Merge branch 'master' into feat/DHIS2-15454-sidebar-ui-changes
martinkrulltott Oct 6, 2023
ddce619
Merge branch 'master' into feat/DHIS2-15454-sidebar-ui-changes
janhenrikoverland Oct 19, 2023
3493494
fix: use programId in effect dep list for fetching DHIS2-15752
edoardo Oct 20, 2023
6e5bbb6
feat: first draft of TE input
martinkrulltott Oct 20, 2023
9230839
Merge branch 'master' into feat/DHIS2-15454-sidebar-ui-changes
martinkrulltott Oct 23, 2023
a9aa659
chore: merge branch 'feat/DHIS2-15454-sidebar-ui-changes' into feat/t…
martinkrulltott Oct 23, 2023
5e16b5b
chore: en.pot from prev commit
martinkrulltott Oct 23, 2023
cf679dc
feat: support OUTPUT_TYPE_TRACKED_ENTITY in various places
martinkrulltott Oct 24, 2023
6fdc420
chore: merge branch 'master' into feat/tracked-entity-input
martinkrulltott Oct 27, 2023
3978ffa
fix: add missing metadata for entity type
martinkrulltott Oct 27, 2023
bfac20d
fix: first draft for TET dimensions
martinkrulltott Oct 27, 2023
f30647c
fix: scroll issue with TET dimensions
martinkrulltott Oct 30, 2023
c29e844
fix: prevent TET from being escaped
martinkrulltott Oct 30, 2023
58476d9
Merge branch 'master' into feat/tracked-entity-input
martinkrulltott Oct 30, 2023
d55db58
refactor: remove unused props
martinkrulltott Oct 31, 2023
7521f75
fix: manual cherry-pick of #453
martinkrulltott Oct 31, 2023
e3053e1
Merge branch 'master' into feat/tracked-entity-input
martinkrulltott Oct 31, 2023
fa85a2e
fix: clear TET when switching ui input
martinkrulltott Oct 31, 2023
d51c674
fix: show time dimensions for TE
martinkrulltott Oct 31, 2023
a20ff74
chore: en.pot
martinkrulltott Oct 31, 2023
b899320
fix: prevent stage from being set with TE
martinkrulltott Oct 31, 2023
458ce87
Merge branch 'master' into feat/tracked-entity-input
martinkrulltott Oct 31, 2023
08aade1
Merge branch 'feat/tracked-entity-input' of https://github.com/dhis2/…
martinkrulltott Oct 31, 2023
b55959a
test: first initial draft for TE tests
martinkrulltott Oct 31, 2023
98a1204
test: expect a server error so the Cypress tests will pass for now
martinkrulltott Oct 31, 2023
764978c
test: evaluate input button subtitle
martinkrulltott Oct 31, 2023
a65db25
test: evaluate period dimensions and the TET dimension list
martinkrulltott Oct 31, 2023
b9320a3
Merge branch 'master' into feat/tracked-entity-input
martinkrulltott Nov 3, 2023
59fd9e8
fix: apply filter to TE dimensions
martinkrulltott Nov 3, 2023
48f58b3
fix: prevent list of TET dimensions from not being fetched
martinkrulltott Nov 3, 2023
fdc915c
fix: remove error for not having a program in TE
martinkrulltott Nov 3, 2023
f5f0bcd
Merge branch 'master' into feat/tracked-entity-input
martinkrulltott Nov 6, 2023
0bd5e0d
fix: filter TET dimensions by program select
martinkrulltott Nov 6, 2023
c4f8dac
fix: filter out program attributes from TE program dimensions list
martinkrulltott Nov 6, 2023
218c21d
fix: fetch programs based on selected TET
martinkrulltott Nov 7, 2023
2ebb55b
fix: add empty text
martinkrulltott Nov 8, 2023
96afaab
refactor: move program fetching to within the ProgramSelect component
martinkrulltott Nov 9, 2023
9362c32
fix: extract type fetching to TypeSelect.js and fix various bugs with…
martinkrulltott Nov 10, 2023
cccb678
fix: add feature and test toggling
martinkrulltott Nov 13, 2023
8d7654b
test: reverse feature toggle tests for TE
martinkrulltott Nov 13, 2023
039c922
test: run nightly on push
martinkrulltott Nov 14, 2023
d0db3b3
test: adjust amount of expected TET dimensions
martinkrulltott Nov 14, 2023
f31bf46
test: adjust the test dimension
martinkrulltott Nov 14, 2023
1121d84
fix: add count for TET dimensions
martinkrulltott Nov 14, 2023
cd2699f
fix: te description typo
martinkrulltott Nov 15, 2023
b0f9b18
fix: add TE global dims, WIP
martinkrulltott Nov 15, 2023
3a4077a
fix: adapt extractDimensionIdParts to cater for tracked entity ids
martinkrulltott Nov 15, 2023
5059486
Merge branch 'master' into feat/tracked-entity-input
martinkrulltott Nov 16, 2023
b98277a
fix: sort out mixup of output types in extractDimensionIdParts
martinkrulltott Nov 16, 2023
9cd506d
fix: chip uses suffix instead of stageName
martinkrulltott Nov 20, 2023
13f53cc
fix: prefix program dimensions
martinkrulltott Nov 20, 2023
20ed962
fix: suffix changes for data elements
martinkrulltott Nov 20, 2023
dc52875
fix: only prefix program dimensions when input === TE
martinkrulltott Nov 20, 2023
1965a34
fix: centralise metadata for ou and switch label on input change
martinkrulltott Nov 20, 2023
448e3a6
fix: add suffix to ou
martinkrulltott Nov 20, 2023
a3adf36
fix: add suffix to event and program status
martinkrulltott Nov 21, 2023
97356b0
fix: add suffix to time dimensions
martinkrulltott Nov 21, 2023
f5626f2
fix: clear TE dimensions when switching ui input
martinkrulltott Nov 21, 2023
1c6e156
fix: prevent ProgramFilter from crashing when fetching programs
martinkrulltott Nov 21, 2023
cc57558
fix: program name in tooltip + being able to open fixed dimensions
martinkrulltott Nov 21, 2023
493aec9
chore: en.pot
martinkrulltott Nov 21, 2023
0c0926a
feat: enable tracked entity type analytics fetch (#459)
edoardo Nov 21, 2023
2183754
chore: lint error
martinkrulltott Nov 21, 2023
0d870a1
fix: hide event status from TE
martinkrulltott Nov 22, 2023
a4aa905
fix: count prefixed program dimensions properly
martinkrulltott Nov 22, 2023
b483cc9
test: add input type to tooltip tests
martinkrulltott Nov 22, 2023
badbcbd
test: update tests for formatDimensionId to reflect the latest changes
martinkrulltott Nov 22, 2023
d5ce94b
test: very basic cypress tests for TE
martinkrulltott Nov 22, 2023
6d7e1ff
test: add a plan for duplicating condition tests for TE
martinkrulltott Nov 22, 2023
951c591
test: add suggestions for future cypress tests for TE
martinkrulltott Nov 22, 2023
0b92c51
fix: extract program stage from a combined id for repeated events to …
martinkrulltott Nov 23, 2023
c33a18f
test: more tests for handling dimension ids
martinkrulltott Nov 23, 2023
21092cb
Merge branch 'master' into feat/tracked-entity-input
martinkrulltott Nov 24, 2023
8f5c8ba
fix: filter data elements by pid.sid
martinkrulltott Nov 24, 2023
ea71494
fix: reorder sidebar menu items
martinkrulltott Nov 24, 2023
825578c
fix: pass created as param when a period is selected
edoardo Nov 24, 2023
f604362
fix: allow LL generation for TET with no program selected
edoardo Nov 24, 2023
b419a80
Merge branch 'master' into feat/tracked-entity-input
martinkrulltott Nov 27, 2023
d9ef7f8
fix: typo in the formatDimensionId call causing loading AOs to fail
martinkrulltott Nov 27, 2023
b263e80
fix: bump analytics to alpha 1
martinkrulltott Nov 27, 2023
2c6f517
refactor: rename function
edoardo Nov 27, 2023
971b15a
fix: clear current also on missing TET error
edoardo Nov 27, 2023
d4cccf6
chore: lint error
martinkrulltott Nov 27, 2023
3081676
fix: proper error message for TET without dimensions
martinkrulltott Nov 27, 2023
3b5f0ff
Merge branch 'master' into feat/tracked-entity-input
martinkrulltott Nov 27, 2023
69d20b8
chore: remove unused comments
martinkrulltott Nov 28, 2023
52b83a0
Merge branch 'master' into feat/tracked-entity-input
martinkrulltott Dec 1, 2023
d61e5f3
fix: bump analytics to alpha 2
martinkrulltott Dec 1, 2023
d215482
fix: use correct path and params for TET download
edoardo Dec 5, 2023
5fcf6d2
Merge branch 'master' into feat/tracked-entity-input
martinkrulltott Dec 8, 2023
9170e41
fix: re-sort programs after results are fetched
martinkrulltott Dec 8, 2023
1014fd5
Merge branch 'master' into feat/tracked-entity-input
martinkrulltott Dec 11, 2023
c9206b5
fix: add metadata when selecting a tet dimension filter
martinkrulltott Dec 11, 2023
20ec39b
Merge branch 'master' into feat/tracked-entity-input
martinkrulltott Dec 12, 2023
20de514
fix: filter out user ous from metadata
martinkrulltott Dec 12, 2023
ccc0796
Merge branch 'master' into feat/tracked-entity-input
martinkrulltott Dec 14, 2023
4638520
chore: temporarily remove the cypress parllel feature
martinkrulltott Dec 14, 2023
285d0b8
chore: enable parallel again
martinkrulltott Dec 14, 2023
1f5e2be
chore: bump Analytics to latest alpha
martinkrulltott Dec 15, 2023
ec0b344
Merge branch 'master' into feat/tracked-entity-input
martinkrulltott Dec 15, 2023
bb810d1
Merge branch 'master' into feat/tracked-entity-input
martinkrulltott Dec 19, 2023
22d072e
fix: add suffix to program select options with dimension count
martinkrulltott Dec 19, 2023
f184dff
fix: reduce margin for the single select suffix
martinkrulltott Dec 20, 2023
c1d76aa
fix: enable download for TE when type is selected
martinkrulltott Dec 27, 2023
de66ae7
fix: enable save for TE (still not fully working though)
martinkrulltott Dec 27, 2023
2faee1f
fix: format program status for TE correctly
martinkrulltott Dec 27, 2023
8fd5a28
fix: prefix program status with program id
martinkrulltott Dec 27, 2023
4e4c82f
refactor: use correct prop type for suffix
martinkrulltott Dec 27, 2023
c78af4e
fix: display correct name for program status selection in tooltip
martinkrulltott Dec 27, 2023
085d528
test: add tests for program status in TE
martinkrulltott Dec 27, 2023
77631d7
chore: bump Analytics to latest alpha
martinkrulltott Dec 27, 2023
36d9998
fix: prevent getFormattedCellValue from failing when no header.name i…
martinkrulltott Dec 27, 2023
a417a8e
chore: remove old comments
martinkrulltott Dec 27, 2023
d4d29ec
test: add version toggling for TE download test
martinkrulltott Dec 28, 2023
8b5d058
fix: delete program and stage for TE properly
martinkrulltott Dec 28, 2023
7bc3e33
test: add layout validation test for TE
martinkrulltott Dec 28, 2023
0539dcf
test: add version toggling for TE layout validation test
martinkrulltott Dec 28, 2023
2325cff
test: refactor legend set to a single test case and add a draft for T…
martinkrulltott Dec 29, 2023
75a6fed
refactor: remove unused prop selectedProgram
martinkrulltott Dec 29, 2023
ca615cb
fix: prevent crash when stage filter is used and program is changed
martinkrulltott Dec 29, 2023
0c53793
fix: allow ou without items
martinkrulltott Jan 2, 2024
b037da1
fix: enable TE to be saved
martinkrulltott Jan 2, 2024
9b24adf
fix: fetch TET metadata when loading an AO
martinkrulltott Jan 3, 2024
2c869f4
refactor: only dispatch addMetadata when there is something to add
martinkrulltott Jan 3, 2024
d55e30c
test: add tests for saving a TE AO
martinkrulltott Jan 3, 2024
526ecf2
fix: solve various issues with the save flow
martinkrulltott Jan 4, 2024
69a5098
fix: add fixed dimensions metadata on load
martinkrulltott Jan 5, 2024
bb2eba8
chore: bump Analytics to latest alpha
martinkrulltott Jan 5, 2024
b502a60
chore: dummy commit to rerun all the Cypress tests
martinkrulltott Jan 9, 2024
d502a2f
test: add comment about enrollment
martinkrulltott Jan 10, 2024
71307a9
test: add changes from #477
martinkrulltott Jan 10, 2024
4ee11bb
Merge branch 'master' into feat/tracked-entity-input
martinkrulltott Jan 10, 2024
9d24678
test: switch to E2E_PROGRAM that has data in january
martinkrulltott Jan 10, 2024
2fc793e
fix: stop using redux in ChipBase.js
martinkrulltott Jan 12, 2024
94dc4b0
Merge branch 'master' into feat/tracked-entity-input
martinkrulltott Jan 12, 2024
d0bc269
chore: merge branch 'master' into branch
martinkrulltott Jan 12, 2024
d1ef2aa
fix: typo in the previous commit when merging with master
martinkrulltott Jan 12, 2024
e96e3a1
Merge branch 'master' into feat/tracked-entity-input
martinkrulltott Jan 15, 2024
9459a75
test: use the new fn for eval chip text
martinkrulltott Jan 15, 2024
41b5a95
chore: merge branch 'feat/tracked-entity-input' of https://github.com…
martinkrulltott Jan 15, 2024
2cb847f
chore: merge branch master
martinkrulltott Jan 15, 2024
688160e
test: use the new fn for eval chip text
martinkrulltott Jan 15, 2024
e5fccb1
test: use the new fn for eval chip text pt3
martinkrulltott Jan 15, 2024
b7a54c3
Merge branch 'master' into feat/tracked-entity-input
martinkrulltott Jan 17, 2024
f08f5e6
Merge branch 'master' into feat/tracked-entity-input
martinkrulltott Jan 18, 2024
eb6875a
test: add tests for textg conditions for TE
martinkrulltott Jan 18, 2024
bc450e4
test: remove leftover 'only'
martinkrulltott Jan 18, 2024
610c1ee
test: test toggling for alphanumeric conditions
martinkrulltott Jan 18, 2024
f7c5b22
test: add tests for numeric conditions (currently all skipped though)
martinkrulltott Jan 18, 2024
52e3dcb
test: typo from prev commit
martinkrulltott Jan 19, 2024
8f62560
fix: allow multiple program statuses to use conditions simultaneously
martinkrulltott Jan 19, 2024
5f41e28
Merge branch 'master' into feat/tracked-entity-input
martinkrulltott Jan 22, 2024
210e064
fix: adapt response header column prop based on the FE suffix logic (…
martinkrulltott Jan 23, 2024
b5a8c86
refactor: remove unused prop metadata
martinkrulltott Jan 23, 2024
e0398d0
feat: prefix time dimension ids with program id when tracked entity o…
jenniferarnesen Jan 24, 2024
d974ec3
fix: extract the start-end-date part of the item id for PeriodDimensi…
jenniferarnesen Jan 24, 2024
a1b4e91
fix: suffix for program status in table header
martinkrulltott Jan 24, 2024
6781115
test: program status updates + adapt chip to new DOM structure
martinkrulltott Jan 24, 2024
1e48837
fix: filter out ou metadata to always use the metadata provided by th…
martinkrulltott Jan 25, 2024
62b8f6f
fix: use correct metadata for global dimensions + ou and programStatus
martinkrulltott Jan 25, 2024
d3984a3
fix: suffix for time dimensions in table header
martinkrulltott Jan 25, 2024
9bf9ee9
test: update import path for getDimensionsWithSuffix
martinkrulltott Jan 26, 2024
1802453
test: prefix time dimensions with program id
martinkrulltott Jan 26, 2024
7d2b1b4
fix: reenable program status and ou to fetch metadata from app
martinkrulltott Jan 26, 2024
c68385e
Merge branch 'master' into feat/tracked-entity-input
martinkrulltott Jan 29, 2024
62c3f84
fix: read program/stage metadata from the programDimensions prop
martinkrulltott Jan 30, 2024
81644fe
fix: use correct dimension id format for repetitions
martinkrulltott Jan 30, 2024
c481044
fix: fetch time dimension metadata from programDimensions
martinkrulltott Jan 30, 2024
2eb79e6
chore: merge branch 'master' into feat/tracked-entity-input
martinkrulltott Jan 31, 2024
ace93a1
test: stop using return in helper fns
martinkrulltott Feb 1, 2024
71385f4
test: change year for numericCondition.cy.js
martinkrulltott Feb 1, 2024
49b7fef
test: unskip number conditions for TE
martinkrulltott Feb 1, 2024
4fe3d6c
chore: remove ! used for testing
martinkrulltott Feb 2, 2024
720463d
fix: when in the PeriodDimension, use the raw dimensionIds (#487)
jenniferarnesen Feb 5, 2024
02dbb56
test: update header format for repeated events tests
martinkrulltott Feb 5, 2024
c6a46bc
test: add todo list for createTrackedEntity tests
martinkrulltott Feb 5, 2024
0b77f57
test: skip test failing because of a backend issue (DHIS2-16733)
martinkrulltott Feb 5, 2024
f1475a7
test: update unit tests with latest suffix rules
martinkrulltott Feb 5, 2024
4882a7d
test: uncomment and fix test for legend set (backend is fixed)
martinkrulltott Feb 5, 2024
7e25fb0
test: unskip tests that were previously blocked by the backend
martinkrulltott Feb 6, 2024
a88a7a2
test: unskip tests that were previously blocked by a backend issue
martinkrulltott Feb 7, 2024
d1c47bf
test: dummy commit to test signing
martinkrulltott Feb 9, 2024
3cbff17
fix: hide the program select prefix when no program is selected
martinkrulltott Feb 9, 2024
2eb5aa5
test: update placeholder for program selector (based on prev commit)
martinkrulltott Feb 9, 2024
5ee65cf
fix: prevent stale data resulting in no TEI dimensions being outputted
martinkrulltott Feb 12, 2024
09bfbbd
fix: hide 'all' suffix and change tooltip text for empty dim in filter
martinkrulltott Feb 13, 2024
1165756
fix: close acc panel on save/load
martinkrulltott Feb 14, 2024
9a6f38f
fix: change tooltip text for empty dim in filter to noItemsLabel
martinkrulltott Feb 14, 2024
f8a29df
Merge branch 'master' into feat/tracked-entity-input
martinkrulltott Feb 15, 2024
f6bb871
fix: only close acc panel on save for TE
martinkrulltott Feb 19, 2024
0e5acd0
chore: remove old comments
martinkrulltott Feb 20, 2024
94ad0bc
test: expect more your dimensions than just 4
martinkrulltott Feb 20, 2024
d67d12d
chore: add comments in code
martinkrulltott Feb 21, 2024
83a38d8
chore: remove outdated comments
martinkrulltott Feb 21, 2024
134ab31
test: update repeatedEvents (TE part skipped for now bc of BE)
martinkrulltott Feb 22, 2024
4232598
chore: add hook deps from warnings
martinkrulltott Feb 23, 2024
5304e46
fix: revert previous change that was causing an infinite loop
martinkrulltott Feb 23, 2024
d21d26e
Merge branch 'master' into feat/tracked-entity-input
martinkrulltott Feb 26, 2024
4457c88
test: expect more TET dimensions for new db
martinkrulltott Feb 26, 2024
63fd045
test: expect more TET dimensions for new db, pt 2
martinkrulltott Feb 26, 2024
267c069
chore: remove resolved TODO
jenniferarnesen Feb 26, 2024
e830170
fix: hide program indicators from TE
martinkrulltott Feb 26, 2024
084d24b
refactor: change to regular quotes
martinkrulltott Feb 26, 2024
d509b68
test: update TE comments
martinkrulltott Feb 26, 2024
472272e
test: typo in layoutValidation
martinkrulltott Feb 26, 2024
e606195
test: dataTest as string
martinkrulltott Feb 26, 2024
5393850
test: prefix the selector for program-select
martinkrulltott Feb 26, 2024
76a938b
chore: update comment for current.js
martinkrulltott Feb 26, 2024
0f23372
refactor: reverse the order of getDimensionsWithSuffix
martinkrulltott Feb 26, 2024
51ace42
refactor: restructure the utils
martinkrulltott Feb 26, 2024
7868787
refactor: use strings directly instead of wrapping in an object
martinkrulltott Feb 26, 2024
25ea22b
refactor: rename dimensionIds -> dimensionId
martinkrulltott Feb 26, 2024
05b9e3b
refactor: import from index instead of from TrackedEntityDimensionsPa…
martinkrulltott Feb 26, 2024
4f5bf68
refactor: use map instead of ternaries for resource
martinkrulltott Feb 26, 2024
3e4b56c
refactor: restructure modules/ui.js and add tests for the various parts
martinkrulltott Feb 27, 2024
034eb25
test: change import path
martinkrulltott Feb 27, 2024
f5e530a
chore: remove TODO comment (see ticket https://dhis2.atlassian.net/br…
martinkrulltott Feb 27, 2024
7caecac
chore: remove outdated comment
martinkrulltott Feb 28, 2024
f3ec5ab
fix: prevent crash when program isn't found in metadata
martinkrulltott Feb 29, 2024
bf99ae0
fix: allow ou without items
martinkrulltott Mar 1, 2024
5ee3906
Merge branch 'master' into feat/tracked-entity-input
martinkrulltott Mar 4, 2024
45ed729
fix: handle empty input in extractDimensionIdParts
martinkrulltott Mar 5, 2024
f89b3c5
refactor: move resourceMap to outside of fn
martinkrulltott Mar 5, 2024
81871f7
refactor: move getAnalyticsEndpoint and getAdaptedVisualization
martinkrulltott Mar 5, 2024
9ba34a4
fix: flatten headers to allow repeated events to be sorted
martinkrulltott Mar 7, 2024
bc8d5c9
chore: bump Analytics to latest combined alpha
martinkrulltott Mar 12, 2024
ffd4632
chore: bump ui to latest
martinkrulltott Mar 12, 2024
f16baa7
fix: wrap SegmentedControl in flex-grow: 0
martinkrulltott Mar 12, 2024
bd00f95
test: stop clicking segment that's already selected
martinkrulltott Mar 12, 2024
a84d44e
fix: prevent period SC to trigger on change when selected item is cli…
martinkrulltott Mar 12, 2024
d21c67d
chore: bump Analytics to latest version
martinkrulltott Mar 13, 2024
1a88241
chore: revert version change
martinkrulltott Mar 13, 2024
ab5f5f4
test: update tests for repeated events for TE
martinkrulltott Mar 13, 2024
0e4e157
chore: remove outdated comment
martinkrulltott Mar 13, 2024
3bd01f0
test: toggle repeated events for 41+ only
martinkrulltott Mar 13, 2024
4c1de73
test: add comment about skip rounding
martinkrulltott Mar 18, 2024
68a261b
test: change 3.7 to 3.65 for numeric tests
martinkrulltott Mar 18, 2024
6aac2a4
test: update tests for new number value, 3.12
martinkrulltott Mar 20, 2024
9ed2992
test: adjust last updated rowsLength since an event was edited in the db
martinkrulltott Mar 20, 2024
a64eccc
test: feature toggle amount of decimals for above and below 41
martinkrulltott Mar 20, 2024
4bd2763
test: skip test broken by backend bug
martinkrulltott Mar 20, 2024
e8c7901
test: unskip test that was previously blocked by a backend issue
martinkrulltott Mar 21, 2024
ee95fd0
fix: add ellipsis to MenuItem label
martinkrulltott Mar 26, 2024
36445b4
Merge branch 'master' into feat/tracked-entity-input
martinkrulltott Apr 2, 2024
30d3591
chore: custom dev instance for nightly
jenniferarnesen Apr 2, 2024
1de6626
chore: restore nightly.yml before merge
martinkrulltott Apr 11, 2024
6179bca
test: unskip test for skip rounding
martinkrulltott Apr 12, 2024
b624ef8
chore: undo change in nightly.yml
martinkrulltott Apr 12, 2024
fe44aa9
test: skip test for skip rounding again as it's still broken
martinkrulltott Apr 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/e2e-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: 'e2e-dev'

on:
workflow_call:
secrets:
username:
required: true
password:
required: true
recordkey:
required: true

concurrency:
group: e2e-dev-${{ github.workflow}}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
compute-dev-version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.instance-version.outputs.version }}
steps:
- name: Output dev version
id: instance-version
uses: dhis2/action-instance-version@v1
with:
instance-url: https://test.e2e.dhis2.org/analytics-2.41d
username: ${{ secrets.username }}
password: ${{ secrets.password }}

e2e-dev:
needs: compute-dev-version
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
containers: [1, 2, 3, 4]

steps:
- name: Checkout
uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Run e2e tests
uses: cypress-io/github-action@v5
with:
start: yarn d2-app-scripts start
wait-on: 'http://localhost:3000'
wait-on-timeout: 300
record: true
parallel: true
browser: chrome
group: e2e-chrome-parallel-dev
env:
BROWSER: none
CYPRESS_RECORD_KEY: ${{ secrets.recordkey }}
CYPRESS_dhis2BaseUrl: https://test.e2e.dhis2.org/analytics-2.41d
CYPRESS_dhis2InstanceVersion: ${{ needs.compute-dev-version.outputs.version }}
CYPRESS_dhis2Username: ${{ secrets.username }}
CYPRESS_dhis2Password: ${{ secrets.password }}
CYPRESS_networkMode: live
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ defaults:

jobs:
call-workflow-e2e-dev:
uses: dhis2/workflows/.github/workflows/analytics-e2e-tests-dev.yml@master
# uses: dhis2/workflows/.github/workflows/analytics-e2e-tests-dev.yml@master
uses: ./.github/workflows/e2e-dev.yml
secrets:
username: ${{ secrets.CYPRESS_DHIS2_USERNAME }}
password: ${{ secrets.CYPRESS_DHIS2_PASSWORD }}
Expand Down
28 changes: 27 additions & 1 deletion cypress/helpers/dimensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ const selectProgramAndStage = ({ inputType, programName, stageName }) => {
}
}

export const selectProgramForTE = (programName) => {
cy.getBySel('accessory-sidebar').contains('Choose a program').click()
cy.contains(programName).click()
}

export const selectEventWithProgram = ({ programName, stageName }) =>
selectProgramAndStage({ inputType: INPUT_EVENT, programName, stageName })

Expand All @@ -33,14 +38,19 @@ export const selectEnrollmentWithProgram = ({ programName }) =>
programName,
})

export const selectTrackedEntityWithType = (typeName) => {
cy.getBySel('input-tracked-entity').click()
cy.getBySel('accessory-sidebar').contains('Choose a type').click()
cy.contains(typeName).click()
}

export const openInputSidebar = () => {
cy.getBySel('main-sidebar').contains('Input:').click()
cy.getBySel('input-panel').should('be.visible')
}

export const openProgramDimensionsSidebar = () => {
cy.getBySel('main-sidebar').contains('Program dimensions').click()
cy.getBySel('program-dimensions').should('be.visible')
}

export const openDimension = (dimensionName) => {
Expand All @@ -67,6 +77,9 @@ export const clickAddRemoveProgramDimension = (label) =>
export const clickAddRemoveProgramDataDimension = (label) =>
clickAddRemoveDimension('program-dimensions-list', label)

export const clickAddRemoveTrackedEntityTypeDimensions = (label) =>
clickAddRemoveDimension('tracked-entity-dimensions-list', label)

const selectProgramDimensions = ({
inputType,
programName,
Expand Down Expand Up @@ -105,6 +118,19 @@ export const selectEnrollmentWithProgramDimensions = ({
dimensions,
})

export const selectTrackedEntityWithTypeAndProgramDimensions = ({
typeName,
programName,
dimensions,
}) => {
selectTrackedEntityWithType(typeName)
openProgramDimensionsSidebar()
selectProgramForTE(programName)
dimensions.forEach((dimensionName) => {
clickAddRemoveProgramDataDimension(dimensionName)
})
}

const disabledOpacity = { prop: 'opacity', value: '0.5' }
const disabledCursor = { prop: 'cursor', value: 'not-allowed' }

Expand Down
13 changes: 13 additions & 0 deletions cypress/helpers/fileMenu.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { EXTENDED_TIMEOUT } from '../support/util.js'
import { clearInput, typeInput, clearTextarea, typeTextarea } from './common.js'

export const ITEM_NEW = 'file-menu-new'
Expand Down Expand Up @@ -68,3 +69,15 @@ export const renameVisualization = (name, description) => {

cy.getBySel('file-menu-rename-modal-rename').click()
}

export const openAOByName = (name) => {
cy.getBySel('dhis2-analytics-hovermenubar').contains('File').click()

cy.getBySel(ITEM_OPEN).click()

typeInput('open-file-dialog-modal-name-filter', name)

cy.getBySel('open-file-dialog-modal', EXTENDED_TIMEOUT)
.contains(name, EXTENDED_TIMEOUT)
.click()
}
24 changes: 16 additions & 8 deletions cypress/helpers/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,29 @@ export const expectAxisToNotHaveDimension = (axisId, dimensionId) => {
export const assertTooltipContainsEntries = (entries) =>
entries.forEach((entry) => cy.getBySel('tooltip-content').contains(entry))

export const assertChipContainsText = (dimensionName, suffix) => {
if (suffix) {
export const assertChipContainsText = (primary, items, secondary) => {
if (items) {
cy.getBySelLike('layout-chip')
.containsExact(dimensionName, EXTENDED_TIMEOUT)
.containsExact(primary, EXTENDED_TIMEOUT)
.parent()
.findBySelLike('chip-suffix')
.contains(suffix, EXTENDED_TIMEOUT)
.parent()
.findBySelLike('chip-items')
.contains(items, EXTENDED_TIMEOUT)
} else {
cy.getBySelLike('layout-chip')
.containsExact(dimensionName, EXTENDED_TIMEOUT)
.containsExact(primary, EXTENDED_TIMEOUT)
.parent()
.parent()
.findBySelLike('chip-suffix')
.findBySelLike('chip-items')
.should('not.exist')
}
if (secondary) {
cy.getBySelLike('layout-chip').containsExact(
secondary,
EXTENDED_TIMEOUT
)
}
cy.getBySelLike('layout-chip')
.containsExact(dimensionName, EXTENDED_TIMEOUT)
.containsExact(primary, EXTENDED_TIMEOUT)
.trigger('mouseover')
}
6 changes: 3 additions & 3 deletions cypress/helpers/menubar.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ export const clickMenubarOptionsButton = () =>

export const openDataOptionsModal = () => {
clickMenubarOptionsButton()
return cy.getBySel('options-menu-list').contains('Data').click()
cy.getBySel('options-menu-list').contains('Data').click()
}

export const openStyleOptionsModal = () => {
clickMenubarOptionsButton()
return cy.getBySel('options-menu-list').contains('Style').click()
cy.getBySel('options-menu-list').contains('Style').click()
}

export const openLegendOptionsModal = () => {
clickMenubarOptionsButton()
return cy.getBySel('options-menu-list').contains('Legend').click()
cy.getBySel('options-menu-list').contains('Legend').click()
}

export const clickMenubarInterpretationsButton = () =>
Expand Down
18 changes: 9 additions & 9 deletions cypress/helpers/orgUnit.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { EXTENDED_TIMEOUT } from '../support/util.js'

const orgUnitModalEl = 'fixed-dimension-ou-modal'
const orgUnitModalEl = 'ou-modal'
const levelSelectEl = 'org-unit-level-select'
const levelSelectOptionEl = 'org-unit-level-select-option'
const groupSelectEl = 'org-unit-group-select'
Expand All @@ -12,12 +12,12 @@ const orgUnitTreeNodeSelectEl = '[type="checkbox"]'
const orgUnitTreeNodeToggleEl = 'org-unit-tree-node-toggle'

export const clickOrgUnitDimensionModalUpdateButton = () =>
cy.getBySel(`${orgUnitModalEl}-action-confirm`).click()
cy.getBySelLike(`${orgUnitModalEl}-action-confirm`).click()

export const openOuDimension = () => cy.getBySelLike('layout-chip-ou').click()

export const expectOrgUnitDimensionModalToBeVisible = () =>
cy.getBySel(orgUnitModalEl).should('be.visible')
cy.getBySelLike(orgUnitModalEl).should('be.visible')

export const expectOrgUnitDimensionToNotBeLoading = () =>
cy
Expand Down Expand Up @@ -84,24 +84,24 @@ export const toggleOrgUnitGroup = (name) => {
}

export const selectUserOrgUnit = (name) => {
cy.getBySel(orgUnitModalEl)
cy.getBySelLike(orgUnitModalEl)
.contains(name)
.find('[type="checkbox"]')
.should('not.be.checked')
cy.getBySel(orgUnitModalEl).contains(name).click()
cy.getBySel(orgUnitModalEl)
cy.getBySelLike(orgUnitModalEl).contains(name).click()
cy.getBySelLike(orgUnitModalEl)
.contains(name)
.find('[type="checkbox"]')
.should('be.checked')
}

export const deselectUserOrgUnit = (name) => {
cy.getBySel(orgUnitModalEl)
cy.getBySelLike(orgUnitModalEl)
.contains(name)
.find('[type="checkbox"]')
.should('be.checked')
cy.getBySel(orgUnitModalEl).contains(name).click()
cy.getBySel(orgUnitModalEl)
cy.getBySelLike(orgUnitModalEl).contains(name).click()
cy.getBySelLike(orgUnitModalEl)
.contains(name)
.find('[type="checkbox"]')
.should('not.be.checked')
Expand Down
28 changes: 25 additions & 3 deletions cypress/helpers/period.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ const openPeriod = (label) => {
}
}

const selectFixedPeriod = ({ label, period }) => {
const DEFAULT_FIXED_PERIOD_TYPE = 'Monthly'
const selectFixedPeriod = ({ label, period, selected }) => {
// open the period modal in the fixed period view
openPeriod(label)
cy.contains('Choose from presets').click()
cy.contains('Fixed periods').click()
if (period.type) {

// change period type if applicable
if (period.type && period.type !== DEFAULT_FIXED_PERIOD_TYPE) {
cy.getBySel(
'period-dimension-fixed-period-filter-period-type-content'
).click()
Expand All @@ -21,12 +25,30 @@ const selectFixedPeriod = ({ label, period }) => {
.contains(period.type)
.click()
}

// select the year and the period
cy.getBySel('period-dimension-fixed-period-filter-year-content')
.clear()
.type(period.year)
cy.getBySel('period-dimension-transfer-option-content')
cy.getBySel('period-dimension-transfer-sourceoptions')
.findBySel('period-dimension-transfer-option-content')
.contains(period.name)
.dblclick()

cy.getBySel('period-dimension-transfer-pickedoptions').contains(period.name)
cy.getBySel('period-dimension-transfer-sourceoptions')
.contains(period.name)
.should('not.exist')

// verify that a previously selected period is visible in the picked options and not in the source options
if (selected) {
cy.getBySel('period-dimension-transfer-pickedoptions')
.containsExact(selected.name)
.should('be.visible')
cy.getBySel('period-dimension-transfer-sourceoptions')
.contains(selected.name)
.should('not.exist')
}
cy.getBySel('period-dimension-modal-action-confirm').click()
}

Expand Down
Loading
Loading