-
Notifications
You must be signed in to change notification settings - Fork 2
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
Rename "api" to "woo-api" and "e2e" to "woo-e2e" #125
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work on this @Luc45! This refactor helps to provide us separation of concerns for the different test types and sets us up for the next stages in QIT. Self tests all passed:
@@ -306,6 +306,24 @@ public function execute( InputInterface $input, OutputInterface $output ) { | |||
|
|||
$command->add_option_to_send( 'zip' ); | |||
|
|||
if ( $test_type === 'api' ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this so we can always come back and add custom API tests in the future.
// This will be hidden while custom test type is in development, but kept as an alias to "woo-e2e". | ||
if ( $test_type === 'e2e' ) { | ||
try { | ||
$hide_e2e = $this->environment->get_cache()->get_manager_sync_data( 'hide_e2e' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like how this configuration is set.
On current versions of QIT CLI, they will see both the renamed and the alias:
Once they update to the latest version, they will see just the renamed:
The aliases are still there, but they are hidden. If they run it (as in a CI script that still uses
e2e
as the test-type), it still works:If the user starts a test using
e2e
as the test type, instead ofwoo-e2e
, internally we route it to the renamed test type and log it to keep track of usage:In the future, when
e2e
actually refers to custom tests, we will:1.1 If yes, we just run it
1.2 If no, this can be either because the dev hasn't added custom tests yet, or because it's a old CI script still pointing to this test type
getenv('CI')
is true, we just run thewoo-e2e
test type and add a warning to the testTesting Instructions
Testing instructions will be added to the Manager PR.