This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:meta/meta.dart'; | |
import 'package:test/test.dart'; | |
// ignore: depend_on_referenced_packages | |
import 'package:test_api/src/backend/invoker.dart'; | |
// Input: | |
const String requestedTest = 'testA'; | |
// Global state: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter_test/flutter_test.dart'; | |
import 'package:patrol/src/extensions.dart'; | |
// ignore: depend_on_referenced_packages | |
import 'package:test_api/src/backend/invoker.dart'; | |
const String requestedTest = 'groupA testA'; | |
String get currentTest => Invoker.current!.fullCurrentTestName(); | |
void main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PatrolTester $; | |
$.native.grantPermissionWhenInUse() | |
$.native.grantPermissionOnlyThisTime(); | |
$.native.denyPermission(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DartTestGroup { | |
String name = ''; | |
List<DartTestCase> tests = []; | |
List<DartTestGroup> groups = []; | |
DartTestGroup({ | |
required this.name, | |
this.tests = const [], | |
this.groups = const [], | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
testWidgets('signs up', (WidgetTester tester) async { | |
await tester.pumpWidget(ExampleApp()); | |
await tester.pumpAndSettle(); | |
await tester.enterText( | |
find.byKey(Key('emailTextField')), | |
'[email protected]', | |
); | |
await tester.pumpAndSettle(); | |
await tester.enterText( | |
find.byKey(Key('nameTextField')), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"paddingVertical": "0px", | |
"paddingHorizontal": "0px", | |
"backgroundImage": null, | |
"backgroundImageSelection": null, | |
"backgroundMode": "color", | |
"backgroundColor": "rgba(171, 184, 195, 1)", | |
"dropShadow": false, | |
"dropShadowOffsetY": "20px", | |
"dropShadowBlurRadius": "68px", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ignore_for_file: invalid_use_of_internal_member, | |
// depend_on_referenced_packages, directives_ordering | |
import 'dart:async'; | |
import 'package:flutter_test/flutter_test.dart'; | |
import 'package:patrol/patrol.dart'; | |
import 'package:patrol/src/native/contracts/contracts.pbgrpc.dart'; | |
import 'package:test_api/src/backend/invoker.dart'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import XCTest; | |
@import ObjectiveC.runtime; | |
@interface ParametrizedTests : XCTestCase | |
@end | |
@implementation ParametrizedTests | |
+ (NSArray<NSInvocation *> *)testInvocations { | |
NSLog(@"testInvocations() called"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
@interface PatrolIntegrationTestRunner : NSObject | |
+ (NSString *)createMethodNameFromPatrolGeneratedGroup:(NSString *)dartTestGroup; | |
@end | |
@implementation PatrolIntegrationTestRunner | |
- (instancetype)init { | |
self = [super init]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun DartTestGroup.listFlatDartFiles(): List<String> { | |
val files = mutableListOf<String>() | |
for (group in groupsList) { | |
files.addAll(group.listGroups()) | |
} | |
return files.filter { it.endsWith(".dart") } | |
} | |
// Recursively lists groups in this group. | |
private fun DartTestGroup.listGroups(): List<String> { |