fix(recommend): 修正筛选左起始与横向滑动
This commit is contained in:
1 parent
a40adbb99a
commit
21bb716af4
4 files changed
+50
-15
No files matched your search
@@ -247,6 +247,11 @@ void main() {
|
||||
expect(delegate.mainAxisSpacing, AppDimens.allDramasGridRowGap);
|
||||
for (var row = 0; row < 4; row++) {
|
||||
expect(find.byKey(Key('all-filter-row-$row')), findsOneWidget);
|
||||
final scroll = tester.widget<SingleChildScrollView>(
|
||||
find.byKey(Key('all-filter-scroll-$row')),
|
||||
);
|
||||
expect(scroll.scrollDirection, Axis.horizontal);
|
||||
expect(scroll.physics, isA<BouncingScrollPhysics>());
|
||||
}
|
||||
final filterStarts = [
|
||||
for (var row = 0; row < 4; row++)
|
||||
@@ -355,6 +360,10 @@ void main() {
|
||||
of: rowZero,
|
||||
matching: find.byKey(const Key('all-filter-local')),
|
||||
);
|
||||
expect(
|
||||
tester.getTopLeft(rowZeroAll).dx,
|
||||
closeTo(pageRect.left + AppDimens.feedPageHorizontal, 0.1),
|
||||
);
|
||||
expect(
|
||||
tester.getTopLeft(rowZeroLocal).dx - tester.getTopRight(rowZeroAll).dx,
|
||||
AppDimens.filterItemGap,
|
||||
@@ -426,6 +435,13 @@ void main() {
|
||||
BorderRadius.circular(AppDimens.filterChipRadius),
|
||||
);
|
||||
final filterButton = find.byKey(const Key('all-dramas-filter-page'));
|
||||
expect(
|
||||
find.descendant(
|
||||
of: find.byKey(const Key('all-filter-scroll-3')),
|
||||
matching: filterButton,
|
||||
),
|
||||
findsNothing,
|
||||
);
|
||||
expect(
|
||||
tester.getSize(filterButton),
|
||||
const Size.square(AppDimens.allDramasFilterButton),
|
||||
|
||||
Reference in new issue
Block a user