-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AXON-37] chore: move E2E tests to a dedicated folder
- Loading branch information
1 parent
cd3953a
commit c96d221
Showing
12 changed files
with
85 additions
and
13 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 |
---|---|---|
|
@@ -17,4 +17,5 @@ yalc.lock | |
.env | ||
coverage | ||
.test-extensions/ | ||
generated/ | ||
.generated/ | ||
e2e/.resources/ |
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 |
---|---|---|
|
@@ -4,6 +4,9 @@ | |
# images/ | ||
# LICENSE | ||
|
||
.generated/ | ||
e2e/ | ||
|
||
.env | ||
.env.example | ||
.eslintignore | ||
|
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,29 @@ | ||
### What am I looking at? | ||
|
||
This folder is for end-to-end ("e2e") tests and their configuration. | ||
|
||
In `atlascode`, we use [vscode-extension-tester](https://github.com/redhat-developer/vscode-extension-tester) to run browser automation-style tests agains ta developer instance of VSCode with the extension installed | ||
|
||
How do these tests work? | ||
|
||
- `extester`, the executable from `vscode-extension-tester`, compiles and packages the extensions using `vsce` | ||
- A new instance of `vscode` is spun up, with `atlascode` and prerequisites installed | ||
- A special automation performs the actions we describe in test suites | ||
|
||
What do these tests use? | ||
|
||
- `mocha` for orchestration | ||
- `chai` for assertions | ||
|
||
Commands related to e2e tests: | ||
|
||
# Compile the tests in this folder into JS | ||
npm run e2e:compile | ||
|
||
# Build the extension, e2e tests, configure the test runner, | ||
# then run the E2E tests | ||
npm run e2e | ||
|
||
# Run the tests without rebuilding the extension | ||
# Use this one when iterating | ||
npm run e2e:rerun |
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,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
command="setup-and-run" | ||
|
||
if [ "$1" == "--rerun" ]; then | ||
# Skip rebuilding the extension and setting up the tests | ||
# Use this if you are iterating in the tests themselves | ||
command="run-tests" | ||
fi | ||
|
||
extest ${command} \ | ||
'./.generated/atlascode/e2e/tests/*.test.js' \ | ||
--code_version max \ | ||
--code_settings e2e/test-settings.json \ | ||
--extensions_dir .test-extensions |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -41,6 +41,7 @@ | |
"__fixtures__", | ||
"**/__fixtures__", | ||
"test", | ||
".yalc" | ||
".yalc", | ||
"e2e", | ||
] | ||
} |