Skip to content

Commit

Permalink
Merge pull request #463 from folio-org/FOLIO-1344
Browse files Browse the repository at this point in the history
Test changes proposed in FOLIO-1344.
  • Loading branch information
funkymalc authored Sep 4, 2018
2 parents 7c151df + d17213d commit 2475baf
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@Library ('folio_jenkins_shared_libs') _

buildNPM {
publishModDescriptor = 'yes'
stripesPlatform = 'platform-core'
runRegression = 'none'
runRegression = 'yes'
runLint = 'yes'
runTest = 'no'
}
39 changes: 33 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,42 @@ The other parts that are needed are the Okapi gateway, various server-side modul

(At some point, this process will be dramatically streamlined; but at present, this software is primarily for developers to work on, rather than for users to use.)

## Testing
## Build and serve

If you are doing development from git checkouts, you can use `npm test` or `yarn test` to run a regression-test suite, provided that:
To build and serve `ui-users` in isolation for development purposes, run the "start" package script.
```
$ yarn start
```

1. You have `ui-testing` checked out next to `ui-users`.
2. Your `ui-users` checkout is `yarn link`ed into `ui-testing`.
3. You are running a Stripes server on localhost:3000.
The default configuration assumes an Okapi instance is running on http://localhost:9130 with tenant "diku". The options `--okapi` and `--tenant` can be provided to match your environment.
```
$ yarn start --okapi http://localhost:9130 --tenant diku
```

(Most developers' environments meet these requirements.)
See the [serve](https://github.com/folio-org/stripes-cli/blob/master/doc/commands.md#serve-command) command reference in `stripes-cli` for a list of available options. Note: Stripes-cli options can be persisted in [configuration file](https://github.com/folio-org/stripes-cli/blob/master/doc/user-guide.md#configuration) for convenience.


## Tests

Integration tests require a running Okapi. The default configuration expects Okapi running on http://localhost:9130 with tenant "diku". To build and run integration tests for `ui-users` with these defaults, run the `test-int` script.
```
$ yarn test-int
```

To view tests while they are run, provide the `--show` option.
```
$ yarn test-int --show
```

To skip the build step and run integration tests against a build that is already running, provide the URL.
```
$ yarn test-int --url http://folio-testing.aws.indexdata.com/
```

As a convenience, `--local` can be used in place of `--url http://localhost:3000` for running tests a development server that has already been started.
```
$ yarn test-int --local
```

## Additional information

Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -430,8 +430,10 @@
},
"scripts": {
"start": "stripes serve",
"build": "stripes build",
"lint": "eslint .",
"test": "(cd ../ui-testing; yarn test-module -- -o --run=users --host=localhost)",
"test": "echo 'No unit tests implemented'",
"test-int": "stripes test nightmare",
"prepublishOnly": "node ../stripes-core/util/package2md.js package.json > ModuleDescriptor.json"
},
"devDependencies": {
Expand Down

0 comments on commit 2475baf

Please sign in to comment.