Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to use extension slugs in the "--additional_woo_plugins" parameter #6

Merged
merged 3 commits into from
Feb 24, 2023

Conversation

Luc45
Copy link
Member

@Luc45 Luc45 commented Feb 17, 2023

Make the behavior of --additional_woo_plugins consistent by also accepting a comma-separated list of slugs. Previously, it would only accept IDs.

How to test this:

  • See the unit tests that are in place, the snapshot tests represent the payload that is sent to the manager, see that it sends the extension IDs, even though we are passing in the slugs as input.

You can also test this by running a command such as this:

  • ./qit run:e2e automatewoo --additional_woo_plugins=woocommerce-product-addons,woocommerce-min-max-quantities
  • And assert that it starts the test correctly, with the provided extensions

@Luc45 Luc45 self-assigned this Feb 17, 2023
@@ -148,6 +148,19 @@ public function execute( InputInterface $input, OutputInterface $output ) {
$options['event'] = 'cli_published_extension_test';
}

// Convert "Additional Woo Plugins" Slugs to IDs.
if ( ! empty( $options['additional_woo_plugins'] ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This made me think for a future iteration that an interesting extension on this could be to add an "additional_plugins" that allows fetching the plugin by slug and installs it, for any plugins available. For example if we wanted to add in hello-dolly, something like --additional_plugins=hello-dolly,some-plugin (though we'd need some handling around if the plugin doesn't exist, such as if someone accidentally mistypes the name, for example).

Copy link
Contributor

@zhongruige zhongruige left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for getting this in @Luc45! This is awesome have as an option.

Base automatically changed from 23-01/update-local-url to trunk February 24, 2023 18:57
@Luc45 Luc45 merged commit 5c818f7 into trunk Feb 24, 2023
@Luc45 Luc45 deleted the 23-01/additional-extensions-by-slug branch February 24, 2023 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants