Skip to content

Commit 0c62830

Browse files
committed
Merge branch 'release/2.0.0'
2 parents 83a2a3a + f5bec62 commit 0c62830

File tree

3 files changed

+124
-36
lines changed

3 files changed

+124
-36
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
[![Build Status](https://travis-ci.org/w3tecch/test-cafe-e2e.svg?branch=master)](https://travis-ci.org/w3tecch/test-cafe-e2e)
33
[![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)
4-
[![David Dependancy Status](https://david-dm.org/w3tecch/test-cafe-e2e.svg)](https://david-dm.org/w3tecch/test-cafe-e2e)
4+
[![devDependencies Status](https://david-dm.org/w3tecch/test-cafe-e2e/dev-status.svg)](https://david-dm.org/w3tecch/test-cafe-e2e?type=dev)
55

66
# Installation
77

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

49+
or run all test in live (watch) mode
50+
```bash
51+
npm run live
52+
```
53+
4954
## Write tests
5055

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

60+
## I have lots of tests but would like to restart only one (only live command)
61+
When you work on a particular test, just add the `.only` call for it:
62+
63+
```
64+
test.only('Current test', async t => {});
65+
```
66+
67+
Once you are done with it and ready to run the whole suite, just remove the `.only` directive and save the file.
68+
5569
## Documentation
5670

5771
[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)

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
{
22
"name": "test-cafe-e2e",
3-
"version": "1.0.0",
3+
"version": "2.0.0",
44
"description": "E2E testing for almost any frontend app",
55
"scripts": {
66
"pretest": "npm run tslint",
77
"test": "testcafe chrome tests/**/*.spec.ts",
88
"test:single": "testcafe chrome",
99
"preci": "npm run tslint",
1010
"ci": "testcafe chrome:headless tests/**/*.spec.ts",
11-
"tslint": "tslint -c tslint.json 'tests/**/*.ts'"
11+
"tslint": "tslint -c tslint.json 'tests/**/*.ts'",
12+
"live": "testcafe-live chrome tests/**/*.spec.ts"
1213
},
1314
"bugs": {
1415
"url": "https://github.com/w3tecch/test-cafe-e2e/issues"
@@ -31,9 +32,10 @@
3132
],
3233
"devDependencies": {
3334
"@types/dotenv": "^4.0.2",
34-
"dotenv": "^4.0.0",
35-
"testcafe": "^0.18.5",
35+
"dotenv": "^5.0.1",
36+
"testcafe": "^0.19.0",
3637
"testcafe-aurelia-selectors": "^0.1.3",
38+
"testcafe-live": "^0.1.3",
3739
"tslint": "^5.9.1"
3840
}
3941
}

yarn.lock

Lines changed: 103 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,18 @@ ansi-escapes@^2.0.0:
3232
version "2.0.0"
3333
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-2.0.0.tgz#5bae52be424878dd9783e8910e3fc2922e83c81b"
3434

35+
ansi-escapes@^3.0.0:
36+
version "3.0.0"
37+
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.0.0.tgz#ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92"
38+
3539
ansi-regex@^2.0.0:
3640
version "2.1.1"
3741
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
3842

43+
ansi-regex@^3.0.0:
44+
version "3.0.0"
45+
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
46+
3947
ansi-styles@^2.2.1:
4048
version "2.2.1"
4149
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
@@ -78,6 +86,10 @@ async-exit-hook@^1.1.2:
7886
version "1.1.2"
7987
resolved "https://registry.yarnpkg.com/async-exit-hook/-/async-exit-hook-1.1.2.tgz#8095d75e488c29acee0551fe87252169d789cfba"
8088

89+
async-exit-hook@^2.0.1:
90+
version "2.0.1"
91+
resolved "https://registry.yarnpkg.com/async-exit-hook/-/async-exit-hook-2.0.1.tgz#8bd8b024b0ec9b1c01cccb9af9db29bd717dfaf3"
92+
8193
async-limiter@~1.0.0:
8294
version "1.0.0"
8395
resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8"
@@ -729,6 +741,10 @@ caniuse-lite@^1.0.30000780:
729741
version "1.0.30000784"
730742
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000784.tgz#129ced74e9a1280a441880b6cd2bce30ef59e6c0"
731743

744+
745+
version "1.0.0"
746+
resolved "https://registry.yarnpkg.com/cast-array/-/cast-array-1.0.0.tgz#11a744e403bed53b926f98138d1b303dca9987d0"
747+
732748
chai@^3.0.0:
733749
version "3.5.0"
734750
resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247"
@@ -859,9 +875,9 @@ diff@^3.2.0:
859875
version "3.4.0"
860876
resolved "https://registry.yarnpkg.com/diff/-/diff-3.4.0.tgz#b1d85507daf3964828de54b37d0d73ba67dda56c"
861877

862-
dotenv@^4.0.0:
863-
version "4.0.0"
864-
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-4.0.0.tgz#864ef1379aced55ce6f95debecdce179f7a0cd1d"
878+
dotenv@^5.0.1:
879+
version "5.0.1"
880+
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-5.0.1.tgz#a5317459bd3d79ab88cff6e44057a6a3fbb1fcef"
865881

866882
electron-releases@^2.1.0:
867883
version "2.1.0"
@@ -884,7 +900,7 @@ endpoint-utils@^1.0.2:
884900
ip "^1.1.3"
885901
pinkie-promise "^1.0.0"
886902

887-
error-stack-parser@^1.3.3:
903+
error-stack-parser@^1.3.3, error-stack-parser@^1.3.6:
888904
version "1.3.6"
889905
resolved "https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-1.3.6.tgz#e0e73b93e417138d1cd7c0b746b1a4a14854c292"
890906
dependencies:
@@ -950,6 +966,12 @@ graceful-fs@^4.1.11:
950966
version "4.1.11"
951967
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
952968

969+
graphlib@^2.1.5:
970+
version "2.1.5"
971+
resolved "https://registry.yarnpkg.com/graphlib/-/graphlib-2.1.5.tgz#6afe1afcc5148555ec799e499056795bd6938c87"
972+
dependencies:
973+
lodash "^4.11.1"
974+
953975
has-ansi@^2.0.0:
954976
version "2.0.0"
955977
resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
@@ -1034,6 +1056,10 @@ is-fullwidth-code-point@^1.0.0:
10341056
dependencies:
10351057
number-is-nan "^1.0.0"
10361058

1059+
is-fullwidth-code-point@^2.0.0:
1060+
version "2.0.0"
1061+
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
1062+
10371063
is-glob@^2.0.1:
10381064
version "2.0.1"
10391065
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863"
@@ -1071,6 +1097,10 @@ json5@^0.5.1:
10711097
version "0.5.1"
10721098
resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821"
10731099

1100+
keypress@^0.2.1:
1101+
version "0.2.1"
1102+
resolved "https://registry.yarnpkg.com/keypress/-/keypress-0.2.1.tgz#1e80454250018dbad4c3fe94497d6e67b6269c77"
1103+
10741104
linux-platform-info@^0.0.3:
10751105
version "0.0.3"
10761106
resolved "https://registry.yarnpkg.com/linux-platform-info/-/linux-platform-info-0.0.3.tgz#2dae324385e66e3d755bec83f86c7beea61ceb83"
@@ -1085,6 +1115,10 @@ [email protected]:
10851115
version "4.17.4"
10861116
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
10871117

1118+
lodash@^4.11.1:
1119+
version "4.17.5"
1120+
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511"
1121+
10881122
log-update-async-hook@^2.0.2:
10891123
version "2.0.2"
10901124
resolved "https://registry.yarnpkg.com/log-update-async-hook/-/log-update-async-hook-2.0.2.tgz#6eba89dbe67fa12d0b20ac47df7942947af1fcd1"
@@ -1156,7 +1190,15 @@ mustache@^2.1.1, mustache@^2.1.2, mustache@^2.2.1:
11561190
version "2.3.0"
11571191
resolved "https://registry.yarnpkg.com/mustache/-/mustache-2.3.0.tgz#4028f7778b17708a489930a6e52ac3bca0da41d0"
11581192

1159-
node-version@^1.0.0:
1193+
nanoid@^0.2.2:
1194+
version "0.2.2"
1195+
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-0.2.2.tgz#e2ebc6ad3db5e0454fd8124d30ca39b06555fe56"
1196+
1197+
nanoid@^1.0.1:
1198+
version "1.0.2"
1199+
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-1.0.2.tgz#15d2b5e76b6dbfb15cac1000cb457d4bfc845bdb"
1200+
1201+
[email protected], node-version@^1.0.0:
11601202
version "1.1.0"
11611203
resolved "https://registry.yarnpkg.com/node-version/-/node-version-1.1.0.tgz#f437d7ba407e65e2c4eaef8887b1718ba523d4f0"
11621204

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

1277+
pngjs@^3.3.1:
1278+
version "3.3.2"
1279+
resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-3.3.2.tgz#097c3c2a75feb223eadddea6bc9f0050cf830bc3"
1280+
12351281
private@^0.1.6, private@^0.1.7:
12361282
version "0.1.8"
12371283
resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
@@ -1346,10 +1392,6 @@ semver@^5.3.0:
13461392
version "5.4.1"
13471393
resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e"
13481394

1349-
shortid@^2.2.4, shortid@^2.2.6:
1350-
version "2.2.8"
1351-
resolved "https://registry.yarnpkg.com/shortid/-/shortid-2.2.8.tgz#033b117d6a2e975804f6f0969dbe7d3d0b355131"
1352-
13531395
slash@^1.0.0:
13541396
version "1.0.0"
13551397
resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
@@ -1387,10 +1429,6 @@ sprintf-js@~1.0.2:
13871429
version "1.0.3"
13881430
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
13891431

1390-
stack-chain@^1.3.6:
1391-
version "1.3.7"
1392-
resolved "https://registry.yarnpkg.com/stack-chain/-/stack-chain-1.3.7.tgz#d192c9ff4ea6a22c94c4dd459171e3f00cea1285"
1393-
13941432
stackframe@^0.3.1:
13951433
version "0.3.1"
13961434
resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-0.3.1.tgz#33aa84f1177a5548c8935533cbfeb3420975f5a4"
@@ -1403,12 +1441,25 @@ string-width@^1.0.1:
14031441
is-fullwidth-code-point "^1.0.0"
14041442
strip-ansi "^3.0.0"
14051443

1444+
string-width@^2.1.1:
1445+
version "2.1.1"
1446+
resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
1447+
dependencies:
1448+
is-fullwidth-code-point "^2.0.0"
1449+
strip-ansi "^4.0.0"
1450+
14061451
strip-ansi@^3.0.0, strip-ansi@^3.0.1:
14071452
version "3.0.1"
14081453
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
14091454
dependencies:
14101455
ansi-regex "^2.0.0"
14111456

1457+
strip-ansi@^4.0.0:
1458+
version "4.0.0"
1459+
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f"
1460+
dependencies:
1461+
ansi-regex "^3.0.0"
1462+
14121463
strip-bom@^2.0.0:
14131464
version "2.0.0"
14141465
resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e"
@@ -1435,9 +1486,9 @@ testcafe-aurelia-selectors@^0.1.3:
14351486
version "0.1.3"
14361487
resolved "https://registry.yarnpkg.com/testcafe-aurelia-selectors/-/testcafe-aurelia-selectors-0.1.3.tgz#fd889ca3fd1340b1f78da65f2baf5675d6c69c89"
14371488

1438-
testcafe-browser-tools@1.4.6:
1439-
version "1.4.6"
1440-
resolved "https://registry.yarnpkg.com/testcafe-browser-tools/-/testcafe-browser-tools-1.4.6.tgz#58c8ede77beeeecfb844b8cdcc22e61b23e34982"
1489+
testcafe-browser-tools@1.5.1:
1490+
version "1.5.1"
1491+
resolved "https://registry.yarnpkg.com/testcafe-browser-tools/-/testcafe-browser-tools-1.5.1.tgz#8439a85300bbd73fdd540244aa1ce35a0d3e9632"
14411492
dependencies:
14421493
array-find "^1.0.0"
14431494
babel-runtime "^5.6.15"
@@ -1451,12 +1502,13 @@ [email protected]:
14511502
read-file-relative "^1.2.0"
14521503
which-promise "^1.0.0"
14531504

1454-
testcafe-hammerhead@12.1.0:
1455-
version "12.1.0"
1456-
resolved "https://registry.yarnpkg.com/testcafe-hammerhead/-/testcafe-hammerhead-12.1.0.tgz#229e03ad9264b41099cbcd4a73640cd3d95bf7f0"
1505+
testcafe-hammerhead@13.1.1:
1506+
version "13.1.1"
1507+
resolved "https://registry.yarnpkg.com/testcafe-hammerhead/-/testcafe-hammerhead-13.1.1.tgz#a29b07d0e5178c7c547c32c1f6b964c407a52d50"
14571508
dependencies:
14581509
bowser "1.6.0"
14591510
brotli "^1.3.1"
1511+
cast-array "1.0.0"
14601512
crypto-md5 "^1.0.0"
14611513
css "2.2.1"
14621514
dedent "0.4.0"
@@ -1465,20 +1517,21 @@ [email protected]:
14651517
lru-cache "2.6.3"
14661518
mime "~1.4.1"
14671519
mustache "^2.1.1"
1520+
nanoid "^0.2.2"
1521+
node-version "1.1.0"
14681522
os-family "^1.0.0"
14691523
parse5 "^1.5.0"
14701524
pify "^2.3.0"
14711525
pinkie "1.0.0"
14721526
read-file-relative "^1.2.0"
1473-
shortid "^2.2.4"
14741527
tough-cookie "2.3.3"
14751528
tunnel-agent "0.6.0"
14761529
webauth "^1.1.0"
14771530
yakaa "1.0.1"
14781531

1479-
1480-
version "3.1.2"
1481-
resolved "https://registry.yarnpkg.com/testcafe-legacy-api/-/testcafe-legacy-api-3.1.2.tgz#af858ae31030d8c94056a6fd580e64be00a51e81"
1532+
1533+
version "3.1.4"
1534+
resolved "https://registry.yarnpkg.com/testcafe-legacy-api/-/testcafe-legacy-api-3.1.4.tgz#6b2635c94c336ae500946edd64adcb934cc27d3e"
14821535
dependencies:
14831536
async "0.2.6"
14841537
babel-runtime "^5.8.34"
@@ -1493,6 +1546,17 @@ [email protected]:
14931546
pinkie "^2.0.1"
14941547
strip-bom "^2.0.0"
14951548

1549+
testcafe-live@^0.1.3:
1550+
version "0.1.3"
1551+
resolved "https://registry.yarnpkg.com/testcafe-live/-/testcafe-live-0.1.3.tgz#5617485c3cbb0aa0206a313778b023937628ff99"
1552+
dependencies:
1553+
ansi-escapes "^3.0.0"
1554+
async-exit-hook "^2.0.1"
1555+
graphlib "^2.1.5"
1556+
keypress "^0.2.1"
1557+
log-update-async-hook "^2.0.2"
1558+
wrap-ansi "^3.0.1"
1559+
14961560
testcafe-reporter-json@^2.1.0:
14971561
version "2.1.0"
14981562
resolved "https://registry.yarnpkg.com/testcafe-reporter-json/-/testcafe-reporter-json-2.1.0.tgz#80b9b5a6dff2ee1de1f91e2670706c1472e64006"
@@ -1513,9 +1577,9 @@ testcafe-reporter-xunit@^2.1.0:
15131577
version "2.1.0"
15141578
resolved "https://registry.yarnpkg.com/testcafe-reporter-xunit/-/testcafe-reporter-xunit-2.1.0.tgz#e6d66c572ce15af266706af0fd610b2a841dd443"
15151579

1516-
testcafe@^0.18.5:
1517-
version "0.18.5"
1518-
resolved "https://registry.yarnpkg.com/testcafe/-/testcafe-0.18.5.tgz#45154677c323601b9a907cd60dbac03e38661122"
1580+
testcafe@^0.19.0:
1581+
version "0.19.0"
1582+
resolved "https://registry.yarnpkg.com/testcafe/-/testcafe-0.19.0.tgz#ea31f49e49b24938e84509f8214cb3ae9cdda7f1"
15191583
dependencies:
15201584
async-exit-hook "^1.1.2"
15211585
babel-core "^6.22.1"
@@ -1537,6 +1601,7 @@ testcafe@^0.18.5:
15371601
dedent "^0.4.0"
15381602
elegant-spinner "^1.0.1"
15391603
endpoint-utils "^1.0.2"
1604+
error-stack-parser "^1.3.6"
15401605
globby "^3.0.1"
15411606
indent-string "^1.2.2"
15421607
is-ci "^1.0.10"
@@ -1548,25 +1613,25 @@ testcafe@^0.18.5:
15481613
moment "^2.10.3"
15491614
moment-duration-format "^1.3.0"
15501615
mustache "^2.1.2"
1616+
nanoid "^1.0.1"
15511617
node-version "^1.0.0"
15521618
os-family "^1.0.0"
15531619
parse5 "^1.5.0"
15541620
pify "^2.3.0"
15551621
pinkie "^2.0.4"
1622+
pngjs "^3.3.1"
15561623
promisify-event "^1.0.0"
15571624
ps-node "^0.1.6"
15581625
qrcode-terminal "^0.10.0"
15591626
read-file-relative "^1.2.0"
15601627
replicator "^1.0.0"
15611628
resolve-cwd "^1.0.0"
15621629
sanitize-filename "^1.6.0"
1563-
shortid "^2.2.6"
15641630
source-map-support "^0.4.0"
1565-
stack-chain "^1.3.6"
15661631
strip-bom "^2.0.0"
1567-
testcafe-browser-tools "1.4.6"
1568-
testcafe-hammerhead "12.1.0"
1569-
testcafe-legacy-api "3.1.2"
1632+
testcafe-browser-tools "1.5.1"
1633+
testcafe-hammerhead "13.1.1"
1634+
testcafe-legacy-api "3.1.4"
15701635
testcafe-reporter-json "^2.1.0"
15711636
testcafe-reporter-list "^2.1.0"
15721637
testcafe-reporter-minimal "^2.1.0"
@@ -1707,6 +1772,13 @@ wrap-ansi@^2.1.0:
17071772
string-width "^1.0.1"
17081773
strip-ansi "^3.0.1"
17091774

1775+
wrap-ansi@^3.0.1:
1776+
version "3.0.1"
1777+
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-3.0.1.tgz#288a04d87eda5c286e060dfe8f135ce8d007f8ba"
1778+
dependencies:
1779+
string-width "^2.1.1"
1780+
strip-ansi "^4.0.0"
1781+
17101782
wrappy@1:
17111783
version "1.0.2"
17121784
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"

0 commit comments

Comments
 (0)