Skip to content

Commit 5fa54a9

Browse files
hankduantbosch
authored andcommitted
chore(benchpress): add ff extension test to ci
Closes angular#2229
1 parent ba7956f commit 5fa54a9

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

modules/benchpress/test/firefox_extension/conf.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ var testHelper = require('../../src/firefox_extension/lib/test_helper.js');
55
var PROFILE_SAVE_PATH = './perfProfile.json';
66

77
exports.config = {
8-
seleniumAddress: 'http://127.0.0.1:4444/wd/hub',
9-
108
specs: ['spec.js'],
119

1210
getMultiCapabilities: function() { return testHelper.getFirefoxProfileWithExtension(); },

modules/benchpress/test/firefox_extension/spec.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ var fs = require('fs');
77
var validateFile = function() {
88
try {
99
var content = fs.readFileSync(browser.params.profileSavePath, 'utf8');
10-
// TODO(hankduan): This check not very useful. Ideally we want to validate
11-
// that the file contains all the events that we are looking for. Pending
12-
// on data transformer.
10+
// TODO(hankduan): This check is not very useful. Ideally we want to
11+
// validate that the file contains all the events that we are looking for.
12+
// Pending on data transformer.
1313
expect(content).toContain('forceGC');
1414
// Delete file
1515
fs.unlinkSync(browser.params.profileSavePath);
@@ -25,22 +25,18 @@ var validateFile = function() {
2525
};
2626

2727
describe('firefox extension', function() {
28+
var TEST_URL = 'http://localhost:8001/examples/src/hello_world/index.html';
29+
2830
it('should measure performance', function() {
2931
browser.sleep(3000); // wait for extension to load
3032

31-
browser.driver.get('http://www.angularjs.org');
33+
browser.driver.get(TEST_URL);
3234

3335
browser.executeScript('window.startProfiler()')
3436
.then(function() { console.log('started measuring perf'); });
3537

3638
browser.executeScript('window.forceGC()');
3739

38-
// Run some commands
39-
element(by.model('yourName')).sendKeys('Hank');
40-
expect(element(by.binding('yourName')).getText()).toEqual('Hello Hank!');
41-
42-
browser.executeScript('window.forceGC()');
43-
4440
var script = 'window.stopAndRecord("' + browser.params.profileSavePath + '")';
4541
browser.executeScript(script).then(function() { console.log('stopped measuring perf'); });
4642

scripts/ci/test_e2e_js.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,5 @@ fi
3030

3131
./node_modules/.bin/protractor protractor-js.conf.js $OPTIONS
3232
./node_modules/.bin/protractor protractor-js.conf.js $OPTIONS --benchmark --dryrun
33+
./node_modules/.bin/protractor dist/js/cjs/benchpress/test/firefox_extension/conf.js
34+

0 commit comments

Comments
 (0)