aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/directive/ngEventDirs.js
diff options
context:
space:
mode:
authorJulie2014-01-11 16:59:15 -0800
committerCaitlin Potter2014-01-28 14:14:20 -0500
commit7aef2d54e0a48fae18a289813f699962d8310565 (patch)
tree60d1d559510c17e879aff798f298e6bcc262d3ab /src/ng/directive/ngEventDirs.js
parentce37ae28687167f7b4274ba547f013980126a219 (diff)
downloadangular.js-7aef2d54e0a48fae18a289813f699962d8310565.tar.bz2
test(docs): convert example end to end doc tests from scenario runner to protractor
Thanks to jeffbcross, petebacondarwin, btford, jdeboer, tbosch for contributions! Closes #6023
Diffstat (limited to 'src/ng/directive/ngEventDirs.js')
-rw-r--r--src/ng/directive/ngEventDirs.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/ng/directive/ngEventDirs.js b/src/ng/directive/ngEventDirs.js
index 7dba5749..f63d3ca1 100644
--- a/src/ng/directive/ngEventDirs.js
+++ b/src/ng/directive/ngEventDirs.js
@@ -327,20 +327,20 @@ forEach(
<pre>list={{list}}</pre>
</form>
</doc:source>
- <doc:scenario>
+ <doc:protractor>
it('should check ng-submit', function() {
- expect(binding('list')).toBe('[]');
- element('.doc-example-live #submit').click();
- expect(binding('list')).toBe('["hello"]');
- expect(input('text').val()).toBe('');
+ expect(element(by.binding('list')).getText()).toBe('list=[]');
+ element(by.css('.doc-example-live #submit')).click();
+ expect(element(by.binding('list')).getText()).toContain('hello');
+ expect(element(by.input('text')).getAttribute('value')).toBe('');
});
it('should ignore empty strings', function() {
- expect(binding('list')).toBe('[]');
- element('.doc-example-live #submit').click();
- element('.doc-example-live #submit').click();
- expect(binding('list')).toBe('["hello"]');
- });
- </doc:scenario>
+ expect(element(by.binding('list')).getText()).toBe('list=[]');
+ element(by.css('.doc-example-live #submit')).click();
+ element(by.css('.doc-example-live #submit')).click();
+ expect(element(by.binding('list')).getText()).toContain('hello');
+ });
+ </doc:protractor>
</doc:example>
*/