-
Notifications
You must be signed in to change notification settings - Fork 31
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
Alexander Suevalov
committed
Jun 7, 2019
1 parent
49ce9a3
commit 26b5a8c
Showing
44 changed files
with
13,641 additions
and
201 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
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# ignore nested node_modules | ||
**/node_modules/** | ||
/node_modules | ||
/dist | ||
**/build/** |
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,5 +1,5 @@ | ||
{ | ||
"extends": "standard", | ||
"extends": ["standard"], | ||
"rules": { | ||
"no-var": "error", | ||
"prefer-const": "error" | ||
|
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
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"printWidth": 100, | ||
"singleQuote": true, | ||
"jsxBracketSameLine": true, | ||
"semi": false | ||
} |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"fixturesFolder": "./test/cypress/fixtures", | ||
"integrationFolder": "./test/cypress/integration", | ||
"pluginsFile": "./test/cypress/plugins/index.js", | ||
"supportFile": "./test/cypress/support/index.js", | ||
"videosFolder": "./test/cypress/videos", | ||
"video": false, | ||
"screenshotsFolder": "./test/cypress/screenshots", | ||
"testFiles": "**/*.spec.js", | ||
"ignoreTestFiles": "**/example*.js", | ||
"baseUrl": "https://app.contentful.com", | ||
"reporter": "junit", | ||
"reporterOptions": { | ||
"mochaFile": "test/cypress/reports/cypress-test-results.xml" | ||
}, | ||
"chromeWebSecurity": false | ||
} |
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Run integration tests | ||
|
||
## Writing tests and running them locally | ||
|
||
1. Create `.env` file at the root of the repository with the following variables: | ||
|
||
```bash | ||
# Generate PAT token here: https://www.contentful.com/r/knowledgebase/personal-access-tokens/ | ||
CONTENTFUL_CMA_TOKEN=<personal-cma-token> | ||
# ID of the space | ||
CONTENTFUL_SPACE_ID=<testing-space-id> | ||
# Url of the web app we test against | ||
CYPRESS_BASE_URL=https://app.contentful.com | ||
# If true, then local version of ui-extension-sdk will be used in all testing extension | ||
# Otherwise, it's latest version of ui-extension-sdk from NPM | ||
TEST_LOCAL_SDK=true | ||
# Target environment for local testing. | ||
# When running tests locally we won't create a new environment dynamically | ||
CONTENTFUL_LOCAL_TESTING_ENV=<envinonment-name-that-you-will-use-for-testing> | ||
``` | ||
|
||
2. Run the following commands | ||
|
||
```bash | ||
# install all build dependencies | ||
npm install | ||
# build local version of ui-extensions-sdk | ||
npm run build | ||
# build all testing extensions and install them in testing environment of your space | ||
npm run integration:local | ||
``` | ||
|
||
3. Open Cypress in development mode | ||
|
||
```bash | ||
npm run cypress:open | ||
``` | ||
|
||
4. Edit cypress tests | ||
|
||
Edit exising tests or create a new one in `test/cypress/integration` folder. |
Oops, something went wrong.