Skip to content

Commit

Permalink
Merge branch 'release/2.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
dweber019 committed Mar 3, 2018
2 parents 83a2a3a + f5bec62 commit 0c62830
Show file tree
Hide file tree
Showing 3 changed files with 124 additions and 36 deletions.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

[![Build Status](https://travis-ci.org/w3tecch/test-cafe-e2e.svg?branch=master)](https://travis-ci.org/w3tecch/test-cafe-e2e)
[![Build status](https://ci.appveyor.com/api/projects/status/bb3h9352qx9w6s6x/branch/master?svg=true)](https://ci.appveyor.com/project/dweber019/test-cafe-e2e/branch/master)
[![David Dependancy Status](https://david-dm.org/w3tecch/test-cafe-e2e.svg)](https://david-dm.org/w3tecch/test-cafe-e2e)
[![devDependencies Status](https://david-dm.org/w3tecch/test-cafe-e2e/dev-status.svg)](https://david-dm.org/w3tecch/test-cafe-e2e?type=dev)

# Installation

Expand Down Expand Up @@ -46,12 +46,26 @@ npm run test:single <path-to-file>
npm run test:single tests/test-case.spec.ts
```

or run all test in live (watch) mode
```bash
npm run live
```

## Write tests

All test are located in `tests/`. See example `estate.ts`.
There is also a helper utility `helper.ts` which can be imported and provides some help.
The `helper.ts` can also be extended.

## I have lots of tests but would like to restart only one (only live command)
When you work on a particular test, just add the `.only` call for it:

```
test.only('Current test', async t => {});
```

Once you are done with it and ready to run the whole suite, just remove the `.only` directive and save the file.

## Documentation

[Here you can find help about element selection (e.g. get text)](https://devexpress.github.io/testcafe/documentation/test-api/selecting-page-elements/selectors.html)
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"name": "test-cafe-e2e",
"version": "1.0.0",
"version": "2.0.0",
"description": "E2E testing for almost any frontend app",
"scripts": {
"pretest": "npm run tslint",
"test": "testcafe chrome tests/**/*.spec.ts",
"test:single": "testcafe chrome",
"preci": "npm run tslint",
"ci": "testcafe chrome:headless tests/**/*.spec.ts",
"tslint": "tslint -c tslint.json 'tests/**/*.ts'"
"tslint": "tslint -c tslint.json 'tests/**/*.ts'",
"live": "testcafe-live chrome tests/**/*.spec.ts"
},
"bugs": {
"url": "https://github.com/w3tecch/test-cafe-e2e/issues"
Expand All @@ -31,9 +32,10 @@
],
"devDependencies": {
"@types/dotenv": "^4.0.2",
"dotenv": "^4.0.0",
"testcafe": "^0.18.5",
"dotenv": "^5.0.1",
"testcafe": "^0.19.0",
"testcafe-aurelia-selectors": "^0.1.3",
"testcafe-live": "^0.1.3",
"tslint": "^5.9.1"
}
}
134 changes: 103 additions & 31 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,18 @@ ansi-escapes@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-2.0.0.tgz#5bae52be424878dd9783e8910e3fc2922e83c81b"

ansi-escapes@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.0.0.tgz#ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92"

ansi-regex@^2.0.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"

ansi-regex@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"

ansi-styles@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
Expand Down Expand Up @@ -78,6 +86,10 @@ async-exit-hook@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/async-exit-hook/-/async-exit-hook-1.1.2.tgz#8095d75e488c29acee0551fe87252169d789cfba"

async-exit-hook@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/async-exit-hook/-/async-exit-hook-2.0.1.tgz#8bd8b024b0ec9b1c01cccb9af9db29bd717dfaf3"

async-limiter@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8"
Expand Down Expand Up @@ -729,6 +741,10 @@ caniuse-lite@^1.0.30000780:
version "1.0.30000784"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000784.tgz#129ced74e9a1280a441880b6cd2bce30ef59e6c0"

cast-array@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/cast-array/-/cast-array-1.0.0.tgz#11a744e403bed53b926f98138d1b303dca9987d0"

chai@^3.0.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247"
Expand Down Expand Up @@ -859,9 +875,9 @@ diff@^3.2.0:
version "3.4.0"
resolved "https://registry.yarnpkg.com/diff/-/diff-3.4.0.tgz#b1d85507daf3964828de54b37d0d73ba67dda56c"

dotenv@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-4.0.0.tgz#864ef1379aced55ce6f95debecdce179f7a0cd1d"
dotenv@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-5.0.1.tgz#a5317459bd3d79ab88cff6e44057a6a3fbb1fcef"

electron-releases@^2.1.0:
version "2.1.0"
Expand All @@ -884,7 +900,7 @@ endpoint-utils@^1.0.2:
ip "^1.1.3"
pinkie-promise "^1.0.0"

error-stack-parser@^1.3.3:
error-stack-parser@^1.3.3, error-stack-parser@^1.3.6:
version "1.3.6"
resolved "https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-1.3.6.tgz#e0e73b93e417138d1cd7c0b746b1a4a14854c292"
dependencies:
Expand Down Expand Up @@ -950,6 +966,12 @@ graceful-fs@^4.1.11:
version "4.1.11"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"

graphlib@^2.1.5:
version "2.1.5"
resolved "https://registry.yarnpkg.com/graphlib/-/graphlib-2.1.5.tgz#6afe1afcc5148555ec799e499056795bd6938c87"
dependencies:
lodash "^4.11.1"

has-ansi@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
Expand Down Expand Up @@ -1034,6 +1056,10 @@ is-fullwidth-code-point@^1.0.0:
dependencies:
number-is-nan "^1.0.0"

is-fullwidth-code-point@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"

is-glob@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863"
Expand Down Expand Up @@ -1071,6 +1097,10 @@ json5@^0.5.1:
version "0.5.1"
resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821"

keypress@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/keypress/-/keypress-0.2.1.tgz#1e80454250018dbad4c3fe94497d6e67b6269c77"

linux-platform-info@^0.0.3:
version "0.0.3"
resolved "https://registry.yarnpkg.com/linux-platform-info/-/linux-platform-info-0.0.3.tgz#2dae324385e66e3d755bec83f86c7beea61ceb83"
Expand All @@ -1085,6 +1115,10 @@ lodash@4.16.4:
version "4.17.4"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"

lodash@^4.11.1:
version "4.17.5"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511"

log-update-async-hook@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/log-update-async-hook/-/log-update-async-hook-2.0.2.tgz#6eba89dbe67fa12d0b20ac47df7942947af1fcd1"
Expand Down Expand Up @@ -1156,7 +1190,15 @@ mustache@^2.1.1, mustache@^2.1.2, mustache@^2.2.1:
version "2.3.0"
resolved "https://registry.yarnpkg.com/mustache/-/mustache-2.3.0.tgz#4028f7778b17708a489930a6e52ac3bca0da41d0"

node-version@^1.0.0:
nanoid@^0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-0.2.2.tgz#e2ebc6ad3db5e0454fd8124d30ca39b06555fe56"

nanoid@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-1.0.2.tgz#15d2b5e76b6dbfb15cac1000cb457d4bfc845bdb"

node-version@1.1.0, node-version@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/node-version/-/node-version-1.1.0.tgz#f437d7ba407e65e2c4eaef8887b1718ba523d4f0"

Expand Down Expand Up @@ -1232,6 +1274,10 @@ pinkie@^2.0.0, pinkie@^2.0.1, pinkie@^2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"

pngjs@^3.3.1:
version "3.3.2"
resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-3.3.2.tgz#097c3c2a75feb223eadddea6bc9f0050cf830bc3"

private@^0.1.6, private@^0.1.7:
version "0.1.8"
resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
Expand Down Expand Up @@ -1346,10 +1392,6 @@ semver@^5.3.0:
version "5.4.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e"

shortid@^2.2.4, shortid@^2.2.6:
version "2.2.8"
resolved "https://registry.yarnpkg.com/shortid/-/shortid-2.2.8.tgz#033b117d6a2e975804f6f0969dbe7d3d0b355131"

slash@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
Expand Down Expand Up @@ -1387,10 +1429,6 @@ sprintf-js@~1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"

stack-chain@^1.3.6:
version "1.3.7"
resolved "https://registry.yarnpkg.com/stack-chain/-/stack-chain-1.3.7.tgz#d192c9ff4ea6a22c94c4dd459171e3f00cea1285"

stackframe@^0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-0.3.1.tgz#33aa84f1177a5548c8935533cbfeb3420975f5a4"
Expand All @@ -1403,12 +1441,25 @@ string-width@^1.0.1:
is-fullwidth-code-point "^1.0.0"
strip-ansi "^3.0.0"

string-width@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
dependencies:
is-fullwidth-code-point "^2.0.0"
strip-ansi "^4.0.0"

strip-ansi@^3.0.0, strip-ansi@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
dependencies:
ansi-regex "^2.0.0"

strip-ansi@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f"
dependencies:
ansi-regex "^3.0.0"

strip-bom@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e"
Expand All @@ -1435,9 +1486,9 @@ testcafe-aurelia-selectors@^0.1.3:
version "0.1.3"
resolved "https://registry.yarnpkg.com/testcafe-aurelia-selectors/-/testcafe-aurelia-selectors-0.1.3.tgz#fd889ca3fd1340b1f78da65f2baf5675d6c69c89"

testcafe-browser-tools@1.4.6:
version "1.4.6"
resolved "https://registry.yarnpkg.com/testcafe-browser-tools/-/testcafe-browser-tools-1.4.6.tgz#58c8ede77beeeecfb844b8cdcc22e61b23e34982"
testcafe-browser-tools@1.5.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/testcafe-browser-tools/-/testcafe-browser-tools-1.5.1.tgz#8439a85300bbd73fdd540244aa1ce35a0d3e9632"
dependencies:
array-find "^1.0.0"
babel-runtime "^5.6.15"
Expand All @@ -1451,12 +1502,13 @@ testcafe-browser-tools@1.4.6:
read-file-relative "^1.2.0"
which-promise "^1.0.0"

testcafe-hammerhead@12.1.0:
version "12.1.0"
resolved "https://registry.yarnpkg.com/testcafe-hammerhead/-/testcafe-hammerhead-12.1.0.tgz#229e03ad9264b41099cbcd4a73640cd3d95bf7f0"
testcafe-hammerhead@13.1.1:
version "13.1.1"
resolved "https://registry.yarnpkg.com/testcafe-hammerhead/-/testcafe-hammerhead-13.1.1.tgz#a29b07d0e5178c7c547c32c1f6b964c407a52d50"
dependencies:
bowser "1.6.0"
brotli "^1.3.1"
cast-array "1.0.0"
crypto-md5 "^1.0.0"
css "2.2.1"
dedent "0.4.0"
Expand All @@ -1465,20 +1517,21 @@ testcafe-hammerhead@12.1.0:
lru-cache "2.6.3"
mime "~1.4.1"
mustache "^2.1.1"
nanoid "^0.2.2"
node-version "1.1.0"
os-family "^1.0.0"
parse5 "^1.5.0"
pify "^2.3.0"
pinkie "1.0.0"
read-file-relative "^1.2.0"
shortid "^2.2.4"
tough-cookie "2.3.3"
tunnel-agent "0.6.0"
webauth "^1.1.0"
yakaa "1.0.1"

testcafe-legacy-api@3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/testcafe-legacy-api/-/testcafe-legacy-api-3.1.2.tgz#af858ae31030d8c94056a6fd580e64be00a51e81"
testcafe-legacy-api@3.1.4:
version "3.1.4"
resolved "https://registry.yarnpkg.com/testcafe-legacy-api/-/testcafe-legacy-api-3.1.4.tgz#6b2635c94c336ae500946edd64adcb934cc27d3e"
dependencies:
async "0.2.6"
babel-runtime "^5.8.34"
Expand All @@ -1493,6 +1546,17 @@ testcafe-legacy-api@3.1.2:
pinkie "^2.0.1"
strip-bom "^2.0.0"

testcafe-live@^0.1.3:
version "0.1.3"
resolved "https://registry.yarnpkg.com/testcafe-live/-/testcafe-live-0.1.3.tgz#5617485c3cbb0aa0206a313778b023937628ff99"
dependencies:
ansi-escapes "^3.0.0"
async-exit-hook "^2.0.1"
graphlib "^2.1.5"
keypress "^0.2.1"
log-update-async-hook "^2.0.2"
wrap-ansi "^3.0.1"

testcafe-reporter-json@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/testcafe-reporter-json/-/testcafe-reporter-json-2.1.0.tgz#80b9b5a6dff2ee1de1f91e2670706c1472e64006"
Expand All @@ -1513,9 +1577,9 @@ testcafe-reporter-xunit@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/testcafe-reporter-xunit/-/testcafe-reporter-xunit-2.1.0.tgz#e6d66c572ce15af266706af0fd610b2a841dd443"

testcafe@^0.18.5:
version "0.18.5"
resolved "https://registry.yarnpkg.com/testcafe/-/testcafe-0.18.5.tgz#45154677c323601b9a907cd60dbac03e38661122"
testcafe@^0.19.0:
version "0.19.0"
resolved "https://registry.yarnpkg.com/testcafe/-/testcafe-0.19.0.tgz#ea31f49e49b24938e84509f8214cb3ae9cdda7f1"
dependencies:
async-exit-hook "^1.1.2"
babel-core "^6.22.1"
Expand All @@ -1537,6 +1601,7 @@ testcafe@^0.18.5:
dedent "^0.4.0"
elegant-spinner "^1.0.1"
endpoint-utils "^1.0.2"
error-stack-parser "^1.3.6"
globby "^3.0.1"
indent-string "^1.2.2"
is-ci "^1.0.10"
Expand All @@ -1548,25 +1613,25 @@ testcafe@^0.18.5:
moment "^2.10.3"
moment-duration-format "^1.3.0"
mustache "^2.1.2"
nanoid "^1.0.1"
node-version "^1.0.0"
os-family "^1.0.0"
parse5 "^1.5.0"
pify "^2.3.0"
pinkie "^2.0.4"
pngjs "^3.3.1"
promisify-event "^1.0.0"
ps-node "^0.1.6"
qrcode-terminal "^0.10.0"
read-file-relative "^1.2.0"
replicator "^1.0.0"
resolve-cwd "^1.0.0"
sanitize-filename "^1.6.0"
shortid "^2.2.6"
source-map-support "^0.4.0"
stack-chain "^1.3.6"
strip-bom "^2.0.0"
testcafe-browser-tools "1.4.6"
testcafe-hammerhead "12.1.0"
testcafe-legacy-api "3.1.2"
testcafe-browser-tools "1.5.1"
testcafe-hammerhead "13.1.1"
testcafe-legacy-api "3.1.4"
testcafe-reporter-json "^2.1.0"
testcafe-reporter-list "^2.1.0"
testcafe-reporter-minimal "^2.1.0"
Expand Down Expand Up @@ -1707,6 +1772,13 @@ wrap-ansi@^2.1.0:
string-width "^1.0.1"
strip-ansi "^3.0.1"

wrap-ansi@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-3.0.1.tgz#288a04d87eda5c286e060dfe8f135ce8d007f8ba"
dependencies:
string-width "^2.1.1"
strip-ansi "^4.0.0"

wrappy@1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
Expand Down

0 comments on commit 0c62830

Please sign in to comment.