Merge pull request #19397 from atom/wl-upgrade-webdriverio

Upgrade webdriverio
This commit is contained in:
Winston Liu
2019-05-31 17:29:04 -04:00
committed by GitHub
6 changed files with 443 additions and 691 deletions

668
script/package-lock.json generated
View File

@@ -211,6 +211,104 @@
"resolved": "https://registry.npmjs.org/@types/node/-/node-11.9.4.tgz",
"integrity": "sha512-Zl8dGvAcEmadgs1tmSPcvwzO1YRsz38bVJQvH1RvRqSR9/5n61Q1ktcDL0ht3FXWR+ZpVmXVwN1LuH4Ax23NsA=="
},
"@wdio/config": {
"version": "5.9.1",
"resolved": "https://registry.npmjs.org/@wdio/config/-/config-5.9.1.tgz",
"integrity": "sha512-u5dqcTpUk4eXILEy5ytKX+0s7vXVHAwU/GghhbWrbL3mDTvZ65Wn6IyDGtBLckY6lfa2KF5Tswk0cg9mCw0mnA==",
"requires": {
"@wdio/logger": "^5.9.0",
"deepmerge": "^2.0.1",
"glob": "^7.1.2"
},
"dependencies": {
"glob": {
"version": "7.1.4",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz",
"integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"requires": {
"brace-expansion": "^1.1.7"
}
}
}
},
"@wdio/logger": {
"version": "5.9.0",
"resolved": "https://registry.npmjs.org/@wdio/logger/-/logger-5.9.0.tgz",
"integrity": "sha512-L08MyO844LoTOnOZFxbupbTeqMAH7ZmrrNtN5AXpk3hJP7t4i5A+7eCiNWMpUpmOGHzM+04W27mYdaSei7imKg==",
"requires": {
"chalk": "^2.3.0",
"loglevel": "^1.6.0",
"loglevel-plugin-prefix": "^0.5.3",
"strip-ansi": "^4.0.0"
},
"dependencies": {
"ansi-regex": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg="
},
"ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"requires": {
"color-convert": "^1.9.0"
}
},
"chalk": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
}
},
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
},
"strip-ansi": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
"requires": {
"ansi-regex": "^3.0.0"
}
},
"supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"requires": {
"has-flag": "^3.0.0"
}
}
}
},
"@wdio/repl": {
"version": "5.9.1",
"resolved": "https://registry.npmjs.org/@wdio/repl/-/repl-5.9.1.tgz",
"integrity": "sha512-GUZ35ZLfNAIwKH/3TNrrusisMVX5Ukm9aLjbCRRKUCqGudD9yMFnkw1iJgfWFk38OnEcGS7plgdAJJooQx5Kqw==",
"requires": {
"@wdio/config": "^5.9.1"
}
},
"abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
@@ -295,41 +393,6 @@
"resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
"integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw=="
},
"archiver": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/archiver/-/archiver-0.6.1.tgz",
"integrity": "sha1-1AKZJXH9F5rtZy2Xl/iI5Wjh3Vw=",
"requires": {
"file-utils": "~0.1.5",
"lazystream": "~0.1.0",
"lodash": "~2.4.1",
"readable-stream": "~1.0.24",
"zip-stream": "~0.2.0"
},
"dependencies": {
"isarray": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"lodash": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz",
"integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4="
},
"readable-stream": {
"version": "1.0.34",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
"integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
"isarray": "0.0.1",
"string_decoder": "~0.10.x"
}
}
}
},
"are-we-there-yet": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
@@ -897,14 +960,6 @@
"resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
"integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24="
},
"boom": {
"version": "0.4.2",
"resolved": "https://registry.npmjs.org/boom/-/boom-0.4.2.tgz",
"integrity": "sha1-emNune1O/O+xnO9JR6PGffrukRs=",
"requires": {
"hoek": "0.9.x"
}
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
@@ -1060,14 +1115,6 @@
"lazy-cache": "^1.0.3"
}
},
"chainit": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/chainit/-/chainit-2.1.1.tgz",
"integrity": "sha1-5TRdnAcdRz5zJ0yIrqZskVE2KME=",
"requires": {
"queue": "~1.0.2"
}
},
"chainsaw": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz",
@@ -1470,15 +1517,6 @@
"which": "^1.2.8"
}
},
"cryptiles": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-0.2.2.tgz",
"integrity": "sha1-7ZH/HxetE9N0gohZT4pIoNJvMlw=",
"optional": true,
"requires": {
"boom": "0.4.x"
}
},
"cson-parser": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/cson-parser/-/cson-parser-1.0.9.tgz",
@@ -1494,11 +1532,6 @@
}
}
},
"css-parse": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/css-parse/-/css-parse-1.7.0.tgz",
"integrity": "sha1-Mh9s9zeCpv91ERE5D8BeLGV9jJs="
},
"css-select": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz",
@@ -1531,12 +1564,6 @@
"resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz",
"integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg=="
},
"ctype": {
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.3.tgz",
"integrity": "sha1-gsGMJGH3QRTvFsE1IkrQuRRMoS8=",
"optional": true
},
"cuint": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/cuint/-/cuint-0.2.2.tgz",
@@ -1623,9 +1650,9 @@
"integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ="
},
"deepmerge": {
"version": "0.2.10",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-0.2.10.tgz",
"integrity": "sha1-iQa/nlJaT78bIDsq/LRkAkmCEhk="
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-2.2.1.tgz",
"integrity": "sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA=="
},
"deferred-leveldown": {
"version": "4.0.2",
@@ -3343,71 +3370,6 @@
"object-assign": "^4.0.1"
}
},
"file-utils": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/file-utils/-/file-utils-0.1.5.tgz",
"integrity": "sha1-3IFTyFU4fLTaywoXJVMfpESmtIw=",
"requires": {
"findup-sync": "~0.1.2",
"glob": "~3.2.6",
"iconv-lite": "~0.2.11",
"isbinaryfile": "~0.1.9",
"lodash": "~2.1.0",
"minimatch": "~0.2.12",
"rimraf": "~2.2.2"
},
"dependencies": {
"glob": {
"version": "3.2.11",
"resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz",
"integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=",
"requires": {
"inherits": "2",
"minimatch": "0.3"
},
"dependencies": {
"minimatch": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz",
"integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=",
"requires": {
"lru-cache": "2",
"sigmund": "~1.0.0"
}
}
}
},
"iconv-lite": {
"version": "0.2.11",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz",
"integrity": "sha1-HOYKOleGSiktEyH/RgnKS7llrcg="
},
"lodash": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-2.1.0.tgz",
"integrity": "sha1-Bjfqqjaooc/IZcOt+5Qhib+wmY0="
},
"lru-cache": {
"version": "2.7.3",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz",
"integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI="
},
"minimatch": {
"version": "0.2.14",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz",
"integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=",
"requires": {
"lru-cache": "2",
"sigmund": "~1.0.0"
}
},
"rimraf": {
"version": "2.2.8",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz",
"integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI="
}
}
},
"filename-regex": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz",
@@ -3444,45 +3406,6 @@
}
}
},
"findup-sync": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.1.3.tgz",
"integrity": "sha1-fz56l7gjksZTvwZYm9hRkOk8NoM=",
"requires": {
"glob": "~3.2.9",
"lodash": "~2.4.1"
},
"dependencies": {
"glob": {
"version": "3.2.11",
"resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz",
"integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=",
"requires": {
"inherits": "2",
"minimatch": "0.3"
}
},
"lodash": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz",
"integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4="
},
"lru-cache": {
"version": "2.7.3",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz",
"integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI="
},
"minimatch": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz",
"integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=",
"requires": {
"lru-cache": "2",
"sigmund": "~1.0.0"
}
}
}
},
"flat-cache": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz",
@@ -3888,6 +3811,11 @@
"resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz",
"integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU="
},
"grapheme-splitter": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz",
"integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ=="
},
"growl": {
"version": "1.9.2",
"resolved": "https://registry.npmjs.org/growl/-/growl-1.9.2.tgz",
@@ -3992,28 +3920,11 @@
}
}
},
"hawk": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/hawk/-/hawk-1.0.0.tgz",
"integrity": "sha1-uQuxaYByhUEdp//LjdJZhQLTtS0=",
"optional": true,
"requires": {
"boom": "0.4.x",
"cryptiles": "0.2.x",
"hoek": "0.9.x",
"sntp": "0.2.x"
}
},
"he": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz",
"integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0="
},
"hoek": {
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/hoek/-/hoek-0.9.1.tgz",
"integrity": "sha1-PTIkYrrfB3Fup+uFuviAec3c5QU="
},
"home-or-tmp": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-1.0.0.tgz",
@@ -4563,11 +4474,6 @@
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"isbinaryfile": {
"version": "0.1.9",
"resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-0.1.9.tgz",
"integrity": "sha1-Fe7ONcSrcI2JJNqZ+4dPK1zAtsQ="
},
"isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
@@ -4742,32 +4648,6 @@
"resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz",
"integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4="
},
"lazystream": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/lazystream/-/lazystream-0.1.0.tgz",
"integrity": "sha1-GyXWPHcqTCDwpe0KnXf0hLbhaSA=",
"requires": {
"readable-stream": "~1.0.2"
},
"dependencies": {
"isarray": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"readable-stream": {
"version": "1.0.34",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
"integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
"isarray": "0.0.1",
"string_decoder": "~0.10.x"
}
}
}
},
"lcid": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
@@ -4957,29 +4837,11 @@
"resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz",
"integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw="
},
"lodash._isnative": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/lodash._isnative/-/lodash._isnative-2.4.1.tgz",
"integrity": "sha1-PqZAS3hKe+g2x7V1gOHN95sUgyw="
},
"lodash._objecttypes": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/lodash._objecttypes/-/lodash._objecttypes-2.4.1.tgz",
"integrity": "sha1-fAt/admKH3ZSn4kLDNsbTf7BHBE="
},
"lodash._reinterpolate": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz",
"integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0="
},
"lodash._shimkeys": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz",
"integrity": "sha1-bpzJZm/wgfC1psl4uD4kLmlJ0gM=",
"requires": {
"lodash._objecttypes": "~2.4.1"
}
},
"lodash.assign": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz",
@@ -4995,27 +4857,6 @@
"lodash._isiterateecall": "^3.0.0"
}
},
"lodash.defaults": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-2.4.1.tgz",
"integrity": "sha1-p+iIXwXmiFEUS24SqPNngCa8TFQ=",
"requires": {
"lodash._objecttypes": "~2.4.1",
"lodash.keys": "~2.4.1"
},
"dependencies": {
"lodash.keys": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz",
"integrity": "sha1-SN6kbfj/djKxDXBrissmWR4rNyc=",
"requires": {
"lodash._isnative": "~2.4.1",
"lodash._shimkeys": "~2.4.1",
"lodash.isobject": "~2.4.1"
}
}
}
},
"lodash.get": {
"version": "4.4.2",
"resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
@@ -5032,12 +4873,14 @@
"integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U="
},
"lodash.isobject": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-2.4.1.tgz",
"integrity": "sha1-Wi5H/mmVPx7mMafrof5k0tBlWPU=",
"requires": {
"lodash._objecttypes": "~2.4.1"
}
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-3.0.2.tgz",
"integrity": "sha1-PI+41bW/S/kK4G4U8qUwpO2TXh0="
},
"lodash.isplainobject": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
"integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs="
},
"lodash.keys": {
"version": "3.1.2",
@@ -5049,6 +4892,11 @@
"lodash.isarray": "^3.0.0"
}
},
"lodash.merge": {
"version": "4.6.1",
"resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.1.tgz",
"integrity": "sha512-AOYza4+Hf5z1/0Hztxpm2/xiPZgi/cjMqdnKTUWTBSKchJlxXXuUSxCCl8rJlf4g6yww/j6mA8nC8Hw/EZWxKQ=="
},
"lodash.startcase": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz",
@@ -5071,6 +4919,11 @@
"lodash._reinterpolate": "~3.0.0"
}
},
"lodash.zip": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/lodash.zip/-/lodash.zip-4.2.0.tgz",
"integrity": "sha1-7GZi5IlkCO1KtsVCo5kLcswIACA="
},
"log-symbols": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz",
@@ -5112,6 +4965,16 @@
}
}
},
"loglevel": {
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.1.tgz",
"integrity": "sha1-4PyVEztu8nbNyIh82vJKpvFW+Po="
},
"loglevel-plugin-prefix": {
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/loglevel-plugin-prefix/-/loglevel-plugin-prefix-0.5.3.tgz",
"integrity": "sha512-zRAJw3WYCQAJ6xfEIi04/oqlmR6jkwg3hmBcMW82Zic3iPWyju1gwntcgic0m5NgqYNJ62alCmb0g/div26WjQ=="
},
"longest": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
@@ -8971,11 +8834,6 @@
"resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz",
"integrity": "sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU="
},
"pragma-singleton": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/pragma-singleton/-/pragma-singleton-1.0.3.tgz",
"integrity": "sha1-aJQxe7jUcVflneKkoAnbfm9j4w4="
},
"prebuild-install": {
"version": "5.2.5",
"resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-5.2.5.tgz",
@@ -9082,11 +8940,6 @@
"once": "^1.3.1"
}
},
"punycode": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
"integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0="
},
"q": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
@@ -9097,16 +8950,6 @@
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
},
"querystring": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
"integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA="
},
"queue": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/queue/-/queue-1.0.2.tgz",
"integrity": "sha1-LZr55hyaGuRVem842FtTTq/yBYE="
},
"quick-lru": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz",
@@ -9541,6 +9384,21 @@
"resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
"integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo="
},
"resq": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/resq/-/resq-1.5.0.tgz",
"integrity": "sha512-6US6oo2fQ/vgs7wBwqq1w9901Z5VEDgxQH0LrNaN8HcHUZInhtrIt1a0Icysu0vuoK26Bt+SR1dIYeR9+ftMxA==",
"requires": {
"fast-deep-equal": "^2.0.1"
},
"dependencies": {
"fast-deep-equal": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
"integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk="
}
}
},
"restore-cursor": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz",
@@ -9556,9 +9414,9 @@
"integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg=="
},
"rgb2hex": {
"version": "0.1.8",
"resolved": "https://registry.npmjs.org/rgb2hex/-/rgb2hex-0.1.8.tgz",
"integrity": "sha512-kPH3Zm3UrBIfJv17AtJJGLRxak+Hvvz6SnsTBIajqB2Zbh+A4EEjkMWKkmGhms0cJlzOOjZcu1LX5K3vnON7ug=="
"version": "0.1.9",
"resolved": "https://registry.npmjs.org/rgb2hex/-/rgb2hex-0.1.9.tgz",
"integrity": "sha512-32iuQzhOjyT+cv9aAFRBJ19JgHwzQwbjUhH3Fj2sWW2EEGAW8fpFrDFP5ndoKDxJaLO06x1hE3kyuIFrUQtybQ=="
},
"right-align": {
"version": "0.1.3",
@@ -9666,6 +9524,11 @@
"resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
"integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8="
},
"serialize-error": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-3.0.0.tgz",
"integrity": "sha512-+y3nkkG/go1Vdw+2f/+XUXM1DXX1XcxTl99FfiD/OEPUNw4uo0i6FKABfTAN5ZcgGtjTRZcEbxcE/jtXbEY19A=="
},
"set-blocking": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
@@ -9705,11 +9568,6 @@
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
"integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM="
},
"sigmund": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
"integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA="
},
"signal-exit": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
@@ -9880,15 +9738,6 @@
"kind-of": "^3.2.0"
}
},
"sntp": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/sntp/-/sntp-0.2.4.tgz",
"integrity": "sha1-+4hfGLDzqtGJ+CSGJTa87ux1CQA=",
"optional": true,
"requires": {
"hoek": "0.9.x"
}
},
"source-map": {
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
@@ -11096,15 +10945,6 @@
"resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
"integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI="
},
"url": {
"version": "0.10.3",
"resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz",
"integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=",
"requires": {
"punycode": "1.3.2",
"querystring": "0.2.0"
}
},
"use": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
@@ -11183,142 +11023,37 @@
"resolved": "https://registry.npmjs.org/walkdir/-/walkdir-0.0.12.tgz",
"integrity": "sha512-HFhaD4mMWPzFSqhpyDG48KDdrjfn409YQuVW7ckZYhW4sE87mYtWifdB/+73RA7+p4s4K18n5Jfx1kHthE1gBw=="
},
"webdriverio": {
"version": "2.4.5",
"resolved": "https://registry.npmjs.org/webdriverio/-/webdriverio-2.4.5.tgz",
"integrity": "sha1-wD7ajhp+tCMDhYjm5z8nCyx03gs=",
"webdriver": {
"version": "5.9.1",
"resolved": "https://registry.npmjs.org/webdriver/-/webdriver-5.9.1.tgz",
"integrity": "sha512-emUetEEJKN6ZsyZzj28D4HKC5p7Qo3ZSuuRlH9TpWyCp8ahxu3UicgL19ES//Sy1xPomWOi2Xk54/FLv/BIxgQ==",
"requires": {
"archiver": "~0.6.1",
"async": "^0.9.0",
"chainit": "^2.1.1",
"css-parse": "^1.7.0",
"css-value": "0.0.1",
"deepmerge": "~0.2.7",
"pragma-singleton": "~1.0.3",
"q": "^1.1.2",
"request": "~2.34.0",
"rgb2hex": "^0.1.0",
"url": "^0.10.1",
"wgxpath": "^0.23.0"
},
"dependencies": {
"asn1": {
"version": "0.1.11",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz",
"integrity": "sha1-VZvhg3bQik7E2+gId9J4GGObLfc=",
"optional": true
},
"assert-plus": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz",
"integrity": "sha1-7nQAlBMALYTOxyGcasgRgS5yMWA=",
"optional": true
},
"async": {
"version": "0.9.2",
"resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz",
"integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0="
},
"aws-sign2": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz",
"integrity": "sha1-xXED96F/wDfwLXwuZLYC6iI/fWM=",
"optional": true
},
"combined-stream": {
"version": "0.0.7",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz",
"integrity": "sha1-ATfmV7qlp1QcV6w3rF/AfXO03B8=",
"optional": true,
"requires": {
"delayed-stream": "0.0.5"
}
},
"delayed-stream": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz",
"integrity": "sha1-1LH0OpPoKW3+AmlPRoC8N6MTxz8=",
"optional": true
},
"forever-agent": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz",
"integrity": "sha1-bQ4JxJIflKJ/Y9O0nF/v8epMUTA="
},
"form-data": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-0.1.4.tgz",
"integrity": "sha1-kavXiKupcCsaq/qLwBAxoqyeOxI=",
"optional": true,
"requires": {
"async": "~0.9.0",
"combined-stream": "~0.0.4",
"mime": "~1.2.11"
}
},
"http-signature": {
"version": "0.10.1",
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz",
"integrity": "sha1-T72sEyVZqoMjEh5UB3nAoBKyfmY=",
"optional": true,
"requires": {
"asn1": "0.1.11",
"assert-plus": "^0.1.5",
"ctype": "0.5.3"
}
},
"mime": {
"version": "1.2.11",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz",
"integrity": "sha1-WCA+7Ybjpe8XrtK32evUfwpg3RA="
},
"node-uuid": {
"version": "1.4.8",
"resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz",
"integrity": "sha1-sEDrCSOWivq/jTL7HxfxFn/auQc="
},
"oauth-sign": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.3.0.tgz",
"integrity": "sha1-y1QPk7srIqfVlBaRoojWDo6pOG4=",
"optional": true
},
"qs": {
"version": "0.6.6",
"resolved": "https://registry.npmjs.org/qs/-/qs-0.6.6.tgz",
"integrity": "sha1-bgFQmP9RlouKPIGQAdXyyJvEsQc="
},
"request": {
"version": "2.34.0",
"resolved": "https://registry.npmjs.org/request/-/request-2.34.0.tgz",
"integrity": "sha1-tdi5UmrdSi1GKfTUFxJFc5lkRa4=",
"requires": {
"aws-sign2": "~0.5.0",
"forever-agent": "~0.5.0",
"form-data": "~0.1.0",
"hawk": "~1.0.0",
"http-signature": "~0.10.0",
"json-stringify-safe": "~5.0.0",
"mime": "~1.2.9",
"node-uuid": "~1.4.0",
"oauth-sign": "~0.3.0",
"qs": "~0.6.0",
"tough-cookie": ">=0.12.0",
"tunnel-agent": "~0.3.0"
}
},
"tunnel-agent": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.3.0.tgz",
"integrity": "sha1-rWgbaPUyGtKCfEz7G31d8s/pQu4=",
"optional": true
}
"@wdio/config": "^5.9.1",
"@wdio/logger": "^5.9.0",
"deepmerge": "^2.0.1",
"lodash.merge": "^4.6.1",
"request": "^2.83.0"
}
},
"wgxpath": {
"version": "0.23.0",
"resolved": "https://registry.npmjs.org/wgxpath/-/wgxpath-0.23.0.tgz",
"integrity": "sha1-2z/IOJ2BhOluunA3SJc1wTYiep8="
"webdriverio": {
"version": "5.9.2",
"resolved": "https://registry.npmjs.org/webdriverio/-/webdriverio-5.9.2.tgz",
"integrity": "sha512-ub87P5+h4935jEXXxJ5b22sq5sx25LJC0W5oXmNQfHyYWvca+oS75iJS80jGQ6haDUfyvek1PBMBh7M2+ikeIw==",
"requires": {
"@wdio/config": "^5.9.1",
"@wdio/logger": "^5.9.0",
"@wdio/repl": "^5.9.1",
"css-value": "^0.0.1",
"grapheme-splitter": "^1.0.2",
"lodash.isobject": "^3.0.2",
"lodash.isplainobject": "^4.0.6",
"lodash.merge": "^4.6.1",
"lodash.zip": "^4.2.0",
"resq": "^1.5.0",
"rgb2hex": "^0.1.0",
"serialize-error": "^3.0.0",
"webdriver": "^5.9.1"
}
},
"which": {
"version": "1.3.1",
@@ -11485,39 +11220,6 @@
"requires": {
"fd-slicer": "~1.0.1"
}
},
"zip-stream": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-0.2.3.tgz",
"integrity": "sha1-rvCVN2z+E4lZqBNBmB0mM4tG2NM=",
"requires": {
"debug": "~0.7.4",
"lodash.defaults": "~2.4.1",
"readable-stream": "~1.0.24"
},
"dependencies": {
"debug": {
"version": "0.7.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz",
"integrity": "sha1-BuHqgILCyxTjmAbiLi9vdX+Srzk="
},
"isarray": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"readable-stream": {
"version": "1.0.34",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
"integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
"isarray": "0.0.1",
"string_decoder": "~0.10.x"
}
}
}
}
}
}

