Skip to content

Commit f67f667

Browse files
Mehdi ChamoumaMehdi Chamouma
authored andcommitted
Add tests for years and months new feature
1 parent d925633 commit f67f667

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ <h3>countdown Time Display according to specified max Time Unit</h3>
195195
</p>
196196
<p class="muted">countdown Time with max time unit option - year</p>
197197
<h3 class="WithMaxTimeUnitAsYear">
198-
<timer end-time="1451606400000" max-time-unit="'year'">{{yyears}} year{{yearsS}}, {{mmonths}} month{{monthsS}}, {{ddays}} day{{daysS}}, {{hhours}} hour{{hoursS}}, {{mminutes}} minute{{minutesS}}, {{sseconds}} second{{secondsS}}</timer>
198+
<timer countdown="100410000" max-time-unit="'year'" interval="1000">{{yyears}} year{{yearsS}}, {{mmonths}} month{{monthsS}}, {{ddays}} day{{daysS}}, {{hhours}} hour{{hoursS}}, {{mminutes}} minute{{minutesS}}, {{sseconds}} second{{secondsS}}</timer>
199199
</h3>
200200
<p class="muted">countdown Time with max time unit option - minute</p>
201201
<h3 class="WithMaxTimeUnitAsMinute">

test/e2e/scenarios.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,13 @@ describe('Angular Timer E2E Tests', function () {
153153
expect({'timerText': timer2Val, 'unit': 'minutes', 'compareTo': 'EqualTo'}).toCompareWith(0);
154154
expect({'timerText': timer2Val, 'unit': 'seconds', 'compareTo': 'GreaterThan'}).toCompareWith(59);
155155

156+
var timer3Val = element('#max-time-unit-countdown-timer .WithMaxTimeUnitAsYear timer').text();
157+
expect({'timerText': timer3Val, 'unit': 'seconds', 'compareTo': 'LessThan'}).toCompareWith(60);
158+
expect({'timerText': timer3Val, 'unit': 'minutes', 'compareTo': 'LessThan'}).toCompareWith(60);
159+
expect({'timerText': timer3Val, 'unit': 'hours', 'compareTo': 'LessThan'}).toCompareWith(24);
160+
expect({'timerText': timer3Val, 'unit': 'days', 'compareTo': 'LessThan'}).toCompareWith(30);
161+
expect({'timerText': timer3Val, 'unit': 'months', 'compareTo': 'LessThan'}).toCompareWith(12);
162+
156163
});
157164

158165
});

0 commit comments

Comments
 (0)