Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
init tests
  • Loading branch information
Chris Yang committed Oct 22, 2019
commit 7b7a16e68a48d771fe81e503ea3fd27a4192d94f
9 changes: 9 additions & 0 deletions packages/quick_actions/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,14 @@ dependencies:
quick_actions:
path: ../

dev_dependencies:
flutter_driver:
sdk: flutter
e2e: ^0.2.0

flutter:
uses-material-design: true

environment:
sdk: ">=2.0.0-dev.28.0 <3.0.0"
flutter: ">=1.9.1+hotfix.2 <2.0.0"
20 changes: 20 additions & 0 deletions packages/quick_actions/example/test_driver/quick_actions_e2e.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

// Copyright 2019, the Chromium project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'dart:async';
import 'dart:io';
import 'package:flutter_test/flutter_test.dart';
import 'package:e2e/e2e.dart';
import 'package:quick_actions/quick_actions.dart';

void main() {
E2EWidgetsFlutterBinding.ensureInitialized();

testWidgets('Can initialize', (WidgetTester tester) async {
final QuickActions quickActions = QuickActions();
Completer completer = Completer<>();
quickActions.initialize(null);
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright 2019, the Chromium project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'dart:async';
import 'dart:io';
import 'package:flutter_driver/flutter_driver.dart';

Future<void> main() async {
final FlutterDriver driver = await FlutterDriver.connect();
final String result =
await driver.requestData(null, timeout: const Duration(minutes: 1));
driver.close();
exit(result == 'pass' ? 0 : 1);
}
3 changes: 2 additions & 1 deletion packages/quick_actions/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ dev_dependencies:
mockito: ^3.0.0
flutter_test:
sdk: flutter
e2e: ^0.2.0

environment:
sdk: ">=2.0.0-dev.28.0 <3.0.0"
flutter: ">=1.5.0 <2.0.0"
flutter: ">=1.6.7 <2.0.0"