test: guard removed mobile and web ui shims
This commit is contained in:
parent
ef5222b4d1
commit
6472c7157b
@ -11,8 +11,8 @@
|
||||
- `lib/widgets/assistant_focus_panel_core.dart`
|
||||
- `lib/widgets/assistant_focus_panel_previews.dart`
|
||||
- `lib/widgets/assistant_focus_panel_support.dart`
|
||||
- Web 侧旧的 `web_focus_panel_core.dart`、`web_focus_panel_previews.dart`、`web_focus_panel_support.dart` 已不再存在。
|
||||
- 本轮进一步移除了 `lib/web/web_focus_panel.dart` 这一层兼容导出,Web Assistant 侧不再保留旧入口。
|
||||
- Web 侧旧 Focus Panel 副本与兼容入口已全部删除。
|
||||
- Web Assistant 侧已直接依赖共享 Focus Panel 实现。
|
||||
|
||||
## 验收关注点
|
||||
|
||||
|
||||
@ -55,11 +55,7 @@
|
||||
|
||||
说明:
|
||||
|
||||
- `web_focus_panel_core.dart`
|
||||
- `web_focus_panel_previews.dart`
|
||||
- `web_focus_panel_support.dart`
|
||||
|
||||
这三份旧 Web Focus Panel 副本已经不再存在,不再列入候选池。
|
||||
- 旧 Web Focus Panel 副本已经删除,不再列入候选池。
|
||||
|
||||
---
|
||||
|
||||
@ -68,7 +64,7 @@
|
||||
### 第一批:已完成
|
||||
|
||||
- Web Focus Panel 共享化已收口到 `lib/widgets/assistant_focus_panel*.dart`
|
||||
- Web Assistant 不再通过单独的 `web_focus_panel.dart` 兼容壳间接引用共享组件
|
||||
- Web Assistant 已直接引用共享 Focus Panel 实现,不再保留旧兼容入口
|
||||
|
||||
### 第二批:已完成公共壳层收口
|
||||
|
||||
@ -82,12 +78,12 @@ Desktop 与 Web 设置页当前已共用:
|
||||
|
||||
### 第三批:本轮完成
|
||||
|
||||
- `IosMobileShell` 兼容壳删除后,以 `MobileShell` 作为唯一正式入口
|
||||
- 旧 iOS 移动兼容壳已删除,以 `MobileShell` 作为唯一正式入口
|
||||
|
||||
### 第四批:持续维护
|
||||
|
||||
- 文档和测试应只引用当前仍存在的 UI 文件
|
||||
- 不再记录已经删除的旧 Web Focus Panel 副本路径
|
||||
- 守护测试应阻止旧兼容壳和旧副本路径回流
|
||||
|
||||
---
|
||||
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
@TestOn('vm')
|
||||
library;
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
@ -43,6 +45,18 @@ void main() {
|
||||
.setMockMethodCallHandler(mobileScannerChannel, null);
|
||||
});
|
||||
|
||||
test('mobile shell keeps a single active entrypoint', () {
|
||||
expect(File('lib/features/mobile/mobile_shell.dart').existsSync(), isTrue);
|
||||
expect(
|
||||
File('lib/features/mobile/mobile_shell_core.dart').existsSync(),
|
||||
isTrue,
|
||||
);
|
||||
expect(
|
||||
File('lib/features/mobile/ios_mobile_shell.dart').existsSync(),
|
||||
isFalse,
|
||||
);
|
||||
});
|
||||
|
||||
Future<void> pumpMobileShell(
|
||||
WidgetTester tester, {
|
||||
required Widget child,
|
||||
|
||||
@ -31,6 +31,23 @@ void main() {
|
||||
}
|
||||
});
|
||||
|
||||
test('legacy web focus panel duplicates stay removed', () {
|
||||
const removedTargets = <String>[
|
||||
'lib/web/web_focus_panel.dart',
|
||||
'lib/web/web_focus_panel_core.dart',
|
||||
'lib/web/web_focus_panel_previews.dart',
|
||||
'lib/web/web_focus_panel_support.dart',
|
||||
];
|
||||
|
||||
for (final path in removedTargets) {
|
||||
expect(
|
||||
File(path).existsSync(),
|
||||
isFalse,
|
||||
reason: 'legacy file should stay removed: $path',
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
testWidgets(
|
||||
'Settings focused preview reuses language and theme quick actions',
|
||||
(WidgetTester tester) async {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user