View File

@@ -46,7 +46,7 @@
"sync-request": "3.0.1",
"tello": "1.0.7",
"terser": "^3.8.1",
"webdriverio": "2.4.5",
"webdriverio": "^5.9.2",
"yargs": "4.8.1"
}
}

View File

@@ -1,165 +0,0 @@
path = require 'path'
http = require 'http'
temp = require('temp').track()
os = require('os')
remote = require 'remote'
async = require 'async'
{map, extend, once, difference} = require 'underscore-plus'
{spawn, spawnSync} = require 'child_process'
webdriverio = require '../../../script/node_modules/webdriverio'
AtomPath = remote.process.argv[0]
AtomLauncherPath = path.join(__dirname, "..", "helpers", "atom-launcher.sh")
ChromedriverPath = path.resolve(__dirname, '..', '..', '..', 'script', 'node_modules', 'electron-chromedriver', 'bin', 'chromedriver')
ChromedriverPort = 9515
ChromedriverURLBase = "/wd/hub"
ChromedriverStatusURL = "http://localhost:#{ChromedriverPort}#{ChromedriverURLBase}/status"
userDataDir = null
chromeDriverUp = (done) ->
checkStatus = ->
http
.get ChromedriverStatusURL, (response) ->
if response.statusCode is 200
done()
else
chromeDriverUp(done)
.on("error", -> chromeDriverUp(done))
setTimeout(checkStatus, 100)
chromeDriverDown = (done) ->
checkStatus = ->
http
.get ChromedriverStatusURL, (response) ->
chromeDriverDown(done)
.on("error", done)
setTimeout(checkStatus, 100)
buildAtomClient = (args, env) ->
userDataDir = temp.mkdirSync('atom-user-data-dir')
client = webdriverio.remote(
host: 'localhost'
port: ChromedriverPort
desiredCapabilities:
browserName: "atom"
chromeOptions:
binary: AtomLauncherPath
args: [
"atom-path=#{AtomPath}"
"atom-args=#{args.join(" ")}"
"atom-env=#{map(env, (value, key) -> "#{key}=#{value}").join(" ")}"
"dev"
"safe"
"user-data-dir=#{userDataDir}"
])
isRunning = false
client.on "init", -> isRunning = true
client.on "end", -> isRunning = false
client
.addCommand "waitUntil", (conditionFn, timeout, cb) ->
timedOut = succeeded = false
pollingInterval = Math.min(timeout, 100)
setTimeout((-> timedOut = true), timeout)
async.until(
(-> succeeded or timedOut),
((next) =>
setTimeout(=>
conditionFn.call(this).then(
((result) ->
succeeded = result
next()),
((err) -> next(err))
)
, pollingInterval)),
((err) -> cb(err, succeeded)))
.addCommand "waitForWindowCount", (count, timeout, cb) ->
@waitUntil(->
@windowHandles().then ({value}) -> value.length is count
, timeout)
.then (result) -> expect(result).toBe(true)
.windowHandles(cb)
.addCommand "waitForPaneItemCount", (count, timeout, cb) ->
@waitUntil(->
@execute(-> atom.workspace?.getActivePane()?.getItems().length)
.then(({value}) -> value is count)
, timeout)
.then (result) ->
expect(result).toBe(true)
cb(null)
.addCommand "treeViewRootDirectories", (cb) ->
@waitForExist('.tree-view', 10000)
.execute(->
for element in document.querySelectorAll(".tree-view .project-root > .header .name")
element.dataset.path
, cb)
.addCommand "waitForNewWindow", (fn, timeout, done) ->
@windowHandles (err, {value: oldWindowHandles}) ->
return done() unless isRunning
@call(fn)
.waitForWindowCount(oldWindowHandles.length + 1, 5000)
.then ({value: newWindowHandles}) ->
[newWindowHandle] = difference(newWindowHandles, oldWindowHandles)
return done() unless newWindowHandle
@window(newWindowHandle)
.waitForExist('atom-workspace', 10000, done)
.addCommand "dispatchCommand", (command, done) ->
@execute "atom.commands.dispatch(document.activeElement, '#{command}')"
.call(done)
module.exports = (args, env, fn) ->
[chromedriver, chromedriverLogs, chromedriverExit] = []
runs ->
chromedriver = spawn(ChromedriverPath, [
"--verbose",
"--port=#{ChromedriverPort}",
"--url-base=#{ChromedriverURLBase}"
])
chromedriverLogs = []
chromedriverExit = new Promise (resolve) ->
errorCode = null
chromedriver.on "exit", (code, signal) ->
errorCode = code unless signal?
chromedriver.stderr.on "data", (log) ->
chromedriverLogs.push(log.toString())
chromedriver.stderr.on "close", ->
resolve(errorCode)
waitsFor("webdriver to start", chromeDriverUp, 15000)
waitsFor("tests to run", (done) ->
finish = once ->
client.end()
.then(-> chromedriver.kill())
.then(chromedriverExit.then(
(errorCode) ->
if errorCode?
jasmine.getEnv().currentSpec.fail """
Chromedriver exited with code #{errorCode}.
Logs:\n#{chromedriverLogs.join("\n")}
"""
done()))
client = buildAtomClient(args, env)
client.on "error", (err) ->
jasmine.getEnv().currentSpec.fail(new Error(err.response?.body?.value?.message))
finish()
fn(
client.init()
.waitUntil((-> @windowHandles().then ({value}) -> value.length > 0), 10000)
.waitForExist("atom-workspace", 10000)
).then(finish)
, 30000)
waitsFor("webdriver to stop", chromeDriverDown, 15000)

