Skip to content

Commit 07a5b41

Browse files
committed
WIP - e2e testing
1 parent 284d9f2 commit 07a5b41

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

test/e2e/scenarios.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,29 @@
33
/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */
44
describe('Angular Timer E2E Tests', function () {
55

6+
angular.scenario.dsl('value', function() {
7+
return function(value) {
8+
return this.addFuture('value to future', function(done) {
9+
done(null, value);
10+
});
11+
};
12+
});
13+
614
beforeEach(function () {
715
browser().navigateTo('/index.html');
816
});
917

1018
it("Simple Timer - Should stop ticking when user clicks 'Stop' button", function () {
1119
sleep(1);
1220
element('#basic-timer button:last-child').click();
13-
var originalValue = null, currentValue = null;
21+
var originalValue = null;
1422
element('#basic-timer span').query(function (span, done) {
1523
originalValue = span.html();
16-
console.log('##### originalValue', originalValue);
1724
done();
1825
});
1926
sleep(1);
2027
element('#basic-timer span').query(function (span, done) {
21-
currentValue = span.html();
22-
console.log('##### currentValue', currentValue);
28+
expect(value(originalValue)).toBe(span.html());
2329
done();
2430
});
2531
});

0 commit comments

Comments
 (0)