From 0e85ca9ddb5f259908400463764fd6141977b341 Mon Sep 17 00:00:00 2001 From: Julie Date: Thu, 30 Jan 2014 18:49:58 -0800 Subject: chore(testing): run end to end tests on firefox and safari as well as chrome Update the Travis and Jenkins configs to run protractor tests on Safari and Firefox as well, and make the Travis tests run output XML and turn off color. Fix tests which were failing in Firefox due to clear() not working as expected. Fix tests which were failing in Safari due to SafariDriver not understanding the minus key, and disable tests which SafariDriver has no support for. --- src/ng/directive/input.js | 8 +++++++- src/ng/directive/ngInclude.js | 9 +++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'src/ng/directive') 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', 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); -- cgit v1.2.3