Skip to content

Commit

Permalink
Try fixing goldens.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas-Sander committed Feb 26, 2024
1 parent 643f3c7 commit f1d5fb2
Showing 1 changed file with 21 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,13 @@ void main() {
final dt = createDialogTester(tester);
dt.addCourse(courseWith(id: 'fooId', name: 'Foo course'));

await dt.pumpDialog(
isExam: testConfig.isExam,
theme: testConfig.theme.data,
);
await withClock(Clock.fixed(DateTime(2022, 1, 1)), () async {
await dt.pumpDialog(
isExam: testConfig.isExam,
theme: testConfig.theme.data,
);
});

await multiScreenGolden(
tester,
'event_dialog_add_empty_${testConfig.theme.name}_${testConfig.isExam ? 'exam' : 'event'}',
Expand All @@ -74,10 +77,13 @@ void main() {
final dt = createDialogTester(tester);
dt.addCourse(courseWith(id: 'fooId', name: 'Foo course'));

await dt.pumpDialog(
isExam: testConfig.isExam,
theme: testConfig.theme.data,
);
await withClock(Clock.fixed(DateTime(2022, 1, 1)), () async {
await dt.pumpDialog(
isExam: testConfig.isExam,
theme: testConfig.theme.data,
);
});

await dt.enterTitle('Test title');
await dt.selectCourse('Foo course');
await withClock(
Expand All @@ -102,10 +108,13 @@ void main() {
'renders error event dialog as expected (${testConfig.theme.name}, isExam: ${testConfig.isExam})',
(tester) async {
final dt = createDialogTester(tester);
await dt.pumpDialog(
isExam: testConfig.isExam,
theme: testConfig.theme.data,
);

await withClock(Clock.fixed(DateTime(2022, 1, 1)), () async {
await dt.pumpDialog(
isExam: testConfig.isExam,
theme: testConfig.theme.data,
);
});

// Set end time before start time.
await dt.selectStartTime(const TimeOfDay(hour: 12, minute: 0));
Expand Down

0 comments on commit f1d5fb2

Please sign in to comment.