diff options
Diffstat (limited to 'src/ng')
| -rw-r--r-- | src/ng/directive/input.js | 8 | ||||
| -rw-r--r-- | src/ng/directive/ngInclude.js | 9 | ||||
| -rw-r--r-- | src/ng/filter/filters.js | 8 |
3 files changed, 22 insertions, 3 deletions
diff --git a/src/ng/directive/input.js b/src/ng/directive/input.js index 85d0f22d..27813a46 100644 --- a/src/ng/directive/input.js +++ b/src/ng/directive/input.js @@ -955,11 +955,17 @@ var VALID_CLASS = 'ng-valid', </file> <file name="protractorTest.js"> it('should data-bind and become invalid', function() { + if (browser.params.browser = 'safari') { + // SafariDriver can't handle contenteditable. + return; + }; var contentEditable = element(by.css('.doc-example-live [contenteditable]')); expect(contentEditable.getText()).toEqual('Change me!'); - contentEditable.clear(); + // Firefox driver doesn't trigger the proper events on 'clear', so do this hack + contentEditable.click(); + contentEditable.sendKeys(protractor.Key.chord(protractor.Key.COMMAND, "a")); contentEditable.sendKeys(protractor.Key.BACK_SPACE); expect(contentEditable.getText()).toEqual(''); diff --git a/src/ng/directive/ngInclude.js b/src/ng/directive/ngInclude.js index 4935edd4..b559b576 100644 --- a/src/ng/directive/ngInclude.js +++ b/src/ng/directive/ngInclude.js @@ -119,12 +119,21 @@ }); it('should load template2.html', function() { + if (browser.params.browser == 'firefox') { + // Firefox can't handle using selects + // See https://github.com/angular/protractor/issues/480 + return; + } templateSelect.click(); templateSelect.element.all(by.css('option')).get(2).click(); expect(includeElem.getText()).toMatch(/Content of template2.html/); }); it('should change to blank', function() { + if (browser.params.browser == 'firefox') { + // Firefox can't handle using selects + return; + } templateSelect.click(); templateSelect.element.all(by.css('option')).get(0).click(); expect(includeElem.isPresent()).toBe(false); diff --git a/src/ng/filter/filters.js b/src/ng/filter/filters.js index 63ea270c..f655c7a6 100644 --- a/src/ng/filter/filters.js +++ b/src/ng/filter/filters.js @@ -34,9 +34,13 @@ expect(element(by.binding('amount | currency:"USD$"')).getText()).toBe('USD$1,234.56'); }); it('should update', function() { + if (browser.params.browser == 'safari') { + // Safari does not understand the minus key. See + // https://github.com/angular/protractor/issues/481 + return; + } element(by.model('amount')).clear(); - element(by.model('amount')).sendKeys('-1234'); - expect(element(by.id('currency-default')).getText()).toBe('($1,234.00)'); + element(by.model('amount')).sendKeys('-1234'); expect(element(by.id('currency-default')).getText()).toBe('($1,234.00)'); expect(element(by.binding('amount | currency:"USD$"')).getText()).toBe('(USD$1,234.00)'); }); </doc:protractor> |
