Skip to content

Commit 22b5408

Browse files
authored
Merge pull request #166 from yandex/fix/run-selenium-webdriver
Remove old selenium-webdriver tests
2 parents 64c5256 + c6d4c68 commit 22b5408

File tree

20 files changed

+8
-652
lines changed

20 files changed

+8
-652
lines changed

package-lock.json

Lines changed: 0 additions & 119 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@
8181
"mocha-teamcity-reporter": "^2.4.0",
8282
"mochawesome": "^3.0.2",
8383
"node-gyp": "^3.6.0",
84-
"selenium-webdriver": "^3.3.0",
8584
"sinon": "^6.0.0",
8685
"ts-node": "^6.0.3",
8786
"tslint": "^5.10.0",

src/main/mocha.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export default class MochaWrapper extends Mocha {
5454

5555
enableExitMode() {
5656
this.exitImmediately = true;
57+
return this;
5758
}
5859

5960
run(onComplete?: (failures: number) => void): RunnerMain {

test/index.sh

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -153,22 +153,6 @@ echo 'TESTCASE: subprocess exits before sending an end message'
153153
test test/no-subprocess-end/index.js
154154
echo $?
155155

156-
if [ $SAUCE_USERNAME ] && [ $SAUCE_ACCESS_KEY ]; then
157-
echo 'TESTCASE: selenium-webdriver'
158-
test test/selenium-webdriver/index.js
159-
echo $?
160-
161-
echo 'TESTCASE: selenium-webdriver failing tests'
162-
test test/selenium-webdriver-1/index.js
163-
echo $?
164-
165-
echo 'TESTCASE: selenium-webdriver tests duration'
166-
test test/selenium-webdriver-2/index.js
167-
echo $?
168-
else
169-
echo "Please set SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables to run selenium-webdriver tests"
170-
fi
171-
172156
echo "Passes: $PASSES Failes: $FAILES"
173157

174158
if [ $FAILES -gt 0 ]; then

test/no-subprocess-end/easy.js

Lines changed: 0 additions & 41 deletions
This file was deleted.

test/no-subprocess-end/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,26 +37,26 @@ const runSpec = (spec) => {
3737
Promise.resolve()
3838
// one simple crash in the middle of a process
3939
.then(() => runSpec('one-crash'))
40-
.then(({ code, stdout }) => {
40+
.then(function oneCrash({ code, stdout }) {
4141
expect(stdout).to.deep.equal(['start', 'suite', 'suite', 'suite', 'test', 'pass', 'test end', 'test']);
4242
assert.strictEqual(code, 255, `"one-crash" spec finished with wrong exit code: ${code}`);
4343
})
4444
// one simple crash in the beginning of a process
4545
.then(() => runSpec('one-crash-early'))
46-
.then(({ code, stderr, stdout }) => {
46+
.then(function oneCrashEarly({ code, stderr, stdout }) {
4747
expect(stderr).to.deep.equal(['I am about to exit...']);
4848
expect(stdout).to.deep.equal(['start', 'suite']); // top level main process suite
4949
assert.strictEqual(code, 255, `"one-crash-early" spec finished with wrong exit code: ${code}`);
5050
})
5151
// one simple crash in the middle, one okay
5252
.then(() => runSpec('one-crash-one-ok'))
53-
.then(({ code, stdout }) => {
53+
.then(function oneCrashOneOk({ code, stdout }) {
5454
expect(stdout).to.deep.equal(['start', 'suite', 'suite', 'suite', 'test', 'pass', 'test end', 'suite end', 'suite end', 'suite', 'suite', 'test', 'pass', 'test end', 'test']);
5555
assert.strictEqual(code, 255, `"one-crash-one-ok" spec finished with wrong exit code: ${code}`);
5656
})
5757
// one simple crash in the beginning, one okay
5858
.then(() => runSpec('one-crash-early-one-ok'))
59-
.then(({ code, stdout }) => {
59+
.then(function oneCrashEarlyOneOk({ code, stdout }) {
6060
expect(stdout).to.deep.equal(['start', 'suite']);
6161
assert.strictEqual(code, 255, `"one-crash-early-one-ok" spec finished with wrong exit code: ${code}`);
6262
})
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
describe('suite', () => {
2-
it('should pass', () => {});
2+
it('should pass', (done) => {
3+
setTimeout(done, 100);
4+
});
35
});

test/selenium-webdriver-1/README

Lines changed: 0 additions & 4 deletions
This file was deleted.

test/selenium-webdriver-1/index.js

Lines changed: 0 additions & 43 deletions
This file was deleted.

test/selenium-webdriver-1/tests/failing.js

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)