From b5c48fb3bb2857c857ff56f37f4bbd51a72111f5 Mon Sep 17 00:00:00 2001 From: Lucas Bustamante Date: Wed, 10 Apr 2024 17:02:01 -0300 Subject: [PATCH] Set "test" action for SUT by default --- src/src/Commands/CustomTests/RunE2ECommand.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/src/Commands/CustomTests/RunE2ECommand.php b/src/src/Commands/CustomTests/RunE2ECommand.php index 997ef87d..1f794eff 100644 --- a/src/src/Commands/CustomTests/RunE2ECommand.php +++ b/src/src/Commands/CustomTests/RunE2ECommand.php @@ -138,6 +138,18 @@ protected function execute( InputInterface $input, OutputInterface $output ): in } $woo_extension = sprintf( '%s:test:%s', $woo_extension, realpath( $test ) ); } + + $has_action = false; + foreach ( Extension::ACTIONS as $action ) { + if ( strpos( $woo_extension, ":$action" ) !== false ) { + $has_action = true; + break; + } + } + + if ( ! $has_action ) { + $woo_extension = "$woo_extension:test"; + } if ( $input->getOption( 'testing_theme' ) === 'true' ) { $env_up_options['--theme'][] = $woo_extension; } else {