Skip to content

Commit 83a2a3a

Browse files
committed
Merge branch 'release/1.0.0'
2 parents 80e0cb9 + 16667ee commit 83a2a3a

File tree

8 files changed

+193
-14
lines changed

8 files changed

+193
-14
lines changed

.travis.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
dist: trusty
2+
sudo: required
3+
4+
addons:
5+
chrome: stable
6+
7+
language: node_js
8+
node_js:
9+
- "8.9.4"
10+
11+
install:
12+
- yarn install
13+
14+
script:
15+
- cp .env.example .env
16+
- npm run ci
17+
18+
notifications:
19+
email: false

README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11

2+
[![Build Status](https://travis-ci.org/w3tecch/test-cafe-e2e.svg?branch=master)](https://travis-ci.org/w3tecch/test-cafe-e2e)
3+
[![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)
5+
26
# Installation
37

48
You need to set up your development environment before you can do anything.
@@ -50,14 +54,23 @@ The `helper.ts` can also be extended.
5054

5155
## Documentation
5256

53-
[Here you can find help about seleting elements (e.g. get text)](https://devexpress.github.io/testcafe/documentation/test-api/selecting-page-elements/selectors.html)
57+
[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)
5458

55-
[Here you can find help about actions elements (e.g. clicks)](https://devexpress.github.io/testcafe/documentation/test-api/actions/)
59+
[Here you can find help about actions for elements (e.g. clicks)](https://devexpress.github.io/testcafe/documentation/test-api/actions/)
5660

5761
[Here you can find help about Aurelia specific stuff](https://devexpress.github.io/testcafe/documentation/test-api/selecting-page-elements/framework-specific-selectors.html#aurelia)
5862

5963
## CI
6064

6165
To run the all test headless use `npm run ci`.
6266

63-
Additional information about CI integrations can be found [here](https://devexpress.github.io/testcafe/documentation/recipes/integrating-testcafe-with-ci-systems/).
67+
Additional information about CI integrations can be found [here](https://devexpress.github.io/testcafe/documentation/recipes/integrating-testcafe-with-ci-systems/).
68+
69+
## Additional resources
70+
Here a list of additional resources and useful plugins.
71+
- [Simple manual mobile testing](https://devexpress.github.io/testcafe/documentation/recipes/testing-on-remote-computers-and-mobile-devices.html)
72+
- [Debugging with Visual Studio Code](https://devexpress.github.io/testcafe/documentation/recipes/debugging-with-visual-studio-code.html)
73+
- [Browser support](https://devexpress.github.io/testcafe/documentation/using-testcafe/common-concepts/browsers/browser-support.html)
74+
- [Reporters](https://devexpress.github.io/testcafe/documentation/using-testcafe/common-concepts/reporters.html)
75+
- [BrowserStack](https://github.com/DevExpress/testcafe-browser-provider-browserstack)
76+
- [Electron](https://github.com/DevExpress/testcafe-browser-provider-electron)

appveyor.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
environment:
2+
nodejs_version: "8"
3+
4+
install:
5+
- ps: Install-Product node $env:nodejs_version
6+
- yarn install
7+
8+
test_script:
9+
- copy /y .env.example .env
10+
- npm run ci
11+
12+
build: off

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33
"version": "1.0.0",
44
"description": "E2E testing for almost any frontend app",
55
"scripts": {
6+
"pretest": "npm run tslint",
67
"test": "testcafe chrome tests/**/*.spec.ts",
78
"test:single": "testcafe chrome",
8-
"ci": "testcafe chrome:headless tests/**/*.spec.ts"
9+
"preci": "npm run tslint",
10+
"ci": "testcafe chrome:headless tests/**/*.spec.ts",
11+
"tslint": "tslint -c tslint.json 'tests/**/*.ts'"
912
},
1013
"bugs": {
1114
"url": "https://github.com/w3tecch/test-cafe-e2e/issues"
@@ -30,6 +33,7 @@
3033
"@types/dotenv": "^4.0.2",
3134
"dotenv": "^4.0.0",
3235
"testcafe": "^0.18.5",
33-
"testcafe-aurelia-selectors": "^0.1.3"
36+
"testcafe-aurelia-selectors": "^0.1.3",
37+
"tslint": "^5.9.1"
3438
}
3539
}

tests/google.spec.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,14 @@ fixture`Google`
1111
// await handleAuthentication(t);
1212
// });
1313

14-
test('Should display google start page', async t => {
14+
test('Should display google start page', async (t) => {
1515

1616
const title = await getBrowserTitle();
1717
await t
1818
.expect(title).eql('Google');
1919
});
2020

21-
22-
23-
test('Should show results for e2e testing', async t => {
21+
test('Should show results for e2e testing', async (t) => {
2422

2523
const searchTerm = 'e2e testing';
2624
const searchInput = Selector('#lst-ib');
@@ -36,4 +34,4 @@ test('Should show results for e2e testing', async t => {
3634
const title = await getBrowserTitle();
3735
await t
3836
.expect(title).contains(searchTerm);
39-
});
37+
});

tests/helper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const getBrowserTitle = ClientFunction(() => document.title);
88
/**
99
* Authentication handling example
1010
*/
11-
const regularUser = Role(`${process.env.HOST}/#/login`, async t => {
11+
const regularUser = Role(`${process.env.HOST}/#/login`, async (t) => {
1212
await t
1313
.click('.login__button button')
1414
.typeText('.ui-inputfield', process.env.EMAIL)
@@ -19,4 +19,4 @@ const regularUser = Role(`${process.env.HOST}/#/login`, async t => {
1919

2020
export const handleAuthentication = async (t: TestController) => {
2121
await t.useRole(regularUser);
22-
}
22+
};

tslint.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"defaultSeverity": "error",
3+
"extends": [
4+
"tslint:recommended"
5+
],
6+
"jsRules": {},
7+
"rules": {
8+
"quotemark": [
9+
true,
10+
"single"
11+
]
12+
},
13+
"rulesDirectory": []
14+
}

yarn.lock

Lines changed: 121 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,18 @@ ansi-styles@^2.2.1:
4040
version "2.2.1"
4141
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
4242

43+
ansi-styles@^3.2.0:
44+
version "3.2.1"
45+
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
46+
dependencies:
47+
color-convert "^1.9.0"
48+
49+
argparse@^1.0.7:
50+
version "1.0.10"
51+
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
52+
dependencies:
53+
sprintf-js "~1.0.2"
54+
4355
array-find@^1.0.0:
4456
version "1.0.0"
4557
resolved "https://registry.yarnpkg.com/array-find/-/array-find-1.0.0.tgz#6c8e286d11ed768327f8e62ecee87353ca3e78b8"
@@ -78,7 +90,7 @@ atob@~1.1.0:
7890
version "1.1.3"
7991
resolved "https://registry.yarnpkg.com/atob/-/atob-1.1.3.tgz#95f13629b12c3a51a5d215abdce2aa9f32f80773"
8092

81-
babel-code-frame@^6.26.0:
93+
babel-code-frame@^6.22.0, babel-code-frame@^6.26.0:
8294
version "6.26.0"
8395
resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b"
8496
dependencies:
@@ -691,6 +703,10 @@ browserslist@^2.1.2:
691703
caniuse-lite "^1.0.30000780"
692704
electron-to-chromium "^1.3.28"
693705

706+
builtin-modules@^1.1.1:
707+
version "1.1.1"
708+
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
709+
694710
callsite-record@^4.0.0:
695711
version "4.1.1"
696712
resolved "https://registry.yarnpkg.com/callsite-record/-/callsite-record-4.1.1.tgz#f0b8dcc55932e64e82ebe3bffa85ebfb92d47022"
@@ -731,6 +747,14 @@ chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3:
731747
strip-ansi "^3.0.0"
732748
supports-color "^2.0.0"
733749

750+
chalk@^2.3.0:
751+
version "2.3.1"
752+
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.1.tgz#523fe2678aec7b04e8041909292fe8b17059b796"
753+
dependencies:
754+
ansi-styles "^3.2.0"
755+
escape-string-regexp "^1.0.5"
756+
supports-color "^5.2.0"
757+
734758
chrome-emulated-devices-list@^0.1.0:
735759
version "0.1.0"
736760
resolved "https://registry.yarnpkg.com/chrome-emulated-devices-list/-/chrome-emulated-devices-list-0.1.0.tgz#192333be0ef5530cdacc95b54d1c7b5f158e9703"
@@ -750,10 +774,24 @@ code-point-at@^1.0.0:
750774
version "1.1.0"
751775
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
752776

777+
color-convert@^1.9.0:
778+
version "1.9.1"
779+
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed"
780+
dependencies:
781+
color-name "^1.1.1"
782+
783+
color-name@^1.1.1:
784+
version "1.1.3"
785+
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
786+
753787
754788
version "2.11.0"
755789
resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563"
756790

791+
commander@^2.12.1:
792+
version "2.14.1"
793+
resolved "https://registry.yarnpkg.com/commander/-/commander-2.14.1.tgz#2235123e37af8ca3c65df45b026dbd357b01b9aa"
794+
757795
commander@^2.8.1:
758796
version "2.12.2"
759797
resolved "https://registry.yarnpkg.com/commander/-/commander-2.12.2.tgz#0f5946c427ed9ec0d91a46bb9def53e54650e555"
@@ -817,6 +855,10 @@ detect-indent@^4.0.0:
817855
dependencies:
818856
repeating "^2.0.0"
819857

858+
diff@^3.2.0:
859+
version "3.4.0"
860+
resolved "https://registry.yarnpkg.com/diff/-/diff-3.4.0.tgz#b1d85507daf3964828de54b37d0d73ba67dda56c"
861+
820862
dotenv@^4.0.0:
821863
version "4.0.0"
822864
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-4.0.0.tgz#864ef1379aced55ce6f95debecdce179f7a0cd1d"
@@ -848,14 +890,22 @@ error-stack-parser@^1.3.3:
848890
dependencies:
849891
stackframe "^0.3.1"
850892

851-
escape-string-regexp@^1.0.2:
893+
escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
852894
version "1.0.5"
853895
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
854896

897+
esprima@^4.0.0:
898+
version "4.0.0"
899+
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804"
900+
855901
esutils@^2.0.2:
856902
version "2.0.2"
857903
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
858904

905+
fs.realpath@^1.0.0:
906+
version "1.0.0"
907+
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
908+
859909
get-stdin@^4.0.1:
860910
version "4.0.1"
861911
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe"
@@ -870,6 +920,17 @@ glob@^5.0.3:
870920
once "^1.3.0"
871921
path-is-absolute "^1.0.0"
872922

923+
glob@^7.1.1:
924+
version "7.1.2"
925+
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
926+
dependencies:
927+
fs.realpath "^1.0.0"
928+
inflight "^1.0.4"
929+
inherits "2"
930+
minimatch "^3.0.4"
931+
once "^1.3.0"
932+
path-is-absolute "^1.0.0"
933+
873934
globals@^9.18.0:
874935
version "9.18.0"
875936
resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a"
@@ -895,6 +956,10 @@ has-ansi@^2.0.0:
895956
dependencies:
896957
ansi-regex "^2.0.0"
897958

959+
has-flag@^3.0.0:
960+
version "3.0.0"
961+
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
962+
898963
highlight-es@^1.0.0:
899964
version "1.0.1"
900965
resolved "https://registry.yarnpkg.com/highlight-es/-/highlight-es-1.0.1.tgz#3bb01eb1f2062ddaab72f8b23766a3bf8c1a771f"
@@ -987,6 +1052,13 @@ js-tokens@^3.0.0, js-tokens@^3.0.2:
9871052
version "3.0.2"
9881053
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
9891054

1055+
js-yaml@^3.7.0:
1056+
version "3.10.0"
1057+
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc"
1058+
dependencies:
1059+
argparse "^1.0.7"
1060+
esprima "^4.0.0"
1061+
9901062
jsesc@^1.3.0:
9911063
version "1.3.0"
9921064
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b"
@@ -1132,6 +1204,10 @@ path-is-absolute@^1.0.0, path-is-absolute@^1.0.1:
11321204
version "1.0.1"
11331205
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
11341206

1207+
path-parse@^1.0.5:
1208+
version "1.0.5"
1209+
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"
1210+
11351211
pify@^2.0.0, pify@^2.2.0, pify@^2.3.0:
11361212
version "2.3.0"
11371213
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
@@ -1250,6 +1326,12 @@ resolve-url@~0.2.1:
12501326
version "0.2.1"
12511327
resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
12521328

1329+
resolve@^1.3.2:
1330+
version "1.5.0"
1331+
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36"
1332+
dependencies:
1333+
path-parse "^1.0.5"
1334+
12531335
safe-buffer@^5.0.1, safe-buffer@~5.1.0:
12541336
version "5.1.1"
12551337
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
@@ -1301,6 +1383,10 @@ source-map@^0.5.6:
13011383
version "0.5.7"
13021384
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
13031385

1386+
sprintf-js@~1.0.2:
1387+
version "1.0.3"
1388+
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
1389+
13041390
stack-chain@^1.3.6:
13051391
version "1.3.7"
13061392
resolved "https://registry.yarnpkg.com/stack-chain/-/stack-chain-1.3.7.tgz#d192c9ff4ea6a22c94c4dd459171e3f00cea1285"
@@ -1333,6 +1419,12 @@ supports-color@^2.0.0:
13331419
version "2.0.0"
13341420
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
13351421

1422+
supports-color@^5.2.0:
1423+
version "5.3.0"
1424+
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.3.0.tgz#5b24ac15db80fa927cf5227a4a33fd3c4c7676c0"
1425+
dependencies:
1426+
has-flag "^3.0.0"
1427+
13361428
table-parser@^0.1.3:
13371429
version "0.1.3"
13381430
resolved "https://registry.yarnpkg.com/table-parser/-/table-parser-0.1.3.tgz#0441cfce16a59481684c27d1b5a67ff15a43c7b0"
@@ -1526,6 +1618,33 @@ truncate-utf8-bytes@^1.0.0:
15261618
dependencies:
15271619
utf8-byte-length "^1.0.1"
15281620

1621+
tslib@^1.8.0, tslib@^1.8.1:
1622+
version "1.9.0"
1623+
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8"
1624+
1625+
tslint@^5.9.1:
1626+
version "5.9.1"
1627+
resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.9.1.tgz#1255f87a3ff57eb0b0e1f0e610a8b4748046c9ae"
1628+
dependencies:
1629+
babel-code-frame "^6.22.0"
1630+
builtin-modules "^1.1.1"
1631+
chalk "^2.3.0"
1632+
commander "^2.12.1"
1633+
diff "^3.2.0"
1634+
glob "^7.1.1"
1635+
js-yaml "^3.7.0"
1636+
minimatch "^3.0.4"
1637+
resolve "^1.3.2"
1638+
semver "^5.3.0"
1639+
tslib "^1.8.0"
1640+
tsutils "^2.12.1"
1641+
1642+
tsutils@^2.12.1:
1643+
version "2.22.0"
1644+
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.22.0.tgz#26694814556a09bb5afd4802462931ad5294e3fa"
1645+
dependencies:
1646+
tslib "^1.8.1"
1647+
15291648
15301649
version "0.6.0"
15311650
resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"

0 commit comments

Comments
 (0)