Skip to content

Commit

Permalink
Add tests for years and months new feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Mehdi Chamouma authored and Mehdi Chamouma committed May 17, 2014
1 parent d925633 commit f67f667
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ <h3>countdown Time Display according to specified max Time Unit</h3>
</p>
<p class="muted">countdown Time with max time unit option - year</p>
<h3 class="WithMaxTimeUnitAsYear">
<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>
<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>
</h3>
<p class="muted">countdown Time with max time unit option - minute</p>
<h3 class="WithMaxTimeUnitAsMinute">
Expand Down
7 changes: 7 additions & 0 deletions test/e2e/scenarios.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,13 @@ describe('Angular Timer E2E Tests', function () {
expect({'timerText': timer2Val, 'unit': 'minutes', 'compareTo': 'EqualTo'}).toCompareWith(0);
expect({'timerText': timer2Val, 'unit': 'seconds', 'compareTo': 'GreaterThan'}).toCompareWith(59);

var timer3Val = element('#max-time-unit-countdown-timer .WithMaxTimeUnitAsYear timer').text();
expect({'timerText': timer3Val, 'unit': 'seconds', 'compareTo': 'LessThan'}).toCompareWith(60);
expect({'timerText': timer3Val, 'unit': 'minutes', 'compareTo': 'LessThan'}).toCompareWith(60);
expect({'timerText': timer3Val, 'unit': 'hours', 'compareTo': 'LessThan'}).toCompareWith(24);
expect({'timerText': timer3Val, 'unit': 'days', 'compareTo': 'LessThan'}).toCompareWith(30);
expect({'timerText': timer3Val, 'unit': 'months', 'compareTo': 'LessThan'}).toCompareWith(12);

});

});

0 comments on commit f67f667

Please sign in to comment.