Skip to content

[timepoint_list] test plan #9689

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

Open
wants to merge 6 commits into
base: 27.0-release
Choose a base branch
from
Open
Changes from 2 commits
Commits
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
129 changes: 108 additions & 21 deletions modules/timepoint_list/test/TestPlan.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,108 @@
# Timepoint List - Test Plan:

1. **Module access permissions**
- For a candidate of the same site as your user, accessing the timepoint_list module via the url (https://\<yourInstance>\.loris.ca/\<candidateID\>) should not require any permission (With data entry permisson, click on the "Open Profile" button can also lead to the page).
- For a candidate of a different site than your user, ensure that either
- `access_all_profiles` permission is required
- or that the candidate's registration site is the same as the user's site
- Ensure that you can always only see visits from projects that you are affiliated with.
2. **Action buttons**
- For a candidate of a different site than your user, attempt to access the timepoint list via the url. The page should load with a message of 'Permission Denied'.
- For a candidate of the same site as your user, there should be up to 3 additional buttons:
1. "Create time point" (links to create_timepoint module for that candidate) if your user has permission `data_entry`
2. "Candidate Info" (links to candidate_parameters module for that candidate) if your user has permission `data_entry`
3. "View Imaging Datasets" (links to the imaging_browser module menu page filtered for that candidate) if your user has permission `imaging_browser_view_site`, `imaging_browser_view_allsites`, `imaging_browser_phantom_allsites`, or `imaging_browser_phantom_ownsite`
3. **Button links**
- Ensure the "View Imaging datasets" button points to correct place. (imaging_browser module for that candidate)
- Ensure the "Create time point" button points to correct place. (create_timepoint module for that candidate)
- Ensure the "Candidate Info" button points to correct place. (candidate_parameters module for that candidate)
5. **Datatable content**
- Visit Label: Ensure correct visits are shown and links point to correct place. (instrument_list for that specific timepoint)
- Imaging Scan Done: If 'yes', ensure links point to correct place (imaging_browser session page for that visit)
This test determines if permissions are working in the time_point module.<br>
<br>

## Table of Contents<br>
1. [Setup](#setup)
2. [Test Site Constraint](#test-site-constraint)
- [list only candidates of same site](#list-only-candidates-of-same-site)
- [load time points by entering DDCID in url](#load-time-points-by-entering-DDCID-in-url)
- [deny access to candidate of different site](#deny-access-to-candidate-of-different-site)
- [open profile button](#open-profile-button)
3. [Test Project constraint](#test-project-constraint)
4. [Test All sites permission](#test-all-sites-permission)
5. [Test Buttons](#test-buttons)
- [create time point](#create-time-point)
- [candidate info](#candidate-info)
- [view imaging datasets](#view-imaging-data)

<br>

## Setup

Sign into your loris instance with an **admin** account.<br>

- select Admin Accounts and click the Add User button.<br>
- enter all required information.<br>
- select *ONE* site for example, "Rome".<br>
- select *ONE* project, for example Pumpernickel.<br>
- tick box:Roles/Access Profile: View/Create Candidates and Timepoints - Own Sites.<br>
>This permission ensures that ONLY candidates who share the same site as your user are listed (in this case "Rome").<br>

<br>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This
is adding an extra line within the quote instead of after, can you remove it and the following ones

## Test Site constraint<br>

#### a) List only candidates of same site<br>
open a separate **incognito** or **private** browser window.
Sign into your loris instance. Enter the credentials of the user that you just created. Click Candidate/Access Profile.<br>
>You should see only candidates of that site "Rome" (in our example)

#### b) Load time points by entering DDCID in url<br>
copy the DDCID of this user, paste as follows:
https://\<yourInstance>\.loris.ca\<paste the candidateID here><br>
>if this loads a list of timepoints
OR returns:"there are no timepoints associated with this candidate" then this test is successful

#### c) Deny access to candidate of a different site<br>
enter a candidate ID into url that is from a different site.<br>
>If "Permission Denied" message is shown, then this test has passed

#### d) Open Profile Button<br>
Does Open Profile button work with this permission enabled?<br>
Click the 'Open Profile' button.<br>
Enter the DDCID number and PSCID of the same candidate.
This will replicate the same behaviour as clicking on the candidate's PSCID, showing their list of timepoints.<br>
>If it does, then the permission fully works.

<br>

## Test Project constraint<br>
Are the projects shown the same as those you selected in your user settings (in our example: "Pumpernickel")?<br>Refresh your incognito (or private) browser.
You will see a list of time points from all sites that share your selected project (in this case "Pumpernickel").<br>
>If other projects are shown, then this test has failed.<br>

<br>

## Test All sites permission<br>
tick : Permissions/Access Profile: View/Create Candidates and Timepoints - All Sites

Select a candidate from a different site and open up a timepoint.

>If you are allowed to view a list of timepoints for this candidates from different sites, then the permission has worked.

>if it reads
"You do not have access to any timepoints registered for this candidate," then this test has failed.

<br>

## Test Buttons<br>
For a Candidate of **same site**, there should be 3 Buttons, as follows:<br>

#### a) Create time point<br>

>Click this. If it takes you to 'Create Time Point', this test has passed

#### b) Candidate info<br>
>Click this. If you get code 403, the
'Candidate Parameters: View Candidate Information' permission is needed.
Else, if you are taken to candidate parameters, this test has passed.

#### c) View Imaging datasets<br>
>Click this. If you are taken to imaging browser, this test has passed.<br>

If you don't see this button, tick the permission:
'Imaging Browser: View Imaging Scans - Own Sites'
refresh and try again.

<br>

## End









Loading