View File

@@ -0,0 +1,195 @@
const path = require('path');
const http = require('http');
const temp = require('temp').track();
const remote = require('remote');
const { once } = require('underscore-plus');
const { spawn } = require('child_process');
const webdriverio = require('../../../script/node_modules/webdriverio');
const AtomPath = remote.process.argv[0];
const AtomLauncherPath = path.join(
__dirname,
'..',
'helpers',
'atom-launcher.sh'
);
const ChromedriverPath = path.resolve(
__dirname,
'..',
'..',
'..',
'script',
'node_modules',
'electron-chromedriver',
'bin',
'chromedriver'
);
const ChromedriverPort = 9515;
const ChromedriverURLBase = '/wd/hub';
const ChromedriverStatusURL = `http://localhost:${ChromedriverPort}${ChromedriverURLBase}/status`;
const chromeDriverUp = done => {
const checkStatus = () =>
http
.get(ChromedriverStatusURL, response => {
if (response.statusCode === 200) {
done();
} else {
chromeDriverUp(done);
}
})
.on('error', () => chromeDriverUp(done));
setTimeout(checkStatus, 100);
};
const chromeDriverDown = done => {
const checkStatus = () =>
http
.get(ChromedriverStatusURL, response => chromeDriverDown(done))
.on('error', done);
setTimeout(checkStatus, 100);
};
const buildAtomClient = async (args, env) => {
const userDataDir = temp.mkdirSync('atom-user-data-dir');
const client = await webdriverio.remote({
host: 'localhost',
port: ChromedriverPort,
capabilities: {
browserName: 'atom',
chromeOptions: {
binary: AtomLauncherPath,
args: [
`atom-path=${AtomPath}`,
`atom-args=${args.join(' ')}`,
`atom-env=${Object.entries(env)
.map(([key, value]) => `${key}=${value}`)
.join(' ')}`,
'dev',
'safe',
`user-data-dir=${userDataDir}`
]
}
}
});
client.addCommand('waitForPaneItemCount', async function(count, timeout) {
await this.waitUntil(
() =>
this.execute(() => atom.workspace.getActivePane().getItems().length),
timeout
);
});
client.addCommand('treeViewRootDirectories', async function() {
const treeViewElement = await this.$('.tree-view');
await treeViewElement.waitForExist(10000);
return this.execute(() =>
Array.from(
document.querySelectorAll('.tree-view .project-root > .header .name')
).map(element => element.dataset.path)
);
});
client.addCommand('dispatchCommand', async function(command) {
return this.execute(
command => atom.commands.dispatch(document.activeElement, command),
command
);
});
return client;
};
module.exports = function(args, env, fn) {
let chromedriver, chromedriverLogs, chromedriverExit;
runs(() => {
chromedriver = spawn(ChromedriverPath, [
'--verbose',
`--port=${ChromedriverPort}`,
`--url-base=${ChromedriverURLBase}`
]);
chromedriverLogs = [];
chromedriverExit = new Promise(resolve => {
let errorCode = null;
chromedriver.on('exit', (code, signal) => {
if (signal == null) {
errorCode = code;
}
});
chromedriver.stderr.on('data', log =>
chromedriverLogs.push(log.toString())
);
chromedriver.stderr.on('close', () => resolve(errorCode));
});
});
waitsFor('webdriver to start', chromeDriverUp, 15000);
waitsFor(
'tests to run',
async done => {
const finish = once(async () => {
await client.deleteSession();
chromedriver.kill();
const errorCode = await chromedriverExit;
if (errorCode != null) {
jasmine.getEnv().currentSpec
.fail(`Chromedriver exited with code ${errorCode}.
Logs:\n${chromedriverLogs.join('\n')}`);
}
done();
});
let client;
try {
client = await buildAtomClient(args, env);
} catch (error) {
jasmine
.getEnv()
.currentSpec.fail(`Unable to build Atom client.\n${error}`);
finish();
return;
}
try {
await client.waitUntil(async function() {
const handles = await this.getWindowHandles();
return handles.length > 0;
}, 10000);
} catch (error) {
jasmine
.getEnv()
.currentSpec.fail(`Unable to locate windows.\n\n${error}`);
finish();
return;
}
try {
const workspaceElement = await client.$('atom-workspace');
await workspaceElement.waitForExist(10000);
} catch (error) {
jasmine
.getEnv()
.currentSpec.fail(`Unable to find workspace element.\n\n${error}`);
finish();
return;
}
try {
await fn(client);
} catch (error) {
jasmine.getEnv().currentSpec.fail(error);
finish();
return;
}
finish();
},
30000
);
waitsFor('webdriver to stop', chromeDriverDown, 15000);
};

