Unverified Commit ed92f189 authored by Alexander Dahlberg's avatar Alexander Dahlberg Committed by GitHub

Fixed leak and removed no-shuffle tag in dismissible_test.dart (#88933)

parent ba734ed6
......@@ -2,19 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// TODO(gspencergoog): Remove this tag once this test's state leaks/test
// dependencies have been fixed.
// https://github.com/flutter/flutter/issues/85160
// Fails with "flutter test --test-randomize-ordering-seed=456"
@Tags(<String>['no-shuffle'])
import 'package:flutter/gestures.dart' show DragStartBehavior;
import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
const double itemExtent = 100.0;
Axis scrollDirection = Axis.vertical;
DismissDirection dismissDirection = DismissDirection.horizontal;
DismissDirection defaultDismissDirection = DismissDirection.horizontal;
DismissDirection dismissDirection = defaultDismissDirection;
late DismissDirection reportedDismissDirection;
List<int> dismissedItems = <int>[];
Widget? background;
......@@ -234,6 +229,12 @@ void main() {
background = null;
});
tearDown(() {
// To make sure dismissDirection does not have unpredicted values when
// tests are being shuffled, restore it to default value after each test.
dismissDirection = defaultDismissDirection;
});
testWidgets('Horizontal drag triggers dismiss scrollDirection=vertical', (WidgetTester tester) async {
scrollDirection = Axis.vertical;
dismissDirection = DismissDirection.horizontal;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment