-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b40999b
commit a48c356
Showing
3 changed files
with
35 additions
and
37 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 |
---|---|---|
@@ -1,23 +1,22 @@ | ||
import {browser, by, element} from 'protractor'; | ||
import {screenshot} from '../../screenshot'; | ||
|
||
|
||
describe('button', function () { | ||
describe('disabling behavior', function () { | ||
beforeEach(function() { | ||
browser.get('/button'); | ||
}); | ||
|
||
it('should prevent click handlers from executing when disabled', function () { | ||
let testname = | ||
`button disabling behavior should prevent click handlers from executing when disabled`; | ||
screenshot(testname); | ||
element(by.id('test-button')).click(); | ||
expect(element(by.id('click-counter')).getText()).toEqual('1'); | ||
screenshot(testname + ' click once'); | ||
screenshot('clicked once'); | ||
|
||
element(by.id('disable-toggle')).click(); | ||
element(by.id('test-button')).click(); | ||
expect(element(by.id('click-counter')).getText()).toEqual('1'); | ||
screenshot(testname + 'click disabled'); | ||
screenshot('click disabled'); | ||
}); | ||
}); | ||
}); |
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