chore(e2e): update protractor to 1.0.0-rc2 and add more logging

Use the new options from the reporter to add more logging to end to end tests,
and increase the Jasmine test timeout from 30 seconds to 60 seconds to allow for
legitimately long-lasting tests.
This commit is contained in:
Julie Ralph
2014-07-02 14:09:10 -07:00
parent 816b84230c
commit bce5b49133
10 changed files with 138 additions and 34 deletions
+1 -1
View File
@@ -82,7 +82,7 @@ You can try evaluating different expressions here:
<file name="protractor.js" type="protractor">
it('should allow user expression testing', function() {
element(by.css('.expressions button')).click();
var lis = element(by.css('.expressions ul')).element.all(by.repeater('expr in exprs'));
var lis = element(by.css('.expressions ul')).all(by.repeater('expr in exprs'));
expect(lis.count()).toBe(1);
expect(lis.get(0).getText()).toEqual('[ X ] 3*10|currency => $30.00');
});
+106 -3
View File
@@ -2690,13 +2690,100 @@
}
},
"protractor": {
"version": "0.19.0",
"version": "1.0.0-rc2",
"dependencies": {
"request": {
"version": "2.36.0",
"dependencies": {
"qs": {
"version": "0.6.6"
},
"json-stringify-safe": {
"version": "5.0.0"
},
"mime": {
"version": "1.2.11"
},
"forever-agent": {
"version": "0.5.2"
},
"node-uuid": {
"version": "1.4.1"
},
"tough-cookie": {
"version": "0.12.1",
"dependencies": {
"punycode": {
"version": "1.2.4"
}
}
},
"form-data": {
"version": "0.1.4",
"dependencies": {
"combined-stream": {
"version": "0.0.5",
"dependencies": {
"delayed-stream": {
"version": "0.0.5"
}
}
},
"async": {
"version": "0.9.0"
}
}
},
"tunnel-agent": {
"version": "0.4.0"
},
"http-signature": {
"version": "0.10.0",
"dependencies": {
"assert-plus": {
"version": "0.1.2"
},
"asn1": {
"version": "0.1.11"
},
"ctype": {
"version": "0.5.2"
}
}
},
"oauth-sign": {
"version": "0.3.0"
},
"hawk": {
"version": "1.0.0",
"dependencies": {
"hoek": {
"version": "0.9.1"
},
"boom": {
"version": "0.4.2"
},
"cryptiles": {
"version": "0.2.2"
},
"sntp": {
"version": "0.2.4"
}
}
},
"aws-sign2": {
"version": "0.5.0"
}
}
},
"selenium-webdriver": {
"version": "2.39.0"
"version": "2.42.1"
},
"minijasminenode": {
"version": "0.2.7"
"version": "1.1.1"
},
"jasminewd": {
"version": "1.0.3"
},
"saucelabs": {
"version": "0.1.1"
@@ -2733,6 +2820,22 @@
"version": "0.0.8"
}
}
},
"lodash": {
"version": "2.4.1"
},
"source-map-support": {
"version": "0.2.6",
"dependencies": {
"source-map": {
"version": "0.1.32",
"dependencies": {
"amdefine": {
"version": "0.1.0"
}
}
}
}
}
}
},
+1 -1
View File
@@ -33,7 +33,7 @@
"karma-sauce-launcher": "0.2.0",
"karma-script-launcher": "0.1.0",
"karma-browserstack-launcher": "0.0.7",
"protractor": "~0.19.0",
"protractor": "1.0.0-rc2",
"yaml-js": "~0.0.8",
"rewire": "1.1.3",
"promises-aplus-tests": "~1.3.2",
+2 -1
View File
@@ -22,6 +22,7 @@ exports.config = {
},
jasmineNodeOpts: {
defaultTimeoutInterval: 30000
defaultTimeoutInterval: 60000,
showTiming: true
}
};
+20 -20
View File
@@ -103,29 +103,29 @@
* <file name="protractor.js" type="protractor">
* it('should check controller as', function() {
* var container = element(by.id('ctrl-as-exmpl'));
* expect(container.findElement(by.model('settings.name'))
* expect(container.element(by.model('settings.name'))
* .getAttribute('value')).toBe('John Smith');
*
* var firstRepeat =
* container.findElement(by.repeater('contact in settings.contacts').row(0));
* container.element(by.repeater('contact in settings.contacts').row(0));
* var secondRepeat =
* container.findElement(by.repeater('contact in settings.contacts').row(1));
* container.element(by.repeater('contact in settings.contacts').row(1));
*
* expect(firstRepeat.findElement(by.model('contact.value')).getAttribute('value'))
* expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))
* .toBe('408 555 1212');
*
* expect(secondRepeat.findElement(by.model('contact.value')).getAttribute('value'))
* expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))
* .toBe('john.smith@example.org');
*
* firstRepeat.findElement(by.linkText('clear')).click();
* firstRepeat.element(by.linkText('clear')).click();
*
* expect(firstRepeat.findElement(by.model('contact.value')).getAttribute('value'))
* expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))
* .toBe('');
*
* container.findElement(by.linkText('add')).click();
* container.element(by.linkText('add')).click();
*
* expect(container.findElement(by.repeater('contact in settings.contacts').row(2))
* .findElement(by.model('contact.value'))
* expect(container.element(by.repeater('contact in settings.contacts').row(2))
* .element(by.model('contact.value'))
* .getAttribute('value'))
* .toBe('yourname@example.org');
* });
@@ -184,28 +184,28 @@
* it('should check controller', function() {
* var container = element(by.id('ctrl-exmpl'));
*
* expect(container.findElement(by.model('name'))
* expect(container.element(by.model('name'))
* .getAttribute('value')).toBe('John Smith');
*
* var firstRepeat =
* container.findElement(by.repeater('contact in contacts').row(0));
* container.element(by.repeater('contact in contacts').row(0));
* var secondRepeat =
* container.findElement(by.repeater('contact in contacts').row(1));
* container.element(by.repeater('contact in contacts').row(1));
*
* expect(firstRepeat.findElement(by.model('contact.value')).getAttribute('value'))
* expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))
* .toBe('408 555 1212');
* expect(secondRepeat.findElement(by.model('contact.value')).getAttribute('value'))
* expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))
* .toBe('john.smith@example.org');
*
* firstRepeat.findElement(by.linkText('clear')).click();
* firstRepeat.element(by.linkText('clear')).click();
*
* expect(firstRepeat.findElement(by.model('contact.value')).getAttribute('value'))
* expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))
* .toBe('');
*
* container.findElement(by.linkText('add')).click();
* container.element(by.linkText('add')).click();
*
* expect(container.findElement(by.repeater('contact in contacts').row(2))
* .findElement(by.model('contact.value'))
* expect(container.element(by.repeater('contact in contacts').row(2))
* .element(by.model('contact.value'))
* .getAttribute('value'))
* .toBe('yourname@example.org');
* });
+1 -1
View File
@@ -339,7 +339,7 @@ forEach(
expect(element(by.binding('list')).getText()).toBe('list=[]');
element(by.css('#submit')).click();
expect(element(by.binding('list')).getText()).toContain('hello');
expect(element(by.input('text')).getAttribute('value')).toBe('');
expect(element(by.model('text')).getAttribute('value')).toBe('');
});
it('should ignore empty strings', function() {
expect(element(by.binding('list')).getText()).toBe('list=[]');
+2 -2
View File
@@ -125,7 +125,7 @@
return;
}
templateSelect.click();
templateSelect.element.all(by.css('option')).get(2).click();
templateSelect.all(by.css('option')).get(2).click();
expect(includeElem.getText()).toMatch(/Content of template2.html/);
});
@@ -135,7 +135,7 @@
return;
}
templateSelect.click();
templateSelect.element.all(by.css('option')).get(0).click();
templateSelect.all(by.css('option')).get(0).click();
expect(includeElem.isPresent()).toBe(false);
});
</file>
+2 -2
View File
@@ -117,11 +117,11 @@
expect(switchElem.getText()).toMatch(/Settings Div/);
});
it('should change to home', function() {
select.element.all(by.css('option')).get(1).click();
select.all(by.css('option')).get(1).click();
expect(switchElem.getText()).toMatch(/Home Span/);
});
it('should select default', function() {
select.element.all(by.css('option')).get(2).click();
select.all(by.css('option')).get(2).click();
expect(switchElem.getText()).toMatch(/default/);
});
</file>
+1 -1
View File
@@ -123,7 +123,7 @@ var ngOptionsMinErr = minErr('ngOptions');
<file name="protractor.js" type="protractor">
it('should check ng-options', function() {
expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('red');
element.all(by.select('myColor')).first().click();
element.all(by.model('myColor')).first().click();
element.all(by.css('select[ng-model="myColor"] option')).first().click();
expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('black');
element(by.css('.nullable select[ng-model="myColor"]')).click();
+2 -2
View File
@@ -4,7 +4,7 @@ describe('docs.angularjs.org', function () {
// browser.get();
// browser.waitForAngular();
// var search = element(by.input('q'));
// var search = element(by.model('q'));
// search.clear();
// search.sendKeys('ngBind');
@@ -32,7 +32,7 @@ describe('docs.angularjs.org', function () {
browser.switchTo().frame('example-input-directive');
var nameInput = element(by.input('user.name'));
var nameInput = element(by.model('user.name'));
nameInput.sendKeys('!!!');
var code = element(by.css('tt'));