Skip to content

Commit

Permalink
Release v1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Arce, Paul (NIH/NCI) [C] committed Mar 17, 2021
2 parents 9ab8a4e + 17c9ab1 commit 00a9e83
Show file tree
Hide file tree
Showing 144 changed files with 1,506,827 additions and 10,050 deletions.
11 changes: 0 additions & 11 deletions .plop/index.js

This file was deleted.

32 changes: 0 additions & 32 deletions .plop/templates/component/element--class-based.jsx.hbs

This file was deleted.

23 changes: 0 additions & 23 deletions .plop/templates/component/element--stateless-functional.jsx.hbs

This file was deleted.

1 change: 0 additions & 1 deletion .plop/templates/component/element-index.jsx.hbs

This file was deleted.

3 changes: 0 additions & 3 deletions .plop/templates/component/element.scss.hbs

This file was deleted.

14 changes: 0 additions & 14 deletions .plop/templates/component/element.story.js.hbs

This file was deleted.

33 changes: 0 additions & 33 deletions .plop/templates/component/element.test.js.hbs

This file was deleted.

64 changes: 0 additions & 64 deletions .plop/templates/component/index.js

This file was deleted.

14 changes: 0 additions & 14 deletions .plop/utils/componentExists.js

This file was deleted.

4 changes: 0 additions & 4 deletions .storybook/addons.js

This file was deleted.

12 changes: 0 additions & 12 deletions .storybook/config.js

This file was deleted.

142 changes: 0 additions & 142 deletions .storybook/generateStories.js

This file was deleted.

1 change: 0 additions & 1 deletion .storybook/storybook-shim.css

This file was deleted.

24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@

# Mock API Directions

## /mock-api/clinical-trial
This is the mock for clinicaltrialsapi.cancer.gov/v1/clinical-trial/:id. It only supports gets.
To create a mock:
1. Fetch a single clinical trial from the API and place the JSON response into the folder `support/mock-data/clinical-trial` with a file name of `<NCI_ID>.json` where `NCI_ID` is the trial's nci id. (e.g. `NCI-2015-01918.json`)

>*_NOTE:_* You can also use the NCT ID in place of the NCI_ID for any tests for the urls like `/v?id=NCI123435`. This ID *is* supported on the `/v` route, however within the search app, all links to the `/v` route are generated with the NCI ID. The NCT id is for backwards compatibility and certain other dynamic elements outside of the clinical trials search.

## /mock-api/clinical-trials
This is the mock for clinicaltrialsapi.cancer.gov/v1/clinical-trials. It only supports posts right now as our app only uses posts.

To create a mock:
1. Make some descriptive name to describe this scenario to be used in the file name, e.g. org_name_query. This will be referred to as `<scenario_name>` in the preceeding steps.
1. Copy the JSON of a request made to the api endpoint and store it in `support/mock-data/clinical-trials/<scenario_name>-request.json`.
1. Copy the JSON of a response returned from the api endpoint and store it in `support/mock-data/clinical-trials/<scenario_name>-response.json`.

The mock api server should return the correct response if the parameters of the request match. We use deep-equal to perform the comparison.




This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Available Scripts
Expand Down
Loading

0 comments on commit 00a9e83

Please sign in to comment.