diff options
| author | Julie | 2014-01-30 18:49:58 -0800 | 
|---|---|---|
| committer | Igor Minar | 2014-02-05 15:39:59 -0800 | 
| commit | 0e85ca9ddb5f259908400463764fd6141977b341 (patch) | |
| tree | 88f0a17d6e1830a75c4c80451e7a84e559c95b2f /src | |
| parent | e7face4728d3aed6dc089966d489d0c93b65913d (diff) | |
| download | angular.js-0e85ca9ddb5f259908400463764fd6141977b341.tar.bz2 | |
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.
Diffstat (limited to 'src')
| -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> | 
