Skip to content

Commit e3d67ae

Browse files
author
Allen Kim
committed
e2e test refactoring
1 parent 768ce9b commit e3d67ae

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

spec/e2e/testapp_spec.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe('testapp directory', function() {
2323
var files = require('fs').readdirSync(__dirname + "/../../testapp");
2424
files = files.filter(function(filename) {
2525
return filename.match(/\.html$/) && excludes.indexOf(filename) === -1;
26-
});
26+
}).splice(0,2);
2727

2828
var urls = {};
2929
for (var i=0;i<files.length; i++) {
@@ -33,14 +33,21 @@ describe('testapp directory', function() {
3333
}
3434
console.log('urls', urls);
3535

36+
afterEach(function() {
37+
browser.manage().logs().get('browser').then(function(browserLog) {
38+
expect(browserLog.length).toEqual(0);
39+
browserLog.length && console.log(JSON.stringify(browserLog));
40+
});
41+
});
42+
3643
for (var key in urls) {
3744
using(urls[key], function(url){
3845
it('testapp/'+url, function() {
3946
browser.get('testapp/'+url);
4047

4148
browser.wait( function() {
4249
return browser.executeScript( function() {
43-
var el = document.querySelector("ng-map");
50+
var el = document.querySelector("ng-map");
4451
var injector = angular.element(el).injector();
4552
var NgMap = injector.get('NgMap');
4653
return NgMap.getMap();

0 commit comments

Comments
 (0)