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: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
43 changes: 37 additions & 6 deletions modules/dataquery/test/TestPlan.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,43 @@
# Data Query - Test Plan

## Welcome page
### Table of Contents<br>

1. Ensure the module loads only for a user that has the `dataquery_view` permission. They must also have access to the dictionary module.
2. Assert that: `Instructions` panel, `Recent Queries` panel, and `Next Steps` panel (bottom-right corner) collapse as expected.
3. Assert that: `Continue to Define Fields` button in the main panel, and `Choose Fields` button in the `Next Steps` panel are redirecting to the same page.
4. `Recent Queries` panel
1. If not queries are available, make some so they will be added to this section.
1. [Setup](#setup)
2. [Test Data Query Permission](#test-data-query-view-permission)
3. [Panel Tests](#panel-tests)
-[Test that Panels Collapse](#test-that-panels-collapse)
-[Test Panel Redirect](#test-panel-redirect)
4. [Recent Queries Tests]

## 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>

## Test Data Query View Permission
Ensure the module loads only for a user that has the `dataquery_view` permission. They must also have access to the dictionary module.<br>
>if the test yield this, the test is successful<br>

<br>

## Panel Tests<br>

### Test Panel Collapse
-`Instructions` panel: click to open and click again to collapse ETCETC, `Recent Queries` panel, and `Next Steps` panel (bottom-right corner) collapse as expected.<br>

### Test Panel Redirect
Asser`Continue to Define Fields` button in the main panel, and `Choose Fields` button in the `Next Steps` panel are redirecting to the same page.

### Test `Recent Queries` panel
- If not queries are available, make some so they will be added to this section.
2. Assert that: queries you made have their parameters correctly displayed (i.e. fields and filters).
3. Assert that: `text filter` immediately filter the queries.
4. Assert that: clicking `Collapse queries` effectively collapse all queries.
Expand Down
115 changes: 94 additions & 21 deletions modules/timepoint_list/test/TestPlan.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,94 @@
# 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)
# Timepoint List - Test Plan

## Table of Contents

1. [Setup](#setup)
2. [Test Site Constraint](#test-site-constraint)
3. [Test Project Constraint](#test-project-constraint)
4. [Test All Sites Permission](#test-all-sites-permission)
5. [Test Buttons](#test-buttons)

## Setup

Sign into your loris instance with an **admin** account.

- Select Admin > User Accounts and click the Add User button.
- Enter all required information.
- Select *ONE* site for example, "Rome".
- Select *ONE* project, for example Pumpernickel.
- [x] View/Create Candidates and Timepoints - Own Sites.
- Open a separate **incognito** or **private** browser window.
- Sign into your loris instance. Enter the credentials of the user that you just created.

## Test Site Constraint

### List only candidates of same site

- Click Candidate/Access Profile.

Assert that you see only candidates of that site "Rome" (in our example)**

### Load time points by entering CandID in url

- Copy the CandID of this user, paste as follows:
https://\<yourInstance>\.loris.ca\/\<paste the candidateID here

Assert that this loads a list of timepoints **or** returns :
>There are no timepoints associated with this candidate

### Deny access to candidate of a different site

- Enter a candidate ID into url that is from a different site.

Assert that the following message is shown:**

>Permission Denied

## Open Profile Button

- [x] View/Create Candidates and Timepoints - Own Sites.

- Click the 'Open Profile' button.
- Enter the CandID 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.

Assert that it does

## Test Project Constraint

- Are the projects shown the same as those you selected in your user settings (in our example: "Pumpernickel")?
- 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")

Assert that other projects are **not** shown

## Test All Sites Permission

- [x] View/Create Candidates and Timepoints - All Sites

- Select a candidate from a different site and open up a timepoint. Assert that, for this candidate, you can see timepoints from different sites.

## Test Buttons

- For a Candidate of **same site** (Rome, in our example), there should be 3 Buttons, as follows:

### Create Time Point

- Click this and assert that it takes you to 'Create Time Point'.**

### Candidate Info

- With the following permissions unchecked :
- [ ] Candidate Parameters: View Candidate Information
- [ ] Candidate Parameters: Edit Candidate Information
Assert that you do not see the `Candidate Info` button. Assert that the button appears when one or both are checked.

### View Imaging Datasets

Assert that, if you click this button, you are taken to imaging browser

- If you don't see this button, set the following permission :
- [x] Imaging Browser: View Imaging Scans - Own Sites
- Refresh and try again.

## End
Loading