View File

@@ -1,42 +0,0 @@
fs = require 'fs-plus'
path = require 'path'
season = require 'season'
temp = require('temp').track()
runAtom = require './helpers/start-atom'
describe "Smoke Test", ->
return unless process.platform is 'darwin' # Fails on win32
atomHome = temp.mkdirSync('atom-home')
beforeEach ->
jasmine.useRealClock()
season.writeFileSync(path.join(atomHome, 'config.cson'), {
'*': {
welcome: {showOnStartup: false},
core: {
telemetryConsent: 'no',
disabledPackages: ['github']
}
}
})
it "can open a file in Atom and perform basic operations on it", ->
tempDirPath = temp.mkdirSync("empty-dir")
filePath = path.join(tempDirPath, "new-file")
fs.writeFileSync filePath, "", {encoding: "utf8"}
runAtom [filePath], {ATOM_HOME: atomHome}, (client) ->
client
.treeViewRootDirectories()
.then ({value}) -> expect(value).toEqual([])
.waitForExist("atom-text-editor", 5000)
.then (exists) -> expect(exists).toBe true
.waitForPaneItemCount(1, 1000)
.click("atom-text-editor")
.waitUntil((-> @execute(-> document.activeElement.closest('atom-text-editor'))), 5000)
.keys("Hello!")
.execute -> atom.workspace.getActiveTextEditor().getText()
.then ({value}) -> expect(value).toBe "Hello!"
.dispatchCommand("editor:delete-line")

