NCIOCPL / clinical-trials-search-app

Clinical Trial Search Front-end
1 stars 6 forks source link

Change the CTS.Print/GenCache request #446

Closed blairlearn closed 2 years ago

blairlearn commented 2 years ago

Issue description

Creating the print version of a search results page requires information the react application already has.

https://github.com/NCIOCPL/clinical-trials-search-print/wiki/HTTP-Request

ESTIMATE 3

What's the expected change?

What's the current functionality?

What's the updated acceptance criteria?

Scenario: Print request passes JSON request body for search without search criteria
    Given the user navigates to "about-cancer/treatment/clinical-trials/search/r?loc=0&rl=1"
        And the user selects the checkbox next to the first list item
        And the user selects the checkbox next to the second list item
        And the user selects the checkbox next to the third list item
        And the user clicks the "Print Selected" button
    Then the system makes a request to CTS.Print/GenCache
        And the request has a JSON request body with the following key-value pairs
        | Key             | Value                                                                      |
        | trial_ids       | [ firstItem.trialID, secondItem.trialID, thirdItem.trialID ]               |
        | link_template   |  /about-cancer/treatment/clinical-trials/search/v?loc=0&rl=1&id=<TRIAL_ID> |
        | new_search_link | /about-cancer/treatment/clinical-trials/search |
        | search_criteria | NULL                                                                       |
Scenario: Print request passes JSON request body for search with search criteria
    Given the user navigates to "about-cancer/treatment/clinical-trials/search/r?a=29&loc=1&rl=1&t=C4872&z=22202"
        And the user selects the checkbox next to the first list item
        And the user selects the checkbox next to the second list item
        And the user selects the checkbox next to the third list item
        And the user clicks the "Print Selected" button
    Then the system makes a request to CTS.Print/GenCache
        And the request has a JSON request body with the following key-value pairs
        | Key             | Value                                                                                           |
        | trial_ids       | [ firstItem.trialID, secondItem.trialID, thirdItem.trialID ]                                    |
        | link_template   |  /about-cancer/treatment/clinical-trials/search/v?a=29&loc=1&rl=1&t=C4872&z=22202&id=<TRIAL_ID> |
        | new_search_link | /about-cancer/treatment/clinical-trials/search |
        | search_criteria | <SEARCH_CRITERIA_OBJECT>                                                                        |
Scenario: Print request passes JSON request body from basic search results
    Given the user navigates to "about-cancer/treatment/clinical-trials/search/r?loc=0&rl=1"
        And the user selects the checkbox next to the first list item
        And the user selects the checkbox next to the second list item
        And the user selects the checkbox next to the third list item
        And the user clicks the "Print Selected" button
    Then the system makes a request to CTS.Print/GenCache
        And the request has a JSON request body with the key-value pairs
        | Key             | Value                                                                                           |
        | new_search_link | /about-cancer/treatment/clinical-trials/search |
Scenario: Print request passes JSON request body from advanced search results
    Given the user navigates to "about-cancer/treatment/clinical-trials/search/r?loc=0&rl=2"
        And the user selects the checkbox next to the first list item
        And the user selects the checkbox next to the second list item
        And the user selects the checkbox next to the third list item
        And the user clicks the "Print Selected" button
    Then the system makes a request to CTS.Print/GenCache
        And the request has a JSON request body with the key-value pairs
        | Key             | Value                                                                                           |
        | new_search_link | /about-cancer/treatment/clinical-trials/search/advanced |

Additional details / screenshot

Related Tickets

VictoriaSunNIH commented 2 years ago

Being tested locally on blue-dev

sarinapadilla commented 2 years ago

This was fixed with PR #482, so closing this ticket.