Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom selector improvements #79

Merged
merged 12 commits into from
Jul 5, 2022
Merged
3 changes: 3 additions & 0 deletions .github/workflows/maestro_test-prepare.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ jobs:
- name: flutter analyze
run: flutter analyze --no-fatal-infos

- name: flutter test
run: flutter test

- name: flutter pub get (example app)
working-directory: ./packages/maestro_test/example
run: flutter pub get
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.DS_Store
.idea
10 changes: 8 additions & 2 deletions packages/maestro_test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dev_dependencies:
maestro_test: ^0.3.0
```

### Usage
### Using features of the underlying native platform

```dart
// example/integration_test/example_test.dart
Expand Down Expand Up @@ -63,16 +63,22 @@ import 'package:maestro_test/maestro_test.dart';

void main() {
maestroTest(
'counter state is the same after going to Home and switching apps',
'logs in successfully',
($) async {
await $.pumpWidgetAndSettle(const MyApp());

await $(#emailInput).enterText('user@leancode.co');
await $(#passwordInput).enterText('ny4ncat');

// Find widget with text 'Log in' which is a descendant of widget with key
// box1 which is a descendant of a Scaffold widget and tap on it.
await $(Scaffold).$(#box1).$('Log in').tap();

// Selects the first Scrollable which has a Text descendant
$(Scrollable).withDescendant(Text);

// Selects the first Scrollable which has a Button descendant which has a Text descendant
$(Scrollable).withDescendant($(Text).withDescendant(Text));
},
);
}
Expand Down
7 changes: 4 additions & 3 deletions packages/maestro_test/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
include: package:leancode_lint/analysis_options_package.yaml

linter:
rules:
public_member_api_docs: false
analyzer:
exclude:
- lib/**/*.freezed.dart
bartekpacia marked this conversation as resolved.
Show resolved Hide resolved
- lib/**/*.g.dart
7 changes: 2 additions & 5 deletions packages/maestro_test/lib/maestro_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,5 @@
/// flutter_driver.
library maestro_test;

export 'src/custom_selectors.dart';
export 'src/maestro.dart';
export 'src/native_widget.dart';
export 'src/notification.dart';
export 'src/selector.dart';
export 'src/custom_selectors/custom_selectors.dart';
export 'src/native/native.dart';
184 changes: 0 additions & 184 deletions packages/maestro_test/lib/src/custom_selectors.dart

This file was deleted.

Loading