main_test.dart 1.24 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
// Copyright 2014 The Flutter Authors. All rights reserved.
// 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';
import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;

void main() {
  test('Windows app starts and draws frame', () async {
    final FlutterDriver driver = await FlutterDriver.connect(printCommunication: true);
11 12 13 14 15 16 17 18 19 20
    final String result = await driver.requestData('verifyWindowVisibility');

    expect(result, equals('success'));

    await driver.close();
  }, timeout: Timeout.none);

  test('Windows app theme matches system theme', () async {
    final FlutterDriver driver = await FlutterDriver.connect(printCommunication: true);
    final String result = await driver.requestData('verifyTheme');
21 22 23 24 25

    expect(result, equals('success'));

    await driver.close();
  }, timeout: Timeout.none);
26 27 28 29 30 31 32 33 34

  test('Windows app template can convert string from UTF16 to UTF8', () async {
    final FlutterDriver driver = await FlutterDriver.connect(printCommunication: true);
    final String result = await driver.requestData('verifyStringConversion');

    expect(result, equals('success'));

    await driver.close();
  }, timeout: Timeout.none);
35
}