Skip to content

Commit 284d9f2

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

File tree

3 files changed

+21865
-18236
lines changed

3 files changed

+21865
-18236
lines changed

test/e2e/scenarios.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,25 @@ describe('Angular Timer E2E Tests', function () {
1010
it("Simple Timer - Should stop ticking when user clicks 'Stop' button", function () {
1111
sleep(1);
1212
element('#basic-timer button:last-child').click();
13-
var oldValue = element('#basic-timer span').text();
13+
var originalValue = null, currentValue = null;
14+
element('#basic-timer span').query(function (span, done) {
15+
originalValue = span.html();
16+
console.log('##### originalValue', originalValue);
17+
done();
18+
});
1419
sleep(1);
15-
expect( element('#basic-timer span').text() ).toBe( oldValue );
20+
element('#basic-timer span').query(function (span, done) {
21+
currentValue = span.html();
22+
console.log('##### currentValue', currentValue);
23+
done();
24+
});
1625
});
1726

1827
it('Simple Timer - Should reset timer value when user click on start button again', function () {
1928
sleep(1);
2029
var oldValue = element('#basic-timer span').text();
2130
element('#basic-timer button:nth-child(3)').click();
2231
element('#basic-timer button:last-child').click();
23-
expect( element('#basic-timer span').text() ).toBeLessThan( oldValue );
32+
expect(element('#basic-timer span').text()).toBeLessThan(oldValue);
2433
});
2534
});

0 commit comments

Comments
 (0)