View File

@@ -0,0 +1,62 @@
const fs = require('fs-plus');
const path = require('path');
const season = require('season');
const temp = require('temp').track();
const runAtom = require('./helpers/start-atom');
describe('Smoke Test', () => {
// Fails on win32
if (process.platform !== 'darwin') {
return;
}
const atomHome = temp.mkdirSync('atom-home');
beforeEach(() => {
jasmine.useRealClock();
season.writeFileSync(path.join(atomHome, 'config.cson'), {
'*': {
welcome: { showOnStartup: false },
core: {
telemetryConsent: 'no',
disabledPackages: ['github']
}
}
});
});
it('can open a file in Atom and perform basic operations on it', async () => {
const tempDirPath = temp.mkdirSync('empty-dir');
const filePath = path.join(tempDirPath, 'new-file');
fs.writeFileSync(filePath, '', { encoding: 'utf8' });
runAtom([tempDirPath], { ATOM_HOME: atomHome }, async client => {
const roots = await client.treeViewRootDirectories();
expect(roots).toEqual([tempDirPath]);
await client.execute(filePath => atom.workspace.open(filePath), filePath);
const textEditorElement = await client.$('atom-text-editor');
await textEditorElement.waitForExist(5000);
await client.waitForPaneItemCount(1, 1000);
await textEditorElement.click();
const closestElement = await client.execute(() =>
document.activeElement.closest('atom-text-editor')
);
expect(closestElement).not.toBeNull();
await client.keys('Hello!');
const text = await client.execute(() =>
atom.workspace.getActiveTextEditor().getText()
);
expect(text).toBe('Hello!');
await client.dispatchCommand('editor:delete-line');
});
});
});