Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use nightwatch.js for functional tests (#122)
* add tests_output to gitignore * reverse conditional * lowercase ID * add full.html to keys tests * replace deprecated <font> with <mark> * add chromedriver dep * add nightwatch.json * use nightwatch in tests * remove gulp-webdriver * gulp test => unit * Remove F5 “reload” shortcuts * Test only Shift F5 PPT shortcut * better glob * remove `wdio.conf.js` * fix merging issues * add tests for N and P keys * fix `lint:ec` task
- Loading branch information
1 parent
e38a6be
commit 470fd33
Showing
17 changed files
with
420 additions
and
398 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
/shower.js | ||
/shower.min.js | ||
/tests/unit/tests.js | ||
/tests_output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"src_folders" : ["tests/functional"], | ||
"globals_path": "tests/chromedriver.js", | ||
"selenium": { | ||
"start_process": false | ||
}, | ||
|
||
"test_settings": { | ||
"default": { | ||
"selenium_port": 9515, | ||
"selenium_host": "localhost", | ||
"default_path_prefix": "", | ||
|
||
"desiredCapabilities": { | ||
"browserName": "chrome", | ||
"chromeOptions": { | ||
"args": ["--no-sandbox"] | ||
}, | ||
"acceptSslCerts": true | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
'use strict'; | ||
const chromedriver = require('chromedriver'); | ||
|
||
module.exports = { | ||
before: done => { | ||
chromedriver.start(); | ||
done(); | ||
}, | ||
after: () => { | ||
chromedriver.stop(); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
describe('a11y', () => { | ||
'use strict'; | ||
module.exports = { | ||
'@tags': ['a11y'], | ||
|
||
beforeEach(() => { | ||
browser.url('about:blank'); | ||
}); | ||
'doesn’t add `application` role in list mode': browser => { | ||
browser.url(`file:///${__dirname}/list.html`); | ||
browser.assert.elementNotPresent('.shower[role=application]'); | ||
browser.end(); | ||
}, | ||
|
||
afterEach(() => { | ||
browser.sessionStorage('DELETE'); | ||
}); | ||
|
||
it('doesn’t add `application` role in list mode', () => { | ||
browser.url('/a11y/list.html'); | ||
browser.isExisting('.shower[role=application]').should.equal(false); | ||
}); | ||
|
||
it('adds `application` role in full mode', () => { | ||
browser.url('/a11y/full.html'); | ||
browser.isExisting('.shower[role=application]').should.equal(true); | ||
}); | ||
|
||
}); | ||
'adds `application` role in full screen mode': browser => { | ||
browser.url(`file:///${__dirname}/full.html`); | ||
browser.assert.elementPresent('.shower[role=application]'); | ||
browser.end(); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.