Skip to content

Commit

Permalink
add deviceLogs property
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianBissekkou committed Oct 30, 2023
1 parent 6a16ff3 commit 16d2f0e
Show file tree
Hide file tree
Showing 6 changed files with 140 additions and 57 deletions.
1 change: 1 addition & 0 deletions .fvm/flutter_sdk
4 changes: 2 additions & 2 deletions .fvm/fvm_config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"flutterSdkVersion": "3.7.9",
"flutterSdkVersion": "3.13.8",
"flavors": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class IntegrationTestAndroidOption with _$IntegrationTestAndroidOption {
required String browserstackAccessKey,
required File apk,
required File testSuite,
@Default(["Samsung Galaxy S9 Plus-9.0"]) List<String> devices,
@Default(true) bool deviceLogs,
}) = _IntegrationTestAndroidOption;

static Future<IntegrationTestAndroidOption> fromArguments(
Expand Down Expand Up @@ -48,6 +50,4 @@ class IntegrationTestAndroidOption with _$IntegrationTestAndroidOption {
String get basicAuthValue {
return "Basic ${base64Encode(utf8.encode("$browserstackUsername:$browserstackAccessKey"))}";
}

List<String> get devices => ["Samsung Galaxy S9 Plus-9.0"];
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ mixin _$IntegrationTestAndroidOption {
String get browserstackAccessKey => throw _privateConstructorUsedError;
File get apk => throw _privateConstructorUsedError;
File get testSuite => throw _privateConstructorUsedError;
List<String> get devices => throw _privateConstructorUsedError;
bool get deviceLogs => throw _privateConstructorUsedError;

@JsonKey(ignore: true)
$IntegrationTestAndroidOptionCopyWith<IntegrationTestAndroidOption>
Expand All @@ -38,7 +40,9 @@ abstract class $IntegrationTestAndroidOptionCopyWith<$Res> {
{String browserstackUsername,
String browserstackAccessKey,
File apk,
File testSuite});
File testSuite,
List<String> devices,
bool deviceLogs});
}

/// @nodoc
Expand All @@ -59,6 +63,8 @@ class _$IntegrationTestAndroidOptionCopyWithImpl<$Res,
Object? browserstackAccessKey = null,
Object? apk = null,
Object? testSuite = null,
Object? devices = null,
Object? deviceLogs = null,
}) {
return _then(_value.copyWith(
browserstackUsername: null == browserstackUsername
Expand All @@ -77,34 +83,44 @@ class _$IntegrationTestAndroidOptionCopyWithImpl<$Res,
? _value.testSuite
: testSuite // ignore: cast_nullable_to_non_nullable
as File,
devices: null == devices
? _value.devices
: devices // ignore: cast_nullable_to_non_nullable
as List<String>,
deviceLogs: null == deviceLogs
? _value.deviceLogs
: deviceLogs // ignore: cast_nullable_to_non_nullable
as bool,
) as $Val);
}
}

/// @nodoc
abstract class _$$_IntegrationTestAndroidOptionCopyWith<$Res>
abstract class _$$IntegrationTestAndroidOptionImplCopyWith<$Res>
implements $IntegrationTestAndroidOptionCopyWith<$Res> {
factory _$$_IntegrationTestAndroidOptionCopyWith(
_$_IntegrationTestAndroidOption value,
$Res Function(_$_IntegrationTestAndroidOption) then) =
__$$_IntegrationTestAndroidOptionCopyWithImpl<$Res>;
factory _$$IntegrationTestAndroidOptionImplCopyWith(
_$IntegrationTestAndroidOptionImpl value,
$Res Function(_$IntegrationTestAndroidOptionImpl) then) =
__$$IntegrationTestAndroidOptionImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{String browserstackUsername,
String browserstackAccessKey,
File apk,
File testSuite});
File testSuite,
List<String> devices,
bool deviceLogs});
}

