Skip to content

Commit 92d0b63

Browse files
authored
[dictionary] Added tests for getDataDictionary() modules (#10687)
Added 3 testing instructions to TestPlan.md file for getDataDictionary() modules. Tests visibility of dictionary items and selection filters in the datadict depending on the active/inactive status of module and the permissions of users to these specific modules. * Resolves #10612
1 parent 36f6f2a commit 92d0b63

1 file changed

Lines changed: 51 additions & 34 deletions

File tree

Lines changed: 51 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,56 @@
1-
# Data Dictionary - Test Plan
1+
# Data Dictionary - Test Plan
22

3-
1. Check that you have access to the Data Dictionary if the user has one or more of
4-
these permissions:
5-
- data_dict
6-
- data_dict_edit or superuser.
7-
[Automation Testing]
8-
2. Check that the instruments combo box contains all the instrument names.
9-
[Automation Testing]
10-
3. Perform various searches and validate the results.
11-
- Use any combination of the available search criteria.
12-
- Make sure that when performing a keyword search the algorithm takes column Name,
13-
SourceField and Description into account.
14-
- Make sure that when you choose "Empty" in the Description combo box, all the rows
15-
returned have an empty description.
16-
[Automation Testing]
17-
4. Check that selecting multiple instruments returns all relevant results.
18-
5. Check that the table can be sorted according to any column (ascending and descending).
19-
[Automation Testing]
20-
6. Check that pushing the Clear button sets the Description search field to 'All',
21-
the Instruments search field to 'All instruments', clears the search keyword text
22-
field and performs a search with these criteria. Validate the results.
23-
[Automation Testing]
24-
7. Check that if (and only if) you have the 'data_dict_edit' permission you can edit
25-
the Description field. Edit a description, access the Candidate Profile page and
26-
access the Data Dictionary page again. Make sure the edit was saved.
27-
[Automation Testing]
28-
8. Make sure that search keywords are not case-sensitive and that when you specify
29-
more than one keyword, the search returns entries that match the whole string.
30-
[Automation Testing]
31-
9. Check that you can navigate through the search result pages (both by clicking on
3+
1. Check that you have access to the Data Dictionary if the user has one or more of
4+
these permissions:
5+
- data_dict_view (_"Data Dictionary: View Field Descriptions"_)
6+
- data_dict_edit (_"Data Dictionary: Edit Field Descriptions"_) or superuser
7+
(_"Superuser - supersedes all permissions"_).
8+
[Automation Testing]
9+
2. Check that the 'Module' filter dropdown lists only the active modules that the
10+
logged-in user can access and that actually provide a dictionary (e.g. `instruments`,
11+
`imaging_browser`, `candidate_parameters`).
12+
[Automation Testing]
13+
3. Check that the 'Category' filter dropdown is empty until a Module is selected, and
14+
that once a Module is selected it is populated only with the categories of that module.
15+
Changing the selected Module updates the Category options accordingly.
16+
[Automation Testing]
17+
4. Perform various searches and validate the results.
18+
- Use any combination of the available filters ('Module', 'Category', 'Field Name',
19+
'Description', 'Description Status', 'Data Scope', 'Data Type', 'Data Cardinality',
20+
'Visits' and 'Cohort').
21+
- Make sure that when you choose "Empty" in the 'Description Status' filter dropdown,
22+
all the rows returned have an empty description.
23+
[Automation Testing]
24+
5. Check that the 'Visits' and 'Cohort' multiselect filters return all relevant results
25+
when more than one value is selected.
26+
6. Check that the table can be sorted according to any column (ascending and descending).
27+
[Automation Testing]
28+
7. Check that pushing the "Clear Filter" button resets all filters to empty.
29+
[Automation Testing]
30+
8. Check that if (and only if) you have the 'data_dict_edit' permission, the edit
31+
(pencil) icon appears on the Description column. Click it, change the text in the
32+
"Edit Description" popup and click "Modify". Confirm the row's Description Status shows
33+
"Modified" and displays "(edited)". Navigate away (e.g. the Candidate Profile page) and
34+
return to the Data Dictionary; make sure the edit was saved.
35+
[Automation Testing]
36+
9. Check that you can navigate through the search result pages (both by clicking on
3237
the numbers and arrows in the bottom right corner of the table).
3338
[Automation Testing]
34-
10. Check that the maximum rows displayed dropdown works, also check that the
39+
10. Check that the maximum rows displayed dropdown works, also check that the
3540
download table as CSV works as well.
3641
[Automation Testing]
37-
11. Check that the `tools/exporters/data_dictionary_builder.php` works. Try changing
38-
field names in an instrument before running the script and make sure that the
39-
corresponding entries in Data Dictionary are updated correctly.
42+
11. Module enable/disable behaviour. Using the Module Manager (Admin > Modules),
43+
disable a module that provides a dictionary (e.g. `imaging_browser` or
44+
`candidate_parameters`). Reload the Data Dictionary and confirm:
45+
- The module's fields no longer appear in the table.
46+
- The module is no longer an option in the 'Module' filter.
47+
- Selecting any remaining module repopulates the 'Category' filter with only that
48+
module's categories.
49+
Re-enable the module and confirm its fields, 'Module' filter option, and 'Category'
50+
filter options reappear.
51+
12. Per-user module access. Log in as a user who does NOT have access to a specific
52+
module that provides a dictionary. Confirm that, by design, the dictionary entries
53+
(fields), the 'Module' filter option, and the related 'Category' options for that
54+
module are NOT visible to that user, even though the module is active. Log in as a user
55+
WITH access to that module and confirm the same entries and filter options are now
56+
visible.

0 commit comments

Comments
 (0)