From 5049f3787f476754a3f559f19eac6491e3d3e2d0 Mon Sep 17 00:00:00 2001 From: Nemanja Risteski Date: Wed, 4 Dec 2024 15:54:53 -0500 Subject: [PATCH] remove build_install and emu_launch methods --- .../maestro_orchestration_android_action.rb | 15 ++++++--------- spec/maestro_orchestration_action_spec.rb | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/lib/fastlane/plugin/maestro_orchestration/actions/maestro_orchestration_android_action.rb b/lib/fastlane/plugin/maestro_orchestration/actions/maestro_orchestration_android_action.rb index d3fc2a3..cdb8b8e 100644 --- a/lib/fastlane/plugin/maestro_orchestration/actions/maestro_orchestration_android_action.rb +++ b/lib/fastlane/plugin/maestro_orchestration/actions/maestro_orchestration_android_action.rb @@ -15,17 +15,9 @@ def self.run(params) cold_boot: params[:emulator_cold_boot], additional_options: params[:emulator_additional_options] ) - build_and_install_android_app(params) - UI.message("Running Maestro tests on Android...") - sh("maestro test #{params[:maestro_flows]}") - - UI.success("Finished Maestro tests on Android.") - end - - def self.build_and_install_android_app(params) UI.message("Building Android app...") - sh("./gradlew assembleDebug") + other_action.gradle(task: "assembleDebug") apk_path = Dir["app/build/outputs/apk/debug/app-debug.apk"].first @@ -36,6 +28,11 @@ def self.build_and_install_android_app(params) UI.message("Found APK file at: #{apk_path}") sh("adb install -r '#{apk_path}'") UI.success("APK installed on Android emulator.") + + UI.message("Running Maestro tests on Android...") + sh("maestro test #{params[:maestro_flows]}") + + UI.success("Finished Maestro tests on Android.") end def self.description diff --git a/spec/maestro_orchestration_action_spec.rb b/spec/maestro_orchestration_action_spec.rb index a86ab30..b996981 100644 --- a/spec/maestro_orchestration_action_spec.rb +++ b/spec/maestro_orchestration_action_spec.rb @@ -1,4 +1,4 @@ -describe Fastlane::Actions::MaestroOrchestrationAction do +describe Fastlane::Actions::MaestroOrchestrationIosAction do describe '#run' do it 'prints a message' do expect(Fastlane::UI).to receive(:message).with("The maestro_orchestration plugin is working!")