-
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.
Finish submenu acceptance test migration, add accesskeys and async-cr…
…eate
- Loading branch information
Showing
7 changed files
with
68 additions
and
133 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
var assert = require('assert'); | ||
var pwd = process.cwd(); | ||
describe('Test accesskeys', function() { | ||
it('should navigate to submenu 2 levels deep and see correct alert for charlie', function () { | ||
browser.url('file://' + pwd + '/test/integration/html/sub-menus.html'); | ||
browser.rightClick('.context-menu-one'); | ||
browser.moveToObject('span=Sub group') | ||
browser.moveToObject('span=Sub group 2') | ||
browser.click('span=charlie') | ||
assert.equal(browser.alertText(), 'clicked: fold2-key3'); | ||
browser.alertAccept(); | ||
}); | ||
it('Typing <e> on keyboard triggers "edit" menu item callback', function () { | ||
browser.url('file://' + pwd + '/test/integration/html/accesskeys.html'); | ||
browser.rightClick('.context-menu-one'); | ||
browser.keys('e'); | ||
assert.equal(browser.alertText(), 'clicked: edit'); | ||
browser.alertAccept(); | ||
}); | ||
|
||
it('Typing <c> on keyboard triggers "cut" menu item callback', function () { | ||
browser.url('file://' + pwd + '/test/integration/html/accesskeys.html'); | ||
browser.rightClick('.context-menu-one'); | ||
browser.keys('c'); | ||
assert.equal(browser.alertText(), 'clicked: cut'); | ||
browser.alertAccept(); | ||
}); | ||
|
||
it('Typing <o> on keyboard triggers "copy" menu item callback', function () { | ||
browser.url('file://' + pwd + '/test/integration/html/accesskeys.html'); | ||
browser.rightClick('.context-menu-one'); | ||
browser.keys('o'); | ||
assert.equal(browser.alertText(), 'clicked: copy'); | ||
browser.alertAccept(); | ||
}); | ||
|
||
it('Typing <p> on keyboard triggers "paste" menu item callback', function () { | ||
browser.url('file://' + pwd + '/test/integration/html/accesskeys.html'); | ||
browser.rightClick('.context-menu-one'); | ||
browser.keys('p'); | ||
assert.equal(browser.alertText(), 'clicked: paste'); | ||
browser.alertAccept(); | ||
}); | ||
|
||
}); |
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,10 @@ | ||
var assert = require('assert'); | ||
var pwd = process.cwd(); | ||
describe('Test async create', function() { | ||
it('should render async created context menu', function () { | ||
browser.url('file://' + pwd + '/test/integration/html/async-create.html'); | ||
browser.rightClick('.context-menu-one'); | ||
browser.waitForExist('#context-menu-layer'); | ||
assert.equal(3, browser.elements('.context-menu-root li').value.length); | ||
}); | ||
}); |
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