feat(client): 登录屏离线提示条 token 化 + 整屏 golden ×三主题
服务器不可达提示条 FFF8E1/F57F17/5D4037 → warnBg/warn; 品牌 hero + 表单整屏 golden 入回归闸(覆盖联网首检避免 Timer 泄漏)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TSKEiHsvauyxYUW2itzUXX
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 45 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 57 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
@@ -0,0 +1,27 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:jiu_client/providers/connectivity_provider.dart';
|
||||
import 'package:jiu_client/screens/auth/login_screen.dart';
|
||||
|
||||
import '../support/golden_harness.dart';
|
||||
|
||||
/// design-distill 阶段4:登录屏 golden × 三主题(品牌 hero + 表单)。
|
||||
/// 锁住品牌 hero、表单、离线提示条(已 token 化)随主题换色。
|
||||
/// 更新基准:flutter test --update-goldens test/golden/login_golden_test.dart
|
||||
void main() {
|
||||
TestWidgetsFlutterBinding.ensureInitialized();
|
||||
SharedPreferences.setMockInitialValues({});
|
||||
|
||||
goldenAcrossThemes(
|
||||
'login 整屏',
|
||||
goldenPrefix: 'login',
|
||||
child: () => const LoginScreen(),
|
||||
overrides: () => [
|
||||
// 跳过联网首检,避免后台 Timer 在 golden 结束后仍 pending
|
||||
connectivityProvider.overrideWith((ref) => ConnectivityNotifier(skipInit: true)),
|
||||
],
|
||||
logical: const Size(1280, 860),
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user