-
Notifications
You must be signed in to change notification settings - Fork 739
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update integration paths for webdriverio tests First iteration of integration webdriverio.
- Loading branch information
Showing
68 changed files
with
13,019 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
language: "javascript" | ||
framework: "webdriverio" | ||
configPath: "wdio.conf.js" |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,45 @@ | ||
--- | ||
currentMenu: accesskeys | ||
--- | ||
|
||
# Demo: Accesskeys | ||
|
||
<!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
|
||
|
||
- [Example code](#example-code) | ||
- [Example HTML](#example-html) | ||
|
||
<!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
|
||
The menu allows you to use [FontAwesome](http://fontawesome.io/) [icons](http://fontawesome.io/icons/) in your menu. Just include the CSS for FontAwesome and you are ready to go. | ||
|
||
<span class="context-menu-one btn btn-neutral">right click me</span> | ||
|
||
## Example code | ||
|
||
<script type="text/javascript" class="showcase"> | ||
$(function() { | ||
$.contextMenu({ | ||
selector: '.context-menu-one', | ||
callback: function(key, options) { | ||
var m = "clicked: " + key; | ||
window.console && console.log(m) || alert(m); | ||
}, | ||
items: { | ||
"edit": {name: "Edit", icon: "fa-edit"}, | ||
"cut": {name: "Beer", icon: "fa-beer"}, | ||
copy: {name: "Cloud download", icon: "fa-cloud-download"}, | ||
"paste": {name: "Certificate", icon: "fa-certificate"} | ||
} | ||
}); | ||
|
||
$('.context-menu-one').on('click', function(e){ | ||
console.log('clicked', this); | ||
}) | ||
}); | ||
</script> | ||
|
||
## Example HTML | ||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div> |
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
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,48 @@ | ||
var pwd = process.cwd(); | ||
var helper = require('../integration_test_helper.js'); | ||
|
||
// this test uses custom HTML because PhantomJS | ||
// has problems showing alert modal dialogs. | ||
// We are testing callbacks against simple DOM | ||
// manipulations instead. | ||
module.exports = { | ||
'Typing <e> on keyboard triggers "edit" menu item callback': function (test) { | ||
test | ||
.open('file://' + pwd + '/test/integration/html/accesskeys_test.html') | ||
.execute(helper.rightClick, '.context-menu-one') | ||
.waitForElement('#context-menu-layer') | ||
.sendKeys('body', 'e') | ||
.assert.text('#msg', 'clicked: edit', 'Edit menu item callback is triggered by accesskey') | ||
.done(); | ||
}, | ||
|
||
'Typing <c> on keyboard triggers "cut" menu item callback': function (test) { | ||
test | ||
.open('file://' + pwd + '/test/integration/html/accesskeys_test.html') | ||
.execute(helper.rightClick, '.context-menu-one') | ||
.waitForElement('#context-menu-layer') | ||
.sendKeys('body', 'c') | ||
.assert.text('#msg', 'clicked: cut', 'Cut menu item callback is triggered by accesskey') | ||
.done(); | ||
}, | ||
|
||
'Typing <o> on keyboard triggers "copy" menu item callback': function (test) { | ||
test | ||
.open('file://' + pwd + '/test/integration/html/accesskeys_test.html') | ||
.execute(helper.rightClick, '.context-menu-one') | ||
.waitForElement('#context-menu-layer') | ||
.sendKeys('body', 'o') | ||
.assert.text('#msg', 'clicked: copy', 'Copy menu item callback is triggered by accesskey') | ||
.done(); | ||
}, | ||
|
||
'Typing <p> on keyboard triggers "paste" menu item callback': function (test) { | ||
test | ||
.open('file://' + pwd + '/test/integration/html/accesskeys_test.html') | ||
.execute(helper.rightClick, '.context-menu-one') | ||
.waitForElement('#context-menu-layer') | ||
.sendKeys('body', 'p') | ||
.assert.text('#msg', 'clicked: paste', 'Paste menu item callback is triggered by accesskey') | ||
.done(); | ||
} | ||
}; |
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,15 @@ | ||
var pwd = process.cwd(); | ||
var helper = require('../integration_test_helper.js'); | ||
|
||
module.exports = { | ||
'Render async context menu': function (test) { | ||
test | ||
.open('file://' + pwd + '/test/integration/html/async-create.html') | ||
.execute(helper.rightClick, '.context-menu-one', 'mouseup') | ||
.waitForElement('#context-menu-layer') | ||
.assert.exists('.context-menu-root', 'It opens context menu') | ||
.assert.numberOfElements('.context-menu-root li') | ||
.is(3, '3 context menu items are shown') | ||
.done(); | ||
} | ||
}; |
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,60 @@ | ||
var pwd = process.cwd(); | ||
var helper = require('../integration_test_helper.js'); | ||
|
||
// this test uses custom HTML because PhantomJS | ||
// has problems showing alert modal dialogs. | ||
// We are testing callbacks against simple DOM | ||
// manipulations instead. | ||
module.exports = { | ||
'Ensure edit menu item triggers callback': function (test) { | ||
test | ||
.open('file://' + pwd + '/test/integration/html/callback_test.html') | ||
.execute(helper.rightClick, '.context-menu-one') | ||
.waitForElement('#context-menu-layer') | ||
.wait(100) | ||
.assert.visible('.context-menu-root', 'Menu is present') | ||
.click('.context-menu-root li:nth-child(1)') // edit | ||
.assert.text('#msg', 'edit was clicked', 'Edit item triggers callback') | ||
.assert.doesntExist('#context-menu-layer', 'It closes context menu') | ||
.done(); | ||
}, | ||
|
||
'Ensure cut menu item triggers global callback': function (test) { | ||
test | ||
.open('file://' + pwd + '/test/integration/html/callback_test.html') | ||
.execute(helper.rightClick, '.context-menu-one') | ||
.waitForElement('#context-menu-layer') | ||
.wait(100) | ||
.assert.visible('.context-menu-root', 'Menu is present') | ||
.click('.context-menu-root li:nth-child(2)') // cut | ||
.assert.text('#msg', 'global: cut', 'Cut item triggers callback') | ||
.assert.doesntExist('#context-menu-layer', 'It closes context menu') | ||
.done(); | ||
}, | ||
|
||
'Ensure delete menu item triggers global callback': function (test) { | ||
test | ||
.open('file://' + pwd + '/test/integration/html/callback_test.html') | ||
.execute(helper.rightClick, '.context-menu-one') | ||
.waitForElement('#context-menu-layer') | ||
.wait(100) | ||
.assert.visible('.context-menu-root', 'Menu is present') | ||
.click('.context-menu-root li:nth-child(5)') // delete | ||
.assert.text('#msg', 'global: delete', 'delete item triggers callback') | ||
.assert.doesntExist('#context-menu-layer', 'It closes context menu') | ||
.done(); | ||
}, | ||
|
||
'Ensure quit menu item triggers global callback': function (test) { | ||
test | ||
.open('file://' + pwd + '/test/integration/html/callback_test.html') | ||
.execute(helper.rightClick, '.context-menu-one') | ||
.waitForElement('#context-menu-layer') | ||
.wait(100) | ||
.assert.visible('.context-menu-root', 'Menu is present') | ||
.click('.context-menu-root li:nth-child(7)') // quit | ||
.assert.text('#msg', 'global: quit', 'quit item triggers callback') | ||
.assert.doesntExist('#context-menu-layer', 'It closes context menu') | ||
.done(); | ||
} | ||
}; |
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,42 @@ | ||
var pwd = process.cwd(); | ||
var helper = require('../integration_test_helper.js'); | ||
|
||
// this test uses custom HTML because PhantomJS | ||
// has problems showing alert modal dialogs. | ||
// We are testing callbacks against simple DOM | ||
// manipulations instead. | ||
module.exports = { | ||
'Click custom comand menu item triggers menu callback': function (test) { | ||
test | ||
.open('file://' + pwd + '/test/integration/html/custom-command_test.html') | ||
.execute(helper.rightClick, '.context-menu-one') | ||
.waitForElement('#context-menu-layer') | ||
.assert.numberOfElements('.context-menu-root>li') | ||
.is(3, '3 context menu items are shown') | ||
.click('.context-menu-root li.labels') | ||
.assert.text('#msg').to.contain('clicked: label', 'contextMenu callback was triggered') | ||
.done(); | ||
}, | ||
|
||
'Click custom comand menu item label triggers custom action - red': function (test) { | ||
test | ||
.open('file://' + pwd + '/test/integration/html/custom-command_test.html') | ||
.execute(helper.rightClick, '.context-menu-one') | ||
.waitForElement('#context-menu-layer') | ||
.wait(100) | ||
.click('.context-menu-root li.labels .label1') | ||
.assert.text('#msg', 'clicked: label | text: label 1', 'custom action was triggered') | ||
.done(); | ||
}, | ||
|
||
'Click custom comand menu item label triggers custom action - blue': function (test) { | ||
test | ||
.open('file://' + pwd + '/test/integration/html/custom-command_test.html') | ||
.execute(helper.rightClick, '.context-menu-one') | ||
.waitForElement('#context-menu-layer') | ||
.wait(100) | ||
.click('.context-menu-root li.labels .label3') | ||
.assert.text('#msg', 'clicked: label | text: label 3', 'custom action was triggered') | ||
.done(); | ||
} | ||
}; |
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,32 @@ | ||
var pwd = process.cwd(); | ||
var helper = require('../integration_test_helper.js'); | ||
|
||
// this test uses custom HTML because PhantomJS | ||
// has problems showing alert modal dialogs. | ||
// We are testing callbacks against simple DOM | ||
// manipulations instead. | ||
module.exports = { | ||
'Clicking on disabled item has no effect': function (test) { | ||
test | ||
.open('file://' + pwd + '/test/integration/html/disabled-callback_test.html') | ||
.execute(helper.rightClick, '.context-menu-one') | ||
.waitForElement('#context-menu-layer') | ||
.wait(100) | ||
.assert.numberOfElements('.context-menu-root li') | ||
.is(2, '2 context menu items are shown') | ||
.click('.context-menu-root li:last-child') | ||
.assert.text('#msg', '', 'Disabled menu item didnt set text') | ||
.done(); | ||
}, | ||
|
||
'Clicking on enabled item works': function (test) { | ||
test | ||
.open('file://' + pwd + '/test/integration/html/disabled_test.html') | ||
.execute(helper.rightClick, '.context-menu-one') | ||
.waitForElement('#context-menu-layer') | ||
.wait(100) | ||
.click('.context-menu-root li:first-child') | ||
.assert.text('#msg', 'clicked: edit', 'Enabled menu item sets text') | ||
.done(); | ||
} | ||
}; |
Oops, something went wrong.