Skip to content

Commit

Permalink
FI-1456: Fix navigation (#116)
Browse files Browse the repository at this point in the history
* use base path by default

* fix link

* move default base path to .env.development
  • Loading branch information
Jammjammjamm authored Feb 25, 2022
1 parent d48510e commit 21c9a05
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .env.development
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
LOAD_DEV_SUITES=*
VALIDATOR_URL=https://inferno.healthit.gov/validatorapi
JS_HOST=http://localhost:3000
JS_HOST=http://localhost:3000
BASE_PATH=inferno
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,28 @@ npm run dev
```

Inferno Core can then be accessed by navigating to
[http://localhost:4567](http://localhost:4567)
[http://localhost:4567/inferno](http://localhost:4567)

To only run the server (JSON API with no UI): `bundle exec puma`

## Running tests via JSON API
With the server running, first retrieve a list of available test suites:
```
GET http://localhost:4567/api/test_suites
GET http://localhost:4567/inferno/api/test_suites
```
See the details of a test suite:
```
GET http://localhost:4567/api/test_suites/TEST_SUITE_ID
GET http://localhost:4567/inferno/api/test_suites/TEST_SUITE_ID
```
Then create a test session for the suite you want to use:
```
POST http://localhost:4567/api/test_sessions?test_suite_id=TEST_SUITE_ID
POST http://localhost:4567/inferno/api/test_sessions?test_suite_id=TEST_SUITE_ID
```
Tests within a suite are organized in groups. Create a test run to run an entire
suite, a group, or an individual test. Only one of `test_suite_id`,
`test_group_id`, or `test_id` should be provided.
```
POST http://localhost:4567/api/test_runs
POST http://localhost:4567/inferno/api/test_runs
{
"test_session_id": "TEST_SESSION_ID",
"test_suite_id": "TEST_SUITE_ID",
Expand All @@ -76,9 +76,9 @@ POST http://localhost:4567/api/test_runs
```
Then you can view the results of the test run:
```
GET http://localhost:4567/api/test_runs/TEST_RUN_ID/results
GET http://localhost:4567/inferno/api/test_runs/TEST_RUN_ID/results
or
GET http://localhost:4567/api/test_sessions/TEST_SESSION_ID/results
GET http://localhost:4567/inferno/api/test_sessions/TEST_SESSION_ID/results
```

## Development
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { Request, RunnableType, Test, TestGroup } from 'models/testSuiteModels';
import ResultIcon from './ResultIcon';
import TestRunButton from '../TestRunButton/TestRunButton';
import TestListItem from './TestListItem/TestListItem';
import { getPath } from 'api/infernoApiService';
import ReactMarkdown from 'react-markdown';

interface TestGroupListItemProps {
Expand Down Expand Up @@ -157,11 +156,7 @@ const TestGroupListItem: FC<TestGroupListItemProps> = ({
primary={
<Box sx={{ display: 'flex' }}>
<FolderIcon className={styles.folderIcon} />
<Link
color="inherit"
href={getPath(`${location.pathname}#${testGroup.id}`)}
underline="hover"
>
<Link color="inherit" href={`${location.pathname}#${testGroup.id}`} underline="hover">
{testGroup.title}
</Link>
</Box>
Expand Down

0 comments on commit 21c9a05

Please sign in to comment.