Skip to content

Commit

Permalink
TW-1902: Update unit test for date time
Browse files Browse the repository at this point in the history
  • Loading branch information
nqhhdev authored and hoangdat committed Sep 18, 2024
1 parent cf9f7fb commit 5fae280
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/utils/date_time_extension_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void main() async {
testWidgets(
'GIVEN the date time to display is Monday of current week\n'
'THEN should display the Monday\n', (WidgetTester tester) async {
const expectedDisplayText = 'Monday';
const expectedDisplayText = 'Mon';
final currentTime = DateTime(2022, 1, 1);
final timeToTest = DateTime(2021, 12, 27, 12, 5);

Expand Down Expand Up @@ -105,7 +105,7 @@ void main() async {
testWidgets(
'GIVEN the date time to display is Tuesday of current week\n'
'THEN should display Tuesday\n', (WidgetTester tester) async {
const expectedDisplayText = 'Tuesday';
const expectedDisplayText = 'Tue';
final currentTime = DateTime(2022, 1, 1);
final timeToTest = DateTime(2021, 12, 28, 12, 5);

Expand Down Expand Up @@ -146,7 +146,7 @@ void main() async {
testWidgets(
'GIVEN the date time to display is Wednesday of current week\n'
'THEN should display Wednesday\n', (WidgetTester tester) async {
const expectedDisplayText = 'Wednesday';
const expectedDisplayText = 'Wed';
final currentTime = DateTime(2022, 1, 1);
final timeToTest = DateTime(2021, 12, 29, 12, 5);

Expand Down Expand Up @@ -187,7 +187,7 @@ void main() async {
testWidgets(
'GIVEN the date time to display is Thursday of current week\n'
'THEN should display Thursday\n', (WidgetTester tester) async {
const expectedDisplayText = 'Thursday';
const expectedDisplayText = 'Thu';
final currentTime = DateTime(2022, 1, 1);
final timeToTest = DateTime(2021, 12, 30, 12, 5);

Expand Down Expand Up @@ -228,7 +228,7 @@ void main() async {
testWidgets(
'GIVEN the date time to display is Friday of current week\n'
'THEN should display Friday\n', (WidgetTester tester) async {
const expectedDisplayText = 'Friday';
const expectedDisplayText = 'Fri';
final currentTime = DateTime(2022, 1, 1);
final timeToTest = DateTime(2021, 12, 31, 12, 5);

Expand Down Expand Up @@ -269,7 +269,7 @@ void main() async {
testWidgets(
'GIVEN the date time to display is Saturday of current week\n'
'THEN should display Saturday\n', (WidgetTester tester) async {
const expectedDisplayText = 'Saturday';
const expectedDisplayText = 'Sat';
final currentTime = DateTime(2024, 2, 25);
final timeToTest = DateTime(2024, 2, 24, 12, 5);

Expand Down Expand Up @@ -310,7 +310,7 @@ void main() async {
testWidgets(
'GIVEN the date time to display is Sunday of current week\n'
'THEN should display Sunday\n', (WidgetTester tester) async {
const expectedDisplayText = 'Sunday';
const expectedDisplayText = 'Sun';
final currentTime = DateTime(2022, 1, 1);
final timeToTest = DateTime(2022, 1, 2, 12, 5);

Expand Down Expand Up @@ -352,7 +352,7 @@ void main() async {
'GIVEN the current time is Sunday\n'
'AND the date time to display is Friday of current week\n'
'THEN should display Friday\n', (WidgetTester tester) async {
const expectedDisplayText = 'Friday';
const expectedDisplayText = 'Fri';
final currentTime = DateTime(2024, 3, 3);
final timeToTest = DateTime(2024, 3, 1, 12, 5);

Expand Down Expand Up @@ -394,7 +394,7 @@ void main() async {
'GIVEN the current time is Sunday\n'
'AND the date time to display is Saturday of current week\n'
'THEN should display Saturday\n', (WidgetTester tester) async {
const expectedDisplayText = 'Saturday';
const expectedDisplayText = 'Sat';
final currentTime = DateTime(2024, 3, 3);
final timeToTest = DateTime(2024, 3, 2, 12, 5);

Expand Down

0 comments on commit 5fae280

Please sign in to comment.