Skip to content

Commit

Permalink
Create proper report path on android app with flavor
Browse files Browse the repository at this point in the history
  • Loading branch information
pdenert committed Oct 30, 2024
1 parent fc9c682 commit 7107a4d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ class AndroidTestBackend {
Future<void> execute(
AndroidAppOptions options,
Device device, {
String? flavor,
bool interruptible = false,
required bool showFlutterLogs,
required bool showTestSteps,
Expand All @@ -207,8 +208,12 @@ class AndroidTestBackend {
)
..disposedBy(scope);

var flavorPath = '';
if (flavor != null) {
flavorPath = 'flavors/$flavor/';
}
final reportPath =
'file://${_fs.currentDirectory.path}/build/app/reports/androidTests/connected/index.html';
'file://${_fs.currentDirectory.path}/build/app/reports/androidTests/connected/${flavorPath}index.html';

final patrolLogReader = PatrolLogReader(
listenStdOut: processLogcat.listenStdOut,
Expand Down
1 change: 1 addition & 0 deletions packages/patrol_cli/lib/src/commands/develop.dart
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ class DevelopCommand extends PatrolCommand {
interruptible: true,
showFlutterLogs: showFlutterLogs,
showTestSteps: showTestSteps,
flavor: flutterOpts.flavor,
);
final package = android.packageName;
if (package != null && uninstall) {
Expand Down
1 change: 1 addition & 0 deletions packages/patrol_cli/lib/src/commands/test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ See https://github.com/leancodepl/patrol/issues/1316 to learn more.
device,
showFlutterLogs: showFlutterLogs,
showTestSteps: showTestSteps,
flavor: flutterOpts.flavor,
);
final package = android.packageName;
if (package != null && uninstall) {
Expand Down

0 comments on commit 7107a4d

Please sign in to comment.