fix(ci): update timeline toolbar assertions and generated provider
Gitea CI / Check code and tests (pull_request) Successful in 8m39s
Gitea CI / Audit and package Windows x64 (pull_request) Canceled after 0s
Gitea CI / Assemble and validate CI artifacts (pull_request) Canceled after 0s
Gitea CI / Build Windows x64 app (pull_request) Canceled after 2m40s
Gitea CI / Build Android APK (pull_request) Canceled after 2m40s
Gitea CI / Gitea CI passed (pull_request) Failing after 17s

This commit is contained in:
lingjhf committed 2026-10-07 16:34:01 +08:00
1 parent 4f746be301
commit e345c81af7
2 files changed
+13 -2

No files matched your search

+1 -1
View File
@@ -33,7 +33,7 @@ final class ProjectsProvider
Projects create() => Projects(); Projects create() => Projects();
} }
String _$projectsHash() => r'89495fb433ac9e5d066f0882599598fb2e0a4e54'; String _$projectsHash() => r'ecadd6625f90f179184942fe492eac7edb6e21c6';
abstract class _$Projects extends $AsyncNotifier<ProjectState> { abstract class _$Projects extends $AsyncNotifier<ProjectState> {
FutureOr<ProjectState> build(); FutureOr<ProjectState> build();
+12 -1
View File
@@ -3608,7 +3608,12 @@ void main() {
of: find.byKey(const Key('timeline-toolbar')), of: find.byKey(const Key('timeline-toolbar')),
matching: find.byType(IconButton), matching: find.byType(IconButton),
); );
expect(toolbarButtons, findsNWidgets(6)); expect(toolbarButtons, findsNWidgets(7));
final fitButton = find.byKey(const ValueKey('timeline-fit'));
expect(
tester.widget<IconButton>(fitButton).tooltip,
localized.fitTimeline,
);
final toolbarBounds = tester.getRect( final toolbarBounds = tester.getRect(
find.byKey(const Key('timeline-toolbar')), find.byKey(const Key('timeline-toolbar')),
); );
@@ -3620,7 +3625,9 @@ void main() {
final bounds = tester.getRect( final bounds = tester.getRect(
find.byElementPredicate((e) => e == button), find.byElementPredicate((e) => e == button),
); );
if (button.widget.key != const ValueKey('timeline-fit')) {
buttonBounds.add(bounds); buttonBounds.add(bounds);
}
expect( expect(
bounds.size, bounds.size,
const Size(AppControlSize.headerButton, AppControlSize.headerButton), const Size(AppControlSize.headerButton, AppControlSize.headerButton),
@@ -3628,6 +3635,10 @@ void main() {
expect((button.widget as IconButton).iconSize, AppIconSize.header); expect((button.widget as IconButton).iconSize, AppIconSize.header);
} }
expect(buttonBounds.first.left - panelBounds.left, AppSpacing.gap); expect(buttonBounds.first.left - panelBounds.left, AppSpacing.gap);
expect(
panelBounds.right - tester.getRect(fitButton).right,
AppSpacing.gap,
);
for (var i = 1; i < buttonBounds.length; i++) { for (var i = 1; i < buttonBounds.length; i++) {
expect( expect(
buttonBounds[i].left - buttonBounds[i - 1].right, buttonBounds[i].left - buttonBounds[i - 1].right,