route_test.dart 800 Bytes
Newer Older
Ian Hickson's avatar
Ian Hickson committed
1
// Copyright 2014 The Flutter Authors. All rights reserved.
2 3 4
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

5
import 'package:flutter_driver/flutter_driver.dart';
6

7
import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
8 9 10

void main() {
  group('flutter run test --route', () {
11
    late FlutterDriver driver;
12 13 14 15 16 17

    setUpAll(() async {
      driver = await FlutterDriver.connect();
    });

    tearDownAll(() async {
18
      await driver.close();
19 20 21 22 23 24
    });

    test('sanity check flutter drive --route', () async {
      // This only makes sense if you ran the test as described
      // in the test file. It's normally run from devicelab.
      expect(await driver.requestData('route'), '/smuggle-it');
25
    }, timeout: Timeout.none);
26 27
  });
}