Skip to content

Commit

Permalink
add custom_id option
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianBissekkou committed Jan 16, 2024
1 parent 3ea59f4 commit e4fdc3c
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class IntegrationTestAndroidOption with _$IntegrationTestAndroidOption {
required String browserstackAccessKey,
required File apk,
required File testSuite,
String? customId,
@Default(["Samsung Galaxy S9 Plus-9.0"]) List<String> devices,
@Default(true) bool networkLogs,
@Default(true) bool deviceLogs,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ mixin _$IntegrationTestAndroidOption {
String get browserstackAccessKey => throw _privateConstructorUsedError;
File get apk => throw _privateConstructorUsedError;
File get testSuite => throw _privateConstructorUsedError;
String? get customId => throw _privateConstructorUsedError;
List<String> get devices => throw _privateConstructorUsedError;
bool get networkLogs => throw _privateConstructorUsedError;
bool get deviceLogs => throw _privateConstructorUsedError;
Expand All @@ -42,6 +43,7 @@ abstract class $IntegrationTestAndroidOptionCopyWith<$Res> {
String browserstackAccessKey,
File apk,
File testSuite,
String? customId,
List<String> devices,
bool networkLogs,
bool deviceLogs});
Expand All @@ -65,6 +67,7 @@ class _$IntegrationTestAndroidOptionCopyWithImpl<$Res,
Object? browserstackAccessKey = null,
Object? apk = null,
Object? testSuite = null,
Object? customId = freezed,
Object? devices = null,
Object? networkLogs = null,
Object? deviceLogs = null,
Expand All @@ -86,6 +89,10 @@ class _$IntegrationTestAndroidOptionCopyWithImpl<$Res,
? _value.testSuite
: testSuite // ignore: cast_nullable_to_non_nullable
as File,
customId: freezed == customId
? _value.customId
: customId // ignore: cast_nullable_to_non_nullable
as String?,
devices: null == devices
? _value.devices
: devices // ignore: cast_nullable_to_non_nullable
Expand Down Expand Up @@ -116,6 +123,7 @@ abstract class _$$IntegrationTestAndroidOptionImplCopyWith<$Res>
String browserstackAccessKey,
File apk,
File testSuite,
String? customId,
List<String> devices,
bool networkLogs,
bool deviceLogs});
Expand All @@ -138,6 +146,7 @@ class __$$IntegrationTestAndroidOptionImplCopyWithImpl<$Res>
Object? browserstackAccessKey = null,
Object? apk = null,
Object? testSuite = null,
Object? customId = freezed,
Object? devices = null,
Object? networkLogs = null,
Object? deviceLogs = null,
Expand All @@ -159,6 +168,10 @@ class __$$IntegrationTestAndroidOptionImplCopyWithImpl<$Res>
? _value.testSuite
: testSuite // ignore: cast_nullable_to_non_nullable
as File,
customId: freezed == customId
? _value.customId
: customId // ignore: cast_nullable_to_non_nullable
as String?,
devices: null == devices
? _value._devices
: devices // ignore: cast_nullable_to_non_nullable
Expand All @@ -183,6 +196,7 @@ class _$IntegrationTestAndroidOptionImpl extends _IntegrationTestAndroidOption {
required this.browserstackAccessKey,
required this.apk,
required this.testSuite,
this.customId,
final List<String> devices = const ["Samsung Galaxy S9 Plus-9.0"],
this.networkLogs = true,
this.deviceLogs = true})
Expand All @@ -197,6 +211,8 @@ class _$IntegrationTestAndroidOptionImpl extends _IntegrationTestAndroidOption {
final File apk;
@override
final File testSuite;
@override
final String? customId;
final List<String> _devices;
@override
@JsonKey()
Expand All @@ -215,7 +231,7 @@ class _$IntegrationTestAndroidOptionImpl extends _IntegrationTestAndroidOption {

@override
String toString() {
return 'IntegrationTestAndroidOption(browserstackUsername: $browserstackUsername, browserstackAccessKey: $browserstackAccessKey, apk: $apk, testSuite: $testSuite, devices: $devices, networkLogs: $networkLogs, deviceLogs: $deviceLogs)';
return 'IntegrationTestAndroidOption(browserstackUsername: $browserstackUsername, browserstackAccessKey: $browserstackAccessKey, apk: $apk, testSuite: $testSuite, customId: $customId, devices: $devices, networkLogs: $networkLogs, deviceLogs: $deviceLogs)';
}

@override
Expand All @@ -230,6 +246,8 @@ class _$IntegrationTestAndroidOptionImpl extends _IntegrationTestAndroidOption {
(identical(other.apk, apk) || other.apk == apk) &&
(identical(other.testSuite, testSuite) ||
other.testSuite == testSuite) &&
(identical(other.customId, customId) ||
other.customId == customId) &&
const DeepCollectionEquality().equals(other._devices, _devices) &&
(identical(other.networkLogs, networkLogs) ||
other.networkLogs == networkLogs) &&
Expand All @@ -244,6 +262,7 @@ class _$IntegrationTestAndroidOptionImpl extends _IntegrationTestAndroidOption {
browserstackAccessKey,
apk,
testSuite,
customId,
const DeepCollectionEquality().hash(_devices),
networkLogs,
deviceLogs);
Expand All @@ -264,6 +283,7 @@ abstract class _IntegrationTestAndroidOption
required final String browserstackAccessKey,
required final File apk,
required final File testSuite,
final String? customId,
final List<String> devices,
final bool networkLogs,
final bool deviceLogs}) = _$IntegrationTestAndroidOptionImpl;
Expand All @@ -278,6 +298,8 @@ abstract class _IntegrationTestAndroidOption
@override
File get testSuite;
@override
String? get customId;
@override
List<String> get devices;
@override
bool get networkLogs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class IntegrationTestIosOption with _$IntegrationTestIosOption {
required String browserstackUsername,
required String browserstackAccessKey,
required File testPackage,
String? customId,
@Default(true) bool networkLogs,
@Default(true) bool deviceLogs,
}) = _IntegrationTestIosOption;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ mixin _$IntegrationTestIosOption {
String get browserstackUsername => throw _privateConstructorUsedError;
String get browserstackAccessKey => throw _privateConstructorUsedError;
File get testPackage => throw _privateConstructorUsedError;
String? get customId => throw _privateConstructorUsedError;
bool get networkLogs => throw _privateConstructorUsedError;
bool get deviceLogs => throw _privateConstructorUsedError;

Expand All @@ -37,6 +38,7 @@ abstract class $IntegrationTestIosOptionCopyWith<$Res> {
{String browserstackUsername,
String browserstackAccessKey,
File testPackage,
String? customId,
bool networkLogs,
bool deviceLogs});
}
Expand All @@ -58,6 +60,7 @@ class _$IntegrationTestIosOptionCopyWithImpl<$Res,
Object? browserstackUsername = null,
Object? browserstackAccessKey = null,
Object? testPackage = null,
Object? customId = freezed,
Object? networkLogs = null,
Object? deviceLogs = null,
}) {
Expand All @@ -74,6 +77,10 @@ class _$IntegrationTestIosOptionCopyWithImpl<$Res,
? _value.testPackage
: testPackage // ignore: cast_nullable_to_non_nullable
as File,
customId: freezed == customId
? _value.customId
: customId // ignore: cast_nullable_to_non_nullable
as String?,
networkLogs: null == networkLogs
? _value.networkLogs
: networkLogs // ignore: cast_nullable_to_non_nullable
Expand All @@ -99,6 +106,7 @@ abstract class _$$IntegrationTestIosOptionImplCopyWith<$Res>
{String browserstackUsername,
String browserstackAccessKey,
File testPackage,
String? customId,
bool networkLogs,
bool deviceLogs});
}
Expand All @@ -119,6 +127,7 @@ class __$$IntegrationTestIosOptionImplCopyWithImpl<$Res>
Object? browserstackUsername = null,
Object? browserstackAccessKey = null,
Object? testPackage = null,
Object? customId = freezed,
Object? networkLogs = null,
Object? deviceLogs = null,
}) {
Expand All @@ -135,6 +144,10 @@ class __$$IntegrationTestIosOptionImplCopyWithImpl<$Res>
? _value.testPackage
: testPackage // ignore: cast_nullable_to_non_nullable
as File,
customId: freezed == customId
? _value.customId
: customId // ignore: cast_nullable_to_non_nullable
as String?,
networkLogs: null == networkLogs
? _value.networkLogs
: networkLogs // ignore: cast_nullable_to_non_nullable
Expand All @@ -154,6 +167,7 @@ class _$IntegrationTestIosOptionImpl extends _IntegrationTestIosOption {
{required this.browserstackUsername,
required this.browserstackAccessKey,
required this.testPackage,
this.customId,
this.networkLogs = true,
this.deviceLogs = true})
: super._();
Expand All @@ -165,6 +179,8 @@ class _$IntegrationTestIosOptionImpl extends _IntegrationTestIosOption {
@override
final File testPackage;
@override
final String? customId;
@override
@JsonKey()
final bool networkLogs;
@override
Expand All @@ -173,7 +189,7 @@ class _$IntegrationTestIosOptionImpl extends _IntegrationTestIosOption {

@override
String toString() {
return 'IntegrationTestIosOption(browserstackUsername: $browserstackUsername, browserstackAccessKey: $browserstackAccessKey, testPackage: $testPackage, networkLogs: $networkLogs, deviceLogs: $deviceLogs)';
return 'IntegrationTestIosOption(browserstackUsername: $browserstackUsername, browserstackAccessKey: $browserstackAccessKey, testPackage: $testPackage, customId: $customId, networkLogs: $networkLogs, deviceLogs: $deviceLogs)';
}

@override
Expand All @@ -187,6 +203,8 @@ class _$IntegrationTestIosOptionImpl extends _IntegrationTestIosOption {
other.browserstackAccessKey == browserstackAccessKey) &&
(identical(other.testPackage, testPackage) ||
other.testPackage == testPackage) &&
(identical(other.customId, customId) ||
other.customId == customId) &&
(identical(other.networkLogs, networkLogs) ||
other.networkLogs == networkLogs) &&
(identical(other.deviceLogs, deviceLogs) ||
Expand All @@ -195,7 +213,7 @@ class _$IntegrationTestIosOptionImpl extends _IntegrationTestIosOption {

@override
int get hashCode => Object.hash(runtimeType, browserstackUsername,
browserstackAccessKey, testPackage, networkLogs, deviceLogs);
browserstackAccessKey, testPackage, customId, networkLogs, deviceLogs);

@JsonKey(ignore: true)
@override
Expand All @@ -210,6 +228,7 @@ abstract class _IntegrationTestIosOption extends IntegrationTestIosOption {
{required final String browserstackUsername,
required final String browserstackAccessKey,
required final File testPackage,
final String? customId,
final bool networkLogs,
final bool deviceLogs}) = _$IntegrationTestIosOptionImpl;
const _IntegrationTestIosOption._() : super._();
Expand All @@ -221,6 +240,8 @@ abstract class _IntegrationTestIosOption extends IntegrationTestIosOption {
@override
File get testPackage;
@override
String? get customId;
@override
bool get networkLogs;
@override
bool get deviceLogs;
Expand Down
1 change: 1 addition & 0 deletions lib/src/integration_test/run_android_integration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Future<void> runAndroidIntegrationTest(List<String> arguments) async {
"devices": option.devices,
"networkLogs": option.networkLogs,
"deviceLogs": option.deviceLogs,
if (option.customId != null) "custom_id": option.customId!,
},
);

Expand Down
1 change: 1 addition & 0 deletions lib/src/integration_test/run_ios_integration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Future<void> runIosIntegrationTest(List<String> arguments) async {
"networkLogs": option.networkLogs,
"deviceLogs": option.deviceLogs,
"devices": option.devices,
if (option.customId != null) "custom_id": option.customId!,
},
);

Expand Down

0 comments on commit e4fdc3c

Please sign in to comment.