28 lines
654 B
Dart
28 lines
654 B
Dart
import 'dart:io';
|
|
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:patrol/patrol.dart';
|
|
|
|
void main() {
|
|
patrolTest(
|
|
'counter state is the same after going to home and switching apps',
|
|
($) async {
|
|
// Replace later with your app's main widget
|
|
await $.pumpWidgetAndSettle(
|
|
MaterialApp(
|
|
home: Scaffold(
|
|
appBar: AppBar(title: const Text('app')),
|
|
backgroundColor: Colors.blue,
|
|
),
|
|
),
|
|
);
|
|
|
|
expect($('app'), findsOneWidget);
|
|
if (!Platform.isMacOS) {
|
|
await $.native.pressHome();
|
|
}
|
|
},
|
|
);
|
|
}
|