forked from strimzi/strimzi-ui
-
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.
feat: implement testing framework (strimzi#33)
* feat: implement testing framework - Jest/cucumber for TDD and BDD - Cypress/cucumber for E2E - All in typescript Closes: strimzi#27 Signed-off-by: Jordan <[email protected]> * fix: manually point storybook to correct core-js Signed-off-by: Jordan <[email protected]> * fix: address review comments Signed-off-by: Jordan <[email protected]> * refactor: move e2e failure output to e2e folder Signed-off-by: Jordan <[email protected]> * feat: file restructure Signed-off-by: Jordan <[email protected]> * refactor: restructure of all utility/config/tooling files Signed-off-by: Jordan <[email protected]> * fix: update links in test doc Signed-off-by: Jordan <[email protected]> * refactor: javascript purge Signed-off-by: Jordan <[email protected]>
- Loading branch information
Jordan Tucker
authored
Oct 15, 2020
1 parent
8e1a8a0
commit 9acbb43
Showing
51 changed files
with
11,822 additions
and
2,013 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 |
---|---|---|
|
@@ -8,6 +8,8 @@ dist/ | |
|
||
# test/supporting generated content | ||
generated/ | ||
coverage/ | ||
e2e/failure_output | ||
|
||
# misc | ||
.history | ||
|
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 +1 @@ | ||
utils/linting/.prettierignore | ||
linting/.prettierignore |
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
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 |
---|---|---|
|
@@ -17,4 +17,5 @@ module.exports = [ | |
}, | ||
}, | ||
], | ||
['@babel/preset-react'], | ||
]; |
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
File renamed without changes.
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 |
---|---|---|
@@ -1 +1 @@ | ||
utils/linting/commitlint.config.js | ||
linting/commitlint.config.js |
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 @@ | ||
e2e/cypress-cucumber-preprocessor.config.js |
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,7 @@ | ||
/* | ||
* Copyright Strimzi authors. | ||
* License: Apache License 2.0 (see the file LICENSE or http://apache.org/licenses/LICENSE-2.0.html). | ||
*/ | ||
module.exports = { | ||
stepDefinitions: 'e2e/features/step_definitions', | ||
}; |
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,10 @@ | ||
{ | ||
"baseUrl": "http://localhost:8080", | ||
"screenshotsFolder": "e2e/failure_output/screenshots", | ||
"videosFolder": "e2e/failure_output/videos", | ||
"integrationFolder": "e2e/features", | ||
"fixturesFolder": "e2e/fixtures", | ||
"supportFile": "e2e/support/index.ts", | ||
"pluginsFile": "e2e/plugins/index.ts", | ||
"testFiles": "**/*.feature" | ||
} |
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,3 +1,3 @@ | ||
# Cypress features | ||
|
||
This directory is home to all `.feature` file. Each file should focus on a specific area of testing, but not as specific as particular components. All step definitions for these features go in the `step_definition` directory. Where possible, step definitions should be as generic and re-usable as possible. | ||
This directory is home to all Cypress `.feature` files. Each feature should focus on a suite of scenarios for testing - but not for testing specific components. All step definitions for these features go in the `step_definitions` directory. Where possible, step definitions should be as generic and re-usable as possible. |
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,4 +1,4 @@ | ||
# Cypress Plugins | ||
|
||
This directory holds an `index.js` file that Cypress uses to load any plugins for e2e tests. If a new plugin is installed, | ||
This directory holds an `index.ts` file that Cypress uses to load any plugins for e2e tests. If a new plugin is installed, | ||
this is where it will need to be set up. See [Cypress plugins](https://docs.cypress.io/guides/tooling/plugins-guide.html). |
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,13 @@ | ||
/* | ||
* Copyright Strimzi authors. | ||
* License: Apache License 2.0 (see the file LICENSE or http://apache.org/licenses/LICENSE-2.0.html). | ||
*/ | ||
import cucumber from 'cypress-cucumber-preprocessor'; | ||
|
||
module.exports = (on: Function) => { | ||
const options = { | ||
typescript: require.resolve('typescript'), | ||
}; | ||
|
||
on('file:preprocessor', cucumber(options)); | ||
}; |
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,3 +1,3 @@ | ||
# Cypress support | ||
|
||
This directory contains an `index.js` file that will run before every Cypress features. This can be useful for having global commands or setup that needs to be run before any test. See [Cypress support file](https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests.html#Support-file). | ||
This directory contains an `index.ts` file that will run before every Cypress features. This can be useful for having global commands or setup that needs to be run before any test. See [Cypress support file](https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests.html#Support-file). |
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,4 @@ | ||
/* | ||
* Copyright Strimzi authors. | ||
* License: Apache License 2.0 (see the file LICENSE or http://apache.org/licenses/LICENSE-2.0.html). | ||
*/ |
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 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"types": ["cypress", "node"] | ||
} | ||
} |
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 +1 @@ | ||
utils/linting/husky.config.js | ||
linting/husky.config.js |
File renamed without changes.
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,3 @@ | ||
# Linting | ||
|
||
This directory contains code and configuration required to lint this codebase, as per [the linting documentation](../docs/Linting.md). Some of the tools used require configuration to exist at the root of the project. In these cases, symlinks are used to reference the actual configuration in this directory. All files in this directory are named to indicate what tool they are used with, and will contain comments to reference how they implement/enable the configuration desired. |
File renamed without changes.
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.