[go: nahoru, domu]

Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Rename instrumentation_adapter plugin to e2e plugin #2161

Merged
merged 21 commits into from
Oct 8, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
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
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.2.0

* Rename package from instrumentation_adapter to e2e.
* Refactor example app test.

## 0.1.4

* Migrate example to AndroidX.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# instrumentation_adapter
# e2e

Adapts flutter_test results as Android instrumentation tests, making them usable
for Firebase Test Lab and other Android CI providers.
Expand All @@ -7,15 +7,15 @@ iOS support is not available yet, but is planned in the future.

## Usage

Add a dependency on the `instrumentation_adapter` package in the
Add a dependency on the `e2e` package in the
`dev_dependencies` section of pubspec.yaml. For plugins, do this in the
pubspec.yaml of the example app.

Invoke `InstrumentationAdapterFlutterBinding.ensureInitialized()` at the start
of a test file, e.g.

```dart
import 'package:instrumentation_adapter/instrumentation_adapter.dart';
import 'package:e2e/e2e.dart';

void main() {
InstrumentationAdapterFlutterBinding.ensureInitialized();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
group 'com.example.instrumentation_adapter'
group 'com.example.e2e'
version '1.0-SNAPSHOT'

buildscript {
Expand Down
1 change: 1 addition & 0 deletions packages/e2e/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = 'e2e'
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="dev.flutter.instrumentation_adapter">
package="dev.flutter.e2e">
</manifest>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# instrumentation_adapter_example
# e2e_example

Demonstrates how to use the instrumentation_adapter plugin.
Demonstrates how to use the e2e plugin.

## Getting Started

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ android {

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.instrumentation_adapter_example"
applicationId "com.example.e2e_example"
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.instrumentation_adapter_example;
package com.example.e2e_example;

import androidx.test.rule.ActivityTestRule;
import dev.flutter.plugins.instrumentationadapter.FlutterRunner;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.instrumentation_adapter_example">
package="com.example.e2e_example">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.instrumentation_adapter_example">
package="com.example.e2e_example">

<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
Expand All @@ -8,7 +8,7 @@
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="instrumentation_adapter_example"
android:label="e2e_example"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.instrumentation_adapter_example;
package com.example.e2e_example;

import android.os.Bundle;
import io.flutter.app.FlutterActivity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.instrumentation_adapter_example">
package="com.example.e2e_example">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ org.gradle.jvmargs=-Xmx1536M

android.useAndroidX=true
android.enableJetifier=true
android.enableR8=true
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>instrumentation_adapter_example</string>
<string>e2e_example</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: instrumentation_adapter_example
description: Demonstrates how to use the instrumentation_adapter plugin.
name: e2e_example
description: Demonstrates how to use the e2e plugin.
publish_to: 'none'

environment:
Expand All @@ -16,7 +16,7 @@ dev_dependencies:
sdk: flutter
flutter_driver:
sdk: flutter
instrumentation_adapter:
e2e:
path: ../

# For information on the generic Dart part of this file, see the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
import 'dart:io' show Platform;
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:instrumentation_adapter/instrumentation_adapter.dart';
import 'package:e2e/e2e.dart';

import 'package:instrumentation_adapter_example/main.dart';
import 'package:e2e_example/main.dart';

void main() {
InstrumentationAdapterFlutterBinding.ensureInitialized();
E2EWidgetsFlutterBinding.ensureInitialized();
testWidgets('verify text', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(MyApp());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
s.name = 'instrumentation_adapter'
s.name = 'e2e'
s.version = '0.0.1'
s.summary = 'Instrumentation adapter.'
s.description = <<-DESC
Runs tests that use the flutter_test API as integration tests.
DESC
s.homepage = 'https://github.com/flutter/plugins/tree/master/packages/instrumentation_adapter'
s.homepage = 'https://github.com/flutter/plugins/tree/master/packages/e2e'
s.license = { :file => '../LICENSE' }
s.author = { 'Flutter Team' => 'flutter-dev@googlegroups.com' }
s.source = { :path => '.' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import 'package:flutter/widgets.dart';

/// A subclass of [LiveTestWidgetsFlutterBinding] that reports tests results
/// on a channel to adapt them to native instrumentation test format.
class InstrumentationAdapterFlutterBinding
class E2EWidgetsFlutterBinding
extends LiveTestWidgetsFlutterBinding {
InstrumentationAdapterFlutterBinding() {
E2EWidgetsFlutterBinding() {
// TODO(jackson): Report test results as they arrive
tearDownAll(() async {
try {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: instrumentation_adapter
name: e2e
description: Runs tests that use the flutter_test API as integration tests.
version: 0.1.4
version: 0.1.5
author: Flutter Team <flutter-dev@googlegroups.com>
homepage: https://github.com/flutter/plugins/tree/master/packages/instrumentation_adapter
homepage: https://github.com/flutter/plugins/tree/master/packages/e2e

environment:
sdk: ">=2.1.0 <3.0.0"
Expand Down
1 change: 0 additions & 1 deletion packages/instrumentation_adapter/android/settings.gradle

This file was deleted.

This file was deleted.