chore: sync current workspace to dev

This commit is contained in:
qzl
2026-02-24 18:18:42 +08:00
parent 105cf82d21
commit 08571cfc95
79 changed files with 1899 additions and 844 deletions
+29
View File
@@ -0,0 +1,29 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:social_app/main.dart';
void main() {
testWidgets('Login screen loads correctly', (WidgetTester tester) async {
await tester.pumpWidget(const LinksyApp());
expect(find.text('linksy'), findsOneWidget);
expect(find.text('继续'), findsOneWidget);
expect(find.text('还没有账号?去注册'), findsOneWidget);
});
testWidgets('Main content is vertically centered above footer', (
WidgetTester tester,
) async {
await tester.pumpWidget(const LinksyApp());
final safeAreaRect = tester.getRect(find.byType(SafeArea));
final mainRect = tester.getRect(
find.byKey(const Key('login_main_content')),
);
final footerRect = tester.getRect(find.byKey(const Key('login_footer')));
final topSpace = mainRect.top - safeAreaRect.top;
final bottomSpace = footerRect.top - mainRect.bottom;
expect((topSpace - bottomSpace).abs(), lessThanOrEqualTo(2));
});
}