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

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

void main() {
  group('flavors suite', () {
10
    late FlutterDriver driver;
11 12 13 14 15 16 17 18 19

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

    test('check flavor', () async {
      final SerializableFinder flavorField = find.byValueKey('flavor');
      final String flavor = await driver.getText(flavorField);
      expect(flavor, 'paid');
20
    }, timeout: Timeout.none);
21 22

    tearDownAll(() async {
23
      driver.close();
24 25 26
    });
  });
}