fix(home): 移除二级标签筛选按钮
This commit is contained in:
1 parent
3655d94869
commit
9cf1efc316
6 files changed
+27
-109
No files matched your search
@@ -94,43 +94,21 @@ void main() {
|
||||
expect(find.byKey(const Key('home-section-category-古装')), findsOneWidget);
|
||||
expect(find.byKey(const Key('home-section-category-社群')), findsOneWidget);
|
||||
expect(find.byKey(const Key('home-secondary-tags')), findsOneWidget);
|
||||
expect(find.byKey(const Key('home-grid-filter')), findsOneWidget);
|
||||
expect(
|
||||
tester.getSize(find.byKey(const Key('home-grid-filter'))),
|
||||
const Size.square(AppDimens.homeSecondaryFilterVisualSize),
|
||||
tester.getRect(find.byKey(const Key('home-secondary-tags'))).left,
|
||||
closeTo(AppDimens.feedPageHorizontal, 0.1),
|
||||
);
|
||||
expect(
|
||||
tester.getSize(find.byKey(const Key('home-secondary-filter-visual'))),
|
||||
const Size.square(AppDimens.homeSecondaryFilterVisualSize),
|
||||
);
|
||||
expect(
|
||||
tester.getCenter(find.byKey(const Key('home-grid-filter'))).dy,
|
||||
closeTo(tester.getCenter(find.byKey(const Key('home-tag-hot'))).dy, 0.1),
|
||||
);
|
||||
expect(
|
||||
tester.getRect(find.byKey(const Key('home-grid-filter'))).right,
|
||||
tester.getRect(find.byKey(const Key('home-secondary-tags'))).right,
|
||||
closeTo(
|
||||
tester.getRect(find.byKey(const Key('home-grid'))).right -
|
||||
AppDimens.feedPageHorizontal,
|
||||
0.1,
|
||||
),
|
||||
);
|
||||
final filterIcon = tester.widget<CustomPaint>(
|
||||
find.byKey(const Key('home-secondary-filter-icon')),
|
||||
);
|
||||
expect(
|
||||
filterIcon.size,
|
||||
const Size.square(AppDimens.homeSecondaryFilterIcon),
|
||||
);
|
||||
final filterMaterial = tester.widget<Material>(
|
||||
find
|
||||
.ancestor(
|
||||
of: find.byKey(const Key('home-grid-filter')),
|
||||
matching: find.byType(Material),
|
||||
)
|
||||
.first,
|
||||
);
|
||||
expect(filterMaterial.color, AppColors.transparent);
|
||||
expect(find.byKey(const Key('home-grid-filter')), findsNothing);
|
||||
expect(find.byKey(const Key('home-secondary-filter-visual')), findsNothing);
|
||||
expect(find.byKey(const Key('home-secondary-filter-icon')), findsNothing);
|
||||
final searchBox = find.descendant(
|
||||
of: find.byKey(const Key('home-search-entry')),
|
||||
matching: find.byType(Container),
|
||||
|
||||
Reference in new issue
Block a user