forked from forcedotcom/SalesforceMobileSDK-Shared
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
11 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
# Helper app to build a test_credentials.json for running tests locally | ||
|
||
## First time | ||
In the current directory | ||
|
||
```sh | ||
$ npm i | ||
$ npm start | ||
|
||
``` | ||
Make sure CORS policy is disabled (*) in you browser if you want test_credentials.json to include identity data needed by Android tests. | ||
|
||
In a browser, open `http://localhost:8080`, enter credentials. | ||
|
||
Copy the test credentials to your `test_credentials.json` file! | ||
|
||
## Running server | ||
In the current directory | ||
```sh | ||
$ npm start | ||
``` | ||
|
||
(*) On chrome install https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi or run chrome --disable-web-security | ||
## Getting json for your test_credentials.json file | ||
In a browser, open `http://localhost:8080`, pick your login host and click `Start Login Flow` button. | ||
In popup, enter credentials. | ||
After the approval screen, the popup should close and the main window will show you the json for your `test_credentials.json` file. | ||
|
||
NB: the `test_credentials.json` file on Android contains additional fields. To get those additional fields, a call to the identity URL is made. This will only work if your browser has CORS policy disabled. To disable CORS, simply run chrome with the `--disable-web-security` flag. | ||
|