/// @nodoc
class __$$_IntegrationTestAndroidOptionCopyWithImpl<$Res>
class __$$IntegrationTestAndroidOptionImplCopyWithImpl<$Res>
extends _$IntegrationTestAndroidOptionCopyWithImpl<$Res,
_$_IntegrationTestAndroidOption>
implements _$$_IntegrationTestAndroidOptionCopyWith<$Res> {
__$$_IntegrationTestAndroidOptionCopyWithImpl(
_$_IntegrationTestAndroidOption _value,
$Res Function(_$_IntegrationTestAndroidOption) _then)
_$IntegrationTestAndroidOptionImpl>
implements _$$IntegrationTestAndroidOptionImplCopyWith<$Res> {
__$$IntegrationTestAndroidOptionImplCopyWithImpl(
_$IntegrationTestAndroidOptionImpl _value,
$Res Function(_$IntegrationTestAndroidOptionImpl) _then)
: super(_value, _then);

@pragma('vm:prefer-inline')
Expand All @@ -114,8 +130,10 @@ class __$$_IntegrationTestAndroidOptionCopyWithImpl<$Res>
Object? browserstackAccessKey = null,
Object? apk = null,
Object? testSuite = null,
Object? devices = null,
Object? deviceLogs = null,
}) {
return _then(_$_IntegrationTestAndroidOption(
return _then(_$IntegrationTestAndroidOptionImpl(
browserstackUsername: null == browserstackUsername
? _value.browserstackUsername
: browserstackUsername // ignore: cast_nullable_to_non_nullable
Expand All @@ -132,19 +150,30 @@ class __$$_IntegrationTestAndroidOptionCopyWithImpl<$Res>
? _value.testSuite
: testSuite // ignore: cast_nullable_to_non_nullable
as File,
devices: null == devices
? _value._devices
: devices // ignore: cast_nullable_to_non_nullable
as List<String>,
deviceLogs: null == deviceLogs
? _value.deviceLogs
: deviceLogs // ignore: cast_nullable_to_non_nullable
as bool,
));
}
}

/// @nodoc
class _$_IntegrationTestAndroidOption extends _IntegrationTestAndroidOption {
const _$_IntegrationTestAndroidOption(
class _$IntegrationTestAndroidOptionImpl extends _IntegrationTestAndroidOption {
const _$IntegrationTestAndroidOptionImpl(
{required this.browserstackUsername,
required this.browserstackAccessKey,
required this.apk,
required this.testSuite})
: super._();
required this.testSuite,
final List<String> devices = const ["Samsung Galaxy S9 Plus-9.0"],
this.deviceLogs = true})
: _devices = devices,
super._();

@override
final String browserstackUsername;
Expand All @@ -154,36 +183,58 @@ class _$_IntegrationTestAndroidOption extends _IntegrationTestAndroidOption {
final File apk;
@override
final File testSuite;
final List<String> _devices;
@override
@JsonKey()
List<String> get devices {
if (_devices is EqualUnmodifiableListView) return _devices;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_devices);
}

@override
@JsonKey()
final bool deviceLogs;

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

@override
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_IntegrationTestAndroidOption &&
other is _$IntegrationTestAndroidOptionImpl &&
(identical(other.browserstackUsername, browserstackUsername) ||
other.browserstackUsername == browserstackUsername) &&
(identical(other.browserstackAccessKey, browserstackAccessKey) ||
other.browserstackAccessKey == browserstackAccessKey) &&
(identical(other.apk, apk) || other.apk == apk) &&
(identical(other.testSuite, testSuite) ||
other.testSuite == testSuite));
other.testSuite == testSuite) &&
const DeepCollectionEquality().equals(other._devices, _devices) &&
(identical(other.deviceLogs, deviceLogs) ||
other.deviceLogs == deviceLogs));
}

@override
int get hashCode => Object.hash(
runtimeType, browserstackUsername, browserstackAccessKey, apk, testSuite);
runtimeType,
browserstackUsername,
browserstackAccessKey,
apk,
testSuite,
const DeepCollectionEquality().hash(_devices),
deviceLogs);

@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$_IntegrationTestAndroidOptionCopyWith<_$_IntegrationTestAndroidOption>
get copyWith => __$$_IntegrationTestAndroidOptionCopyWithImpl<
_$_IntegrationTestAndroidOption>(this, _$identity);
_$$IntegrationTestAndroidOptionImplCopyWith<
_$IntegrationTestAndroidOptionImpl>
get copyWith => __$$IntegrationTestAndroidOptionImplCopyWithImpl<
_$IntegrationTestAndroidOptionImpl>(this, _$identity);
}

abstract class _IntegrationTestAndroidOption
Expand All @@ -192,7 +243,9 @@ abstract class _IntegrationTestAndroidOption
{required final String browserstackUsername,
required final String browserstackAccessKey,
required final File apk,
required final File testSuite}) = _$_IntegrationTestAndroidOption;
required final File testSuite,
final List<String> devices,
final bool deviceLogs}) = _$IntegrationTestAndroidOptionImpl;
const _IntegrationTestAndroidOption._() : super._();

@override
Expand All @@ -204,7 +257,12 @@ abstract class _IntegrationTestAndroidOption
@override
File get testSuite;
@override
List<String> get devices;
@override
bool get deviceLogs;
@override
@JsonKey(ignore: true)
_$$_IntegrationTestAndroidOptionCopyWith<_$_IntegrationTestAndroidOption>
_$$IntegrationTestAndroidOptionImplCopyWith<
_$IntegrationTestAndroidOptionImpl>
get copyWith => throw _privateConstructorUsedError;
}
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,
@Default(true) bool deviceLogs,
}) = _IntegrationTestIosOption;

static Future<IntegrationTestIosOption> fromArguments(
Expand Down
Loading

0 comments on commit 16d2f0e

Please sign in to comment.