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

Update protobuf to 3.0.0 #1567

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
Expand Up @@ -19,7 +19,7 @@ void main() {
await Future<void>.delayed(const Duration(seconds: 5));

await $.native.tapOnNotificationBySelector(
Selector(textContains: 'Someone liked'),
Selector.create()..textContains = 'Someone liked',
);

await $('Tapped notification with ID: 1').waitUntilVisible();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ Future<void> tapOkIfGoogleDialogAppears(PatrolTester $) async {

while (listWithOkText.isEmpty && io.Platform.isAndroid) {
listWithOkText =
await $.native.getNativeViews(Selector(textContains: 'OK'));
await $.native.getNativeViews(Selector.create()..textContains = 'OK');
final timeoutReached = !inactivityTimer.isActive;
if (timeoutReached) {
inactivityTimer.cancel();
break;
}
}
if (listWithOkText.isNotEmpty) {
await $.native.tap(Selector(text: 'OK'));
await $.native.tap(Selector.create()..text = 'OK');
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ void main() {

await $('Open webview (Hacker News)').scrollTo().tap();

await $.native.tap(Selector(text: 'login'));
await $.native.tap(Selector.create()..text = 'login');
await $.native.enterTextByIndex(
'test@leancode.pl',
index: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ void main() {
await $('Open webview (LeanCode)').scrollTo().tap();

try {
await $.native.tap(Selector(text: 'Accept cookies'));
await $.native.tap(Selector.create()..text = 'Accept cookies');
} on PatrolActionException catch (_) {
// ignore
}
Expand All @@ -17,6 +17,6 @@ void main() {
index: 0,
keyboardBehavior: KeyboardBehavior.showAndDismiss,
);
await $.native.tap(Selector(text: 'Subscribe'));
await $.native.tap(Selector.create()..text = 'Subscribe');
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ void main() {
await $('Open webview (StackOverflow)').scrollTo().tap();

try {
await $.native.tap(Selector(text: 'Accept all cookies'));
await $.native.tap(Selector.create()..text = 'Accept all cookies');
} on PatrolActionException catch (_) {
// ignore
}
await $.native.tap(Selector(text: 'Log in'));
await $.native.tap(Selector.create()..text = 'Log in');

await $.pump(Duration(seconds: 2));

Expand All @@ -28,7 +28,7 @@ void main() {
index: 1,
keyboardBehavior: KeyboardBehavior.showAndDismiss,
);
await $.native.tap(Selector(text: 'Log in'));
await $.native.tap(Selector.create()..text = 'Log in');
},
);
}
4 changes: 2 additions & 2 deletions packages/patrol/lib/src/common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ DartTestGroup createDartTestGroup(
String prefix = '',
}) {
final groupName = topLevelGroup.name.replaceFirst(prefix, '').trim();
final group = DartTestGroup(name: groupName);
final group = DartTestGroup.create()..name = groupName;

for (final entry in topLevelGroup.entries) {
if (entry is Group) {
group.groups.add(DartTestGroup(name: entry.name));
group.groups.add(DartTestGroup.create()..name = entry.name);
}

if (entry is Test && entry.name != 'patrol_test_explorer') {
Expand Down
Loading