Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

Introduced E2E Testing using TestCáfe #91

Merged
merged 1 commit into from
Jan 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions client/.testcaferc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"tsConfigPath": "./tests/tsconfig.json"
}
16 changes: 16 additions & 0 deletions client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,19 @@ Create a npm user and login to the npm registry, [more on npm publishing](https:
Publish packages with lerna to update versions properly across local packages, [more on publishing with lerna](https://github.com/lerna/lerna#publish).

npx lerna publish

## Running the testcafe tests

Build the Server

mvn install -U

Start client, server and the tests. (Client and Server will shutdown after the execution of the tests).

yarn e2etest

Start the tests if client and server are already running.

yarn testcafe:start

Please keep the mouse focus on the Testcafe window during the tests. Losing focus will cause tests to fail.
7 changes: 6 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@
"watch": "lerna run --parallel watch",
"publish": "yarn && yarn publish:latest",
"publish:latest": "lerna publish",
"publish:next": "lerna publish --exact --canary=next --npm-tag=next --yes"
"publish:next": "lerna publish --exact --canary=next --npm-tag=next --yes",
"theia:start": "cd browser-app && yarn start",
"testcafe:start": "testcafe chrome tests/test.ts",
"e2etest": "npm-run-all --parallel --aggregate-output theia:start testcafe:start"
},
"devDependencies": {
"lerna": "2.4.0",
"npm-run-all": "^4.1.5",
"testcafe": "^1.7.1",
"tslint": "^5.5.0"
},
"resolutions": {
Expand Down
3 changes: 3 additions & 0 deletions client/tests/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"defaultPort": 3000
}
Loading