feat(test): add e2e tests for benchmarks and examples

Disables running the actual benchmarks on every commit as well
to speed up the build.
This commit is contained in:
Tobias Bosch
2015-01-08 10:02:23 -08:00
parent 8c6527251b
commit 14e91e209e
14 changed files with 232 additions and 4 deletions
@@ -0,0 +1,30 @@
var benchpress = require('../../../../tools/benchpress/index.js');
describe('hello world', function () {
afterEach(benchpress.verifyNoBrowserErrors);
describe('static reflection', function() {
var URL = 'examples/web/hello_world/index_static.html';
it('should greet', function() {
browser.get(URL);
expect(getShadowText('hello-app')).toBe('hello world!');
});
});
describe('dynamic reflection', function() {
var URL = 'examples/web/hello_world/index.html';
it('should greet', function() {
browser.get(URL);
expect(getShadowText('hello-app')).toBe('hello world!');
});
});
});
function getShadowText(selector) {
return browser.executeScript('return document.querySelector("'+selector+'").shadowRoot.textContent');
}