From 49028ce15eda8a46b940acf745aaedfecf6b136e Mon Sep 17 00:00:00 2001 From: Lucas Bustamante Date: Fri, 23 Feb 2024 17:14:00 -0300 Subject: [PATCH] Update sync.json and snapshots --- ...erManagementTest__test_add_partner__1.json | 948 ++++++++++++++++-- ...gementTest__test_add_partner_email__1.json | 948 ++++++++++++++++-- ...anagementTest__test_switch_partner__1.json | 948 ++++++++++++++++-- ...anagementTest__test_switch_partner__2.json | 948 ++++++++++++++++-- ..._partner_on_different_environments__1.json | 948 ++++++++++++++++-- ..._partner_on_different_environments__2.json | 948 ++++++++++++++++-- ...st_run_with_additional_woo_plugins__1.json | 4 + ...st_run_with_additional_woo_plugins__2.json | 4 + ...st_run_with_additional_woo_plugins__3.json | 4 + src/tests/data/sync.json | 948 ++++++++++++++++-- 10 files changed, 6144 insertions(+), 504 deletions(-) diff --git a/src/tests/__snapshots__/PartnerManagementTest__test_add_partner__1.json b/src/tests/__snapshots__/PartnerManagementTest__test_add_partner__1.json index fa697b1d..d5fd5a2e 100644 --- a/src/tests/__snapshots__/PartnerManagementTest__test_add_partner__1.json +++ b/src/tests/__snapshots__/PartnerManagementTest__test_add_partner__1.json @@ -14,20 +14,26 @@ "manager_sync_v@QIT_CLI_VERSION@": { "expire": 1234567890, "value": { - "latest_cli_version": "0.1", + "latest_cli_version": "0.4.0", + "minimum_cli_version": "0.3.2", "enforce_latest": true, "test_types": { - "e2e": "e2e", "phpstan": "phpstan", "compatibility": "compatibility", "activation": "activation", - "security": "security" + "security": "security", + "phpcompatibility": "phpcompatibility", + "malware": "malware", + "woo-api": "woo-api", + "woo-e2e": "woo-e2e", + "e2e": "e2e", + "api": "api" }, - "wccom_url": "https:\/\/woocommerce.test", + "wccom_url": "https:\/\/woocommerce.com", "schemas": { - "e2e": { - "title": "e2eTest", - "description": "Enqueue E2E Tests.", + "phpstan": { + "title": "phpstanTest", + "description": "Enqueue PHPStan tests.", "context": [ "view" ], @@ -39,26 +45,129 @@ "type": "integer" }, "wordpress_version": { + "default": "6.4.3", "description": "The WordPress version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] }, "woocommerce_version": { + "default": "8.6.1", "description": "The WooCommerce version to use in the test.", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", "type": "string" }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + } + } + }, + "compatibility": { + "title": "compatibilityTest", + "description": "Enqueue Compatibility tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "wordpress_version": { + "default": "6.4.3", + "description": "The WordPress version to use in the test.", + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] + }, + "woocommerce_version": { + "default": "8.6.1", + "description": "The WooCommerce version to use in the test.", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, "optional_features": { - "description": "WooCommerce features to enable in the testing environment.", - "type": "object", - "additionalProperties": false, - "properties": { - "hpos": { - "description": "Whether or not to enable High Performance Order Storage in the testing environment.", - "type": "boolean" - }, - "cc_blocks": { - "description": "Whether or not to enable Cart and Checkout Blocks in the testing environment.", - "type": "boolean" - } + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] } }, "upload_id": { @@ -83,29 +192,271 @@ "description": "What event originated this request.", "type": "string" }, - "additional_woo_plugins": { - "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + } + } + }, + "activation": { + "title": "Activation Test", + "description": "Enqueue Activation tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "wordpress_version": { + "default": "6.4.3", + "description": "The WordPress version to use in the test.", + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] + }, + "woocommerce_version": { + "default": "8.6.1", + "description": "The WooCommerce version to use in the test.", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "optional_features": { + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", "type": "array", "uniqueItems": true, "items": { - "type": "integer", - "minimum": 1 + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] } }, - "additional_wordpress_plugins": { - "description": "A comma-separated list of Additional WordPress plugin slugs.", + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", + "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + } + } + }, + "security": { + "title": "Security Test", + "description": "Enqueue Security tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", + "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + } + } + }, + "phpcompatibility": { + "title": "PHPCompatibility Test", + "description": "Enqueue PHPCompatibility tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", + "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "min_php_version": { + "default": "7.2", + "description": "The minimum PHP version to test an extension's compatibility against.", + "type": "string", + "enum": [ + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "max_php_version": { + "default": "8.3", + "description": "The maximum PHP version to test an extension's compatibility against.", + "type": "string", + "enum": [ + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + } + } + }, + "malware": { + "title": "Malware Test", + "description": "Enqueue Malware tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", + "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "whitelist_paths": { + "description": "Paths to whitelist from malware scan.", "type": "array", - "uniqueItems": true, "items": { - "type": "string", - "minimum": 1 + "type": "string" } } } }, - "phpstan": { - "title": "phpstanTest", - "description": "Enqueue PHPStan tests.", + "woo-api": { + "title": "WooAPITest", + "description": "Enqueue Woo API tests.", "context": [ "view" ], @@ -117,12 +468,61 @@ "type": "integer" }, "wordpress_version": { + "default": "6.4.3", "description": "The WordPress version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] }, "woocommerce_version": { + "default": "8.6.1", "description": "The WooCommerce version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "optional_features": { + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] + } }, "upload_id": { "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", @@ -145,12 +545,34 @@ "default": "", "description": "What event originated this request.", "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "additional_woo_plugins": { + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } } } }, - "compatibility": { - "title": "compatibilityTest", - "description": "Enqueue Compatibility tests.", + "woo-e2e": { + "title": "WooE2ETest", + "description": "Enqueue Woo E2E tests.", "context": [ "view" ], @@ -162,26 +584,59 @@ "type": "integer" }, "wordpress_version": { + "default": "6.4.3", "description": "The WordPress version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] }, "woocommerce_version": { + "default": "8.6.1", "description": "The WooCommerce version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] }, "optional_features": { - "description": "WooCommerce features to enable in the testing environment.", - "type": "object", - "additionalProperties": false, - "properties": { - "hpos": { - "description": "Whether or not to enable High Performance Order Storage in the testing environment.", - "type": "boolean" - }, - "cc_blocks": { - "description": "Whether or not to enable Cart and Checkout Blocks in the testing environment.", - "type": "boolean" - } + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos" + ] + } + ] } }, "upload_id": { @@ -205,12 +660,34 @@ "default": "", "description": "What event originated this request.", "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "additional_woo_plugins": { + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } } } }, - "activation": { - "title": "Activation Test", - "description": "Enqueue Activation tests.", + "e2e": { + "title": "E2ETest", + "description": "Enqueue your custom E2E tests.", "context": [ "view" ], @@ -222,26 +699,60 @@ "type": "integer" }, "wordpress_version": { + "default": "6.4.3", "description": "The WordPress version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] }, "woocommerce_version": { + "default": "8.6.1", "description": "The WooCommerce version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] }, "optional_features": { - "description": "WooCommerce features to enable in the testing environment.", - "type": "object", - "additionalProperties": false, - "properties": { - "hpos": { - "description": "Whether or not to enable High Performance Order Storage in the testing environment.", - "type": "boolean" - }, - "cc_blocks": { - "description": "Whether or not to enable Cart and Checkout Blocks in the testing environment.", - "type": "boolean" - } + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] } }, "upload_id": { @@ -265,12 +776,44 @@ "default": "", "description": "What event originated this request.", "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "additional_woo_plugins": { + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } + }, + "compatibility": { + "description": "Controls the scope of compatibility checks when additional plugins are specified. Accepts two values:\n 1. \"sut\" (default): Runs only the end-to-end tests of the plugin under test (SUT). This option is used to verify that your plugin functions correctly in the presence of other plugins on the same site.\n 2. \"all\": Runs custom end-to-end tests for all specified plugins that have custom tests. This extends the check to ensure not only that your plugin operates as expected with other plugins active, but also that these other plugins function correctly with your plugin active. Note: Be cautious when using this option as flaky tests in other plugins may lead to unreliable results.", + "type": "string", + "required": "true", + "default": "sut", + "enum": [ + "sut", + "all" + ] } } }, - "security": { - "title": "Security Test", - "description": "Enqueue Security tests.", + "api": { + "title": "WooAPITest", + "description": "Enqueue Woo API tests.", "context": [ "view" ], @@ -281,6 +824,63 @@ "description": "A WooCommerce Extension ID", "type": "integer" }, + "wordpress_version": { + "default": "6.4.3", + "description": "The WordPress version to use in the test.", + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] + }, + "woocommerce_version": { + "default": "8.6.1", + "description": "The WooCommerce version to use in the test.", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "optional_features": { + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] + } + }, "upload_id": { "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", "type": "uuid" @@ -302,6 +902,206 @@ "default": "", "description": "What event originated this request.", "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "additional_woo_plugins": { + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } + } + } + }, + "mass": { + "title": "massTest", + "description": "Enqueue mass tests in QIT.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "trigger": { + "required": true, + "description": "What event triggered this test run", + "type": "string" + }, + "test_type": { + "required": true, + "description": "What test type to execute.", + "type": "string", + "enum": { + "phpstan": "phpstan", + "compatibility": "compatibility", + "activation": "activation", + "security": "security", + "phpcompatibility": "phpcompatibility", + "malware": "malware", + "woo-api": "woo-api", + "woo-e2e": "woo-e2e", + "e2e": "e2e", + "api": "api" + } + }, + "woocommerce_version": { + "description": "The WoooCommerce version to use in the test.", + "default": "stable", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "wordpress_version": { + "description": "The WordPress version to use in the test.", + "default": "stable", + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] + }, + "php_version": { + "description": "The PHP version to use in the test.", + "type": "string", + "default": "7.4", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "min_php_version": { + "default": "7.2", + "description": "The minimum PHP version to use in a PHPCompatibility.", + "type": "string", + "enum": [ + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "max_php_version": { + "default": "8.3", + "description": "The maximum PHP version to use in a PHPCompatibility.", + "type": "string", + "enum": [ + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "whitelist_paths": { + "description": "Paths to whitelist from malware scan.", + "type": "array", + "items": { + "type": "string" + } + }, + "optional_features": { + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] + } + }, + "additional_woo_plugins": { + "default": [], + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "default": [], + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } + }, + "max_extensions": { + "description": "Maximum number of extensions to test.", + "type": "integer" + }, + "include_all": { + "default": false, + "description": "If set, run a test against all extensions.", + "type": "boolean" + }, + "only_developed_by_woo": { + "default": false, + "description": "If set to true, will only test extensions developed by Woo.", + "type": "boolean" + }, + "only_vendor_ids": { + "default ": [], + "description": "If set, will only test the extensions owned by these vendor IDs. (Comma-separated list of vendor IDs).", + "type": "array", + "uniqueItems": true, + "items": { + "type": "int", + "minimum": 0 + } + }, + "product_type": { + "default": "plugin", + "description": "The product type to test. (extension, theme)", + "type": "string", + "enum": [ + "plugin", + "theme" + ] } } } @@ -319,7 +1119,11 @@ "id": 789, "slug": "baz-extension" } - ] + ], + "environments": { + "e2e": "37fa32aea1dd90c4bbc87fa0c78d03cf" + }, + "hide_e2e": false } } } diff --git a/src/tests/__snapshots__/PartnerManagementTest__test_add_partner_email__1.json b/src/tests/__snapshots__/PartnerManagementTest__test_add_partner_email__1.json index af13c1e7..4db21fb9 100644 --- a/src/tests/__snapshots__/PartnerManagementTest__test_add_partner_email__1.json +++ b/src/tests/__snapshots__/PartnerManagementTest__test_add_partner_email__1.json @@ -14,20 +14,26 @@ "manager_sync_v@QIT_CLI_VERSION@": { "expire": 1234567890, "value": { - "latest_cli_version": "0.1", + "latest_cli_version": "0.4.0", + "minimum_cli_version": "0.3.2", "enforce_latest": true, "test_types": { - "e2e": "e2e", "phpstan": "phpstan", "compatibility": "compatibility", "activation": "activation", - "security": "security" + "security": "security", + "phpcompatibility": "phpcompatibility", + "malware": "malware", + "woo-api": "woo-api", + "woo-e2e": "woo-e2e", + "e2e": "e2e", + "api": "api" }, - "wccom_url": "https:\/\/woocommerce.test", + "wccom_url": "https:\/\/woocommerce.com", "schemas": { - "e2e": { - "title": "e2eTest", - "description": "Enqueue E2E Tests.", + "phpstan": { + "title": "phpstanTest", + "description": "Enqueue PHPStan tests.", "context": [ "view" ], @@ -39,26 +45,129 @@ "type": "integer" }, "wordpress_version": { + "default": "6.4.3", "description": "The WordPress version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] }, "woocommerce_version": { + "default": "8.6.1", "description": "The WooCommerce version to use in the test.", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", "type": "string" }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + } + } + }, + "compatibility": { + "title": "compatibilityTest", + "description": "Enqueue Compatibility tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "wordpress_version": { + "default": "6.4.3", + "description": "The WordPress version to use in the test.", + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] + }, + "woocommerce_version": { + "default": "8.6.1", + "description": "The WooCommerce version to use in the test.", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, "optional_features": { - "description": "WooCommerce features to enable in the testing environment.", - "type": "object", - "additionalProperties": false, - "properties": { - "hpos": { - "description": "Whether or not to enable High Performance Order Storage in the testing environment.", - "type": "boolean" - }, - "cc_blocks": { - "description": "Whether or not to enable Cart and Checkout Blocks in the testing environment.", - "type": "boolean" - } + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] } }, "upload_id": { @@ -83,29 +192,271 @@ "description": "What event originated this request.", "type": "string" }, - "additional_woo_plugins": { - "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + } + } + }, + "activation": { + "title": "Activation Test", + "description": "Enqueue Activation tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "wordpress_version": { + "default": "6.4.3", + "description": "The WordPress version to use in the test.", + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] + }, + "woocommerce_version": { + "default": "8.6.1", + "description": "The WooCommerce version to use in the test.", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "optional_features": { + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", "type": "array", "uniqueItems": true, "items": { - "type": "integer", - "minimum": 1 + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] } }, - "additional_wordpress_plugins": { - "description": "A comma-separated list of Additional WordPress plugin slugs.", + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", + "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + } + } + }, + "security": { + "title": "Security Test", + "description": "Enqueue Security tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", + "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + } + } + }, + "phpcompatibility": { + "title": "PHPCompatibility Test", + "description": "Enqueue PHPCompatibility tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", + "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "min_php_version": { + "default": "7.2", + "description": "The minimum PHP version to test an extension's compatibility against.", + "type": "string", + "enum": [ + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "max_php_version": { + "default": "8.3", + "description": "The maximum PHP version to test an extension's compatibility against.", + "type": "string", + "enum": [ + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + } + } + }, + "malware": { + "title": "Malware Test", + "description": "Enqueue Malware tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", + "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "whitelist_paths": { + "description": "Paths to whitelist from malware scan.", "type": "array", - "uniqueItems": true, "items": { - "type": "string", - "minimum": 1 + "type": "string" } } } }, - "phpstan": { - "title": "phpstanTest", - "description": "Enqueue PHPStan tests.", + "woo-api": { + "title": "WooAPITest", + "description": "Enqueue Woo API tests.", "context": [ "view" ], @@ -117,12 +468,61 @@ "type": "integer" }, "wordpress_version": { + "default": "6.4.3", "description": "The WordPress version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] }, "woocommerce_version": { + "default": "8.6.1", "description": "The WooCommerce version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "optional_features": { + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] + } }, "upload_id": { "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", @@ -145,12 +545,34 @@ "default": "", "description": "What event originated this request.", "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "additional_woo_plugins": { + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } } } }, - "compatibility": { - "title": "compatibilityTest", - "description": "Enqueue Compatibility tests.", + "woo-e2e": { + "title": "WooE2ETest", + "description": "Enqueue Woo E2E tests.", "context": [ "view" ], @@ -162,26 +584,59 @@ "type": "integer" }, "wordpress_version": { + "default": "6.4.3", "description": "The WordPress version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] }, "woocommerce_version": { + "default": "8.6.1", "description": "The WooCommerce version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] }, "optional_features": { - "description": "WooCommerce features to enable in the testing environment.", - "type": "object", - "additionalProperties": false, - "properties": { - "hpos": { - "description": "Whether or not to enable High Performance Order Storage in the testing environment.", - "type": "boolean" - }, - "cc_blocks": { - "description": "Whether or not to enable Cart and Checkout Blocks in the testing environment.", - "type": "boolean" - } + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos" + ] + } + ] } }, "upload_id": { @@ -205,12 +660,34 @@ "default": "", "description": "What event originated this request.", "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "additional_woo_plugins": { + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } } } }, - "activation": { - "title": "Activation Test", - "description": "Enqueue Activation tests.", + "e2e": { + "title": "E2ETest", + "description": "Enqueue your custom E2E tests.", "context": [ "view" ], @@ -222,26 +699,60 @@ "type": "integer" }, "wordpress_version": { + "default": "6.4.3", "description": "The WordPress version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] }, "woocommerce_version": { + "default": "8.6.1", "description": "The WooCommerce version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] }, "optional_features": { - "description": "WooCommerce features to enable in the testing environment.", - "type": "object", - "additionalProperties": false, - "properties": { - "hpos": { - "description": "Whether or not to enable High Performance Order Storage in the testing environment.", - "type": "boolean" - }, - "cc_blocks": { - "description": "Whether or not to enable Cart and Checkout Blocks in the testing environment.", - "type": "boolean" - } + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] } }, "upload_id": { @@ -265,12 +776,44 @@ "default": "", "description": "What event originated this request.", "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "additional_woo_plugins": { + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } + }, + "compatibility": { + "description": "Controls the scope of compatibility checks when additional plugins are specified. Accepts two values:\n 1. \"sut\" (default): Runs only the end-to-end tests of the plugin under test (SUT). This option is used to verify that your plugin functions correctly in the presence of other plugins on the same site.\n 2. \"all\": Runs custom end-to-end tests for all specified plugins that have custom tests. This extends the check to ensure not only that your plugin operates as expected with other plugins active, but also that these other plugins function correctly with your plugin active. Note: Be cautious when using this option as flaky tests in other plugins may lead to unreliable results.", + "type": "string", + "required": "true", + "default": "sut", + "enum": [ + "sut", + "all" + ] } } }, - "security": { - "title": "Security Test", - "description": "Enqueue Security tests.", + "api": { + "title": "WooAPITest", + "description": "Enqueue Woo API tests.", "context": [ "view" ], @@ -281,6 +824,63 @@ "description": "A WooCommerce Extension ID", "type": "integer" }, + "wordpress_version": { + "default": "6.4.3", + "description": "The WordPress version to use in the test.", + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] + }, + "woocommerce_version": { + "default": "8.6.1", + "description": "The WooCommerce version to use in the test.", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "optional_features": { + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] + } + }, "upload_id": { "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", "type": "uuid" @@ -302,6 +902,206 @@ "default": "", "description": "What event originated this request.", "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "additional_woo_plugins": { + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } + } + } + }, + "mass": { + "title": "massTest", + "description": "Enqueue mass tests in QIT.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "trigger": { + "required": true, + "description": "What event triggered this test run", + "type": "string" + }, + "test_type": { + "required": true, + "description": "What test type to execute.", + "type": "string", + "enum": { + "phpstan": "phpstan", + "compatibility": "compatibility", + "activation": "activation", + "security": "security", + "phpcompatibility": "phpcompatibility", + "malware": "malware", + "woo-api": "woo-api", + "woo-e2e": "woo-e2e", + "e2e": "e2e", + "api": "api" + } + }, + "woocommerce_version": { + "description": "The WoooCommerce version to use in the test.", + "default": "stable", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "wordpress_version": { + "description": "The WordPress version to use in the test.", + "default": "stable", + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] + }, + "php_version": { + "description": "The PHP version to use in the test.", + "type": "string", + "default": "7.4", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "min_php_version": { + "default": "7.2", + "description": "The minimum PHP version to use in a PHPCompatibility.", + "type": "string", + "enum": [ + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "max_php_version": { + "default": "8.3", + "description": "The maximum PHP version to use in a PHPCompatibility.", + "type": "string", + "enum": [ + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "whitelist_paths": { + "description": "Paths to whitelist from malware scan.", + "type": "array", + "items": { + "type": "string" + } + }, + "optional_features": { + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] + } + }, + "additional_woo_plugins": { + "default": [], + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "default": [], + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } + }, + "max_extensions": { + "description": "Maximum number of extensions to test.", + "type": "integer" + }, + "include_all": { + "default": false, + "description": "If set, run a test against all extensions.", + "type": "boolean" + }, + "only_developed_by_woo": { + "default": false, + "description": "If set to true, will only test extensions developed by Woo.", + "type": "boolean" + }, + "only_vendor_ids": { + "default ": [], + "description": "If set, will only test the extensions owned by these vendor IDs. (Comma-separated list of vendor IDs).", + "type": "array", + "uniqueItems": true, + "items": { + "type": "int", + "minimum": 0 + } + }, + "product_type": { + "default": "plugin", + "description": "The product type to test. (extension, theme)", + "type": "string", + "enum": [ + "plugin", + "theme" + ] } } } @@ -319,7 +1119,11 @@ "id": 789, "slug": "baz-extension" } - ] + ], + "environments": { + "e2e": "37fa32aea1dd90c4bbc87fa0c78d03cf" + }, + "hide_e2e": false } } } diff --git a/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner__1.json b/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner__1.json index f9dd758e..52497d36 100644 --- a/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner__1.json +++ b/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner__1.json @@ -14,20 +14,26 @@ "manager_sync_v@QIT_CLI_VERSION@": { "expire": 1234567890, "value": { - "latest_cli_version": "0.1", + "latest_cli_version": "0.4.0", + "minimum_cli_version": "0.3.2", "enforce_latest": true, "test_types": { - "e2e": "e2e", "phpstan": "phpstan", "compatibility": "compatibility", "activation": "activation", - "security": "security" + "security": "security", + "phpcompatibility": "phpcompatibility", + "malware": "malware", + "woo-api": "woo-api", + "woo-e2e": "woo-e2e", + "e2e": "e2e", + "api": "api" }, - "wccom_url": "https:\/\/woocommerce.test", + "wccom_url": "https:\/\/woocommerce.com", "schemas": { - "e2e": { - "title": "e2eTest", - "description": "Enqueue E2E Tests.", + "phpstan": { + "title": "phpstanTest", + "description": "Enqueue PHPStan tests.", "context": [ "view" ], @@ -39,26 +45,129 @@ "type": "integer" }, "wordpress_version": { + "default": "6.4.3", "description": "The WordPress version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] }, "woocommerce_version": { + "default": "8.6.1", "description": "The WooCommerce version to use in the test.", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", "type": "string" }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + } + } + }, + "compatibility": { + "title": "compatibilityTest", + "description": "Enqueue Compatibility tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "wordpress_version": { + "default": "6.4.3", + "description": "The WordPress version to use in the test.", + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] + }, + "woocommerce_version": { + "default": "8.6.1", + "description": "The WooCommerce version to use in the test.", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, "optional_features": { - "description": "WooCommerce features to enable in the testing environment.", - "type": "object", - "additionalProperties": false, - "properties": { - "hpos": { - "description": "Whether or not to enable High Performance Order Storage in the testing environment.", - "type": "boolean" - }, - "cc_blocks": { - "description": "Whether or not to enable Cart and Checkout Blocks in the testing environment.", - "type": "boolean" - } + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] } }, "upload_id": { @@ -83,29 +192,271 @@ "description": "What event originated this request.", "type": "string" }, - "additional_woo_plugins": { - "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + } + } + }, + "activation": { + "title": "Activation Test", + "description": "Enqueue Activation tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "wordpress_version": { + "default": "6.4.3", + "description": "The WordPress version to use in the test.", + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] + }, + "woocommerce_version": { + "default": "8.6.1", + "description": "The WooCommerce version to use in the test.", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "optional_features": { + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", "type": "array", "uniqueItems": true, "items": { - "type": "integer", - "minimum": 1 + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] } }, - "additional_wordpress_plugins": { - "description": "A comma-separated list of Additional WordPress plugin slugs.", + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", + "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + } + } + }, + "security": { + "title": "Security Test", + "description": "Enqueue Security tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", + "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + } + } + }, + "phpcompatibility": { + "title": "PHPCompatibility Test", + "description": "Enqueue PHPCompatibility tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", + "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "min_php_version": { + "default": "7.2", + "description": "The minimum PHP version to test an extension's compatibility against.", + "type": "string", + "enum": [ + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "max_php_version": { + "default": "8.3", + "description": "The maximum PHP version to test an extension's compatibility against.", + "type": "string", + "enum": [ + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + } + } + }, + "malware": { + "title": "Malware Test", + "description": "Enqueue Malware tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", + "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "whitelist_paths": { + "description": "Paths to whitelist from malware scan.", "type": "array", - "uniqueItems": true, "items": { - "type": "string", - "minimum": 1 + "type": "string" } } } }, - "phpstan": { - "title": "phpstanTest", - "description": "Enqueue PHPStan tests.", + "woo-api": { + "title": "WooAPITest", + "description": "Enqueue Woo API tests.", "context": [ "view" ], @@ -117,12 +468,61 @@ "type": "integer" }, "wordpress_version": { + "default": "6.4.3", "description": "The WordPress version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] }, "woocommerce_version": { + "default": "8.6.1", "description": "The WooCommerce version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "optional_features": { + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] + } }, "upload_id": { "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", @@ -145,12 +545,34 @@ "default": "", "description": "What event originated this request.", "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "additional_woo_plugins": { + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } } } }, - "compatibility": { - "title": "compatibilityTest", - "description": "Enqueue Compatibility tests.", + "woo-e2e": { + "title": "WooE2ETest", + "description": "Enqueue Woo E2E tests.", "context": [ "view" ], @@ -162,26 +584,59 @@ "type": "integer" }, "wordpress_version": { + "default": "6.4.3", "description": "The WordPress version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] }, "woocommerce_version": { + "default": "8.6.1", "description": "The WooCommerce version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] }, "optional_features": { - "description": "WooCommerce features to enable in the testing environment.", - "type": "object", - "additionalProperties": false, - "properties": { - "hpos": { - "description": "Whether or not to enable High Performance Order Storage in the testing environment.", - "type": "boolean" - }, - "cc_blocks": { - "description": "Whether or not to enable Cart and Checkout Blocks in the testing environment.", - "type": "boolean" - } + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos" + ] + } + ] } }, "upload_id": { @@ -205,12 +660,34 @@ "default": "", "description": "What event originated this request.", "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "additional_woo_plugins": { + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } } } }, - "activation": { - "title": "Activation Test", - "description": "Enqueue Activation tests.", + "e2e": { + "title": "E2ETest", + "description": "Enqueue your custom E2E tests.", "context": [ "view" ], @@ -222,26 +699,60 @@ "type": "integer" }, "wordpress_version": { + "default": "6.4.3", "description": "The WordPress version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] }, "woocommerce_version": { + "default": "8.6.1", "description": "The WooCommerce version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] }, "optional_features": { - "description": "WooCommerce features to enable in the testing environment.", - "type": "object", - "additionalProperties": false, - "properties": { - "hpos": { - "description": "Whether or not to enable High Performance Order Storage in the testing environment.", - "type": "boolean" - }, - "cc_blocks": { - "description": "Whether or not to enable Cart and Checkout Blocks in the testing environment.", - "type": "boolean" - } + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] } }, "upload_id": { @@ -265,12 +776,44 @@ "default": "", "description": "What event originated this request.", "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "additional_woo_plugins": { + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } + }, + "compatibility": { + "description": "Controls the scope of compatibility checks when additional plugins are specified. Accepts two values:\n 1. \"sut\" (default): Runs only the end-to-end tests of the plugin under test (SUT). This option is used to verify that your plugin functions correctly in the presence of other plugins on the same site.\n 2. \"all\": Runs custom end-to-end tests for all specified plugins that have custom tests. This extends the check to ensure not only that your plugin operates as expected with other plugins active, but also that these other plugins function correctly with your plugin active. Note: Be cautious when using this option as flaky tests in other plugins may lead to unreliable results.", + "type": "string", + "required": "true", + "default": "sut", + "enum": [ + "sut", + "all" + ] } } }, - "security": { - "title": "Security Test", - "description": "Enqueue Security tests.", + "api": { + "title": "WooAPITest", + "description": "Enqueue Woo API tests.", "context": [ "view" ], @@ -281,6 +824,63 @@ "description": "A WooCommerce Extension ID", "type": "integer" }, + "wordpress_version": { + "default": "6.4.3", + "description": "The WordPress version to use in the test.", + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] + }, + "woocommerce_version": { + "default": "8.6.1", + "description": "The WooCommerce version to use in the test.", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "optional_features": { + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] + } + }, "upload_id": { "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", "type": "uuid" @@ -302,6 +902,206 @@ "default": "", "description": "What event originated this request.", "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "additional_woo_plugins": { + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } + } + } + }, + "mass": { + "title": "massTest", + "description": "Enqueue mass tests in QIT.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "trigger": { + "required": true, + "description": "What event triggered this test run", + "type": "string" + }, + "test_type": { + "required": true, + "description": "What test type to execute.", + "type": "string", + "enum": { + "phpstan": "phpstan", + "compatibility": "compatibility", + "activation": "activation", + "security": "security", + "phpcompatibility": "phpcompatibility", + "malware": "malware", + "woo-api": "woo-api", + "woo-e2e": "woo-e2e", + "e2e": "e2e", + "api": "api" + } + }, + "woocommerce_version": { + "description": "The WoooCommerce version to use in the test.", + "default": "stable", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "wordpress_version": { + "description": "The WordPress version to use in the test.", + "default": "stable", + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] + }, + "php_version": { + "description": "The PHP version to use in the test.", + "type": "string", + "default": "7.4", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "min_php_version": { + "default": "7.2", + "description": "The minimum PHP version to use in a PHPCompatibility.", + "type": "string", + "enum": [ + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "max_php_version": { + "default": "8.3", + "description": "The maximum PHP version to use in a PHPCompatibility.", + "type": "string", + "enum": [ + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "whitelist_paths": { + "description": "Paths to whitelist from malware scan.", + "type": "array", + "items": { + "type": "string" + } + }, + "optional_features": { + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] + } + }, + "additional_woo_plugins": { + "default": [], + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "default": [], + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } + }, + "max_extensions": { + "description": "Maximum number of extensions to test.", + "type": "integer" + }, + "include_all": { + "default": false, + "description": "If set, run a test against all extensions.", + "type": "boolean" + }, + "only_developed_by_woo": { + "default": false, + "description": "If set to true, will only test extensions developed by Woo.", + "type": "boolean" + }, + "only_vendor_ids": { + "default ": [], + "description": "If set, will only test the extensions owned by these vendor IDs. (Comma-separated list of vendor IDs).", + "type": "array", + "uniqueItems": true, + "items": { + "type": "int", + "minimum": 0 + } + }, + "product_type": { + "default": "plugin", + "description": "The product type to test. (extension, theme)", + "type": "string", + "enum": [ + "plugin", + "theme" + ] } } } @@ -319,7 +1119,11 @@ "id": 789, "slug": "baz-extension" } - ] + ], + "environments": { + "e2e": "37fa32aea1dd90c4bbc87fa0c78d03cf" + }, + "hide_e2e": false } } } diff --git a/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner__2.json b/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner__2.json index fa697b1d..d5fd5a2e 100644 --- a/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner__2.json +++ b/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner__2.json @@ -14,20 +14,26 @@ "manager_sync_v@QIT_CLI_VERSION@": { "expire": 1234567890, "value": { - "latest_cli_version": "0.1", + "latest_cli_version": "0.4.0", + "minimum_cli_version": "0.3.2", "enforce_latest": true, "test_types": { - "e2e": "e2e", "phpstan": "phpstan", "compatibility": "compatibility", "activation": "activation", - "security": "security" + "security": "security", + "phpcompatibility": "phpcompatibility", + "malware": "malware", + "woo-api": "woo-api", + "woo-e2e": "woo-e2e", + "e2e": "e2e", + "api": "api" }, - "wccom_url": "https:\/\/woocommerce.test", + "wccom_url": "https:\/\/woocommerce.com", "schemas": { - "e2e": { - "title": "e2eTest", - "description": "Enqueue E2E Tests.", + "phpstan": { + "title": "phpstanTest", + "description": "Enqueue PHPStan tests.", "context": [ "view" ], @@ -39,26 +45,129 @@ "type": "integer" }, "wordpress_version": { + "default": "6.4.3", "description": "The WordPress version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] }, "woocommerce_version": { + "default": "8.6.1", "description": "The WooCommerce version to use in the test.", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", "type": "string" }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + } + } + }, + "compatibility": { + "title": "compatibilityTest", + "description": "Enqueue Compatibility tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "wordpress_version": { + "default": "6.4.3", + "description": "The WordPress version to use in the test.", + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] + }, + "woocommerce_version": { + "default": "8.6.1", + "description": "The WooCommerce version to use in the test.", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, "optional_features": { - "description": "WooCommerce features to enable in the testing environment.", - "type": "object", - "additionalProperties": false, - "properties": { - "hpos": { - "description": "Whether or not to enable High Performance Order Storage in the testing environment.", - "type": "boolean" - }, - "cc_blocks": { - "description": "Whether or not to enable Cart and Checkout Blocks in the testing environment.", - "type": "boolean" - } + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] } }, "upload_id": { @@ -83,29 +192,271 @@ "description": "What event originated this request.", "type": "string" }, - "additional_woo_plugins": { - "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + } + } + }, + "activation": { + "title": "Activation Test", + "description": "Enqueue Activation tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "wordpress_version": { + "default": "6.4.3", + "description": "The WordPress version to use in the test.", + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] + }, + "woocommerce_version": { + "default": "8.6.1", + "description": "The WooCommerce version to use in the test.", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "optional_features": { + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", "type": "array", "uniqueItems": true, "items": { - "type": "integer", - "minimum": 1 + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] } }, - "additional_wordpress_plugins": { - "description": "A comma-separated list of Additional WordPress plugin slugs.", + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", + "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + } + } + }, + "security": { + "title": "Security Test", + "description": "Enqueue Security tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", + "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + } + } + }, + "phpcompatibility": { + "title": "PHPCompatibility Test", + "description": "Enqueue PHPCompatibility tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", + "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "min_php_version": { + "default": "7.2", + "description": "The minimum PHP version to test an extension's compatibility against.", + "type": "string", + "enum": [ + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "max_php_version": { + "default": "8.3", + "description": "The maximum PHP version to test an extension's compatibility against.", + "type": "string", + "enum": [ + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + } + } + }, + "malware": { + "title": "Malware Test", + "description": "Enqueue Malware tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", + "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "whitelist_paths": { + "description": "Paths to whitelist from malware scan.", "type": "array", - "uniqueItems": true, "items": { - "type": "string", - "minimum": 1 + "type": "string" } } } }, - "phpstan": { - "title": "phpstanTest", - "description": "Enqueue PHPStan tests.", + "woo-api": { + "title": "WooAPITest", + "description": "Enqueue Woo API tests.", "context": [ "view" ], @@ -117,12 +468,61 @@ "type": "integer" }, "wordpress_version": { + "default": "6.4.3", "description": "The WordPress version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] }, "woocommerce_version": { + "default": "8.6.1", "description": "The WooCommerce version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "optional_features": { + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] + } }, "upload_id": { "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", @@ -145,12 +545,34 @@ "default": "", "description": "What event originated this request.", "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "additional_woo_plugins": { + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } } } }, - "compatibility": { - "title": "compatibilityTest", - "description": "Enqueue Compatibility tests.", + "woo-e2e": { + "title": "WooE2ETest", + "description": "Enqueue Woo E2E tests.", "context": [ "view" ], @@ -162,26 +584,59 @@ "type": "integer" }, "wordpress_version": { + "default": "6.4.3", "description": "The WordPress version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] }, "woocommerce_version": { + "default": "8.6.1", "description": "The WooCommerce version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] }, "optional_features": { - "description": "WooCommerce features to enable in the testing environment.", - "type": "object", - "additionalProperties": false, - "properties": { - "hpos": { - "description": "Whether or not to enable High Performance Order Storage in the testing environment.", - "type": "boolean" - }, - "cc_blocks": { - "description": "Whether or not to enable Cart and Checkout Blocks in the testing environment.", - "type": "boolean" - } + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos" + ] + } + ] } }, "upload_id": { @@ -205,12 +660,34 @@ "default": "", "description": "What event originated this request.", "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "additional_woo_plugins": { + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } } } }, - "activation": { - "title": "Activation Test", - "description": "Enqueue Activation tests.", + "e2e": { + "title": "E2ETest", + "description": "Enqueue your custom E2E tests.", "context": [ "view" ], @@ -222,26 +699,60 @@ "type": "integer" }, "wordpress_version": { + "default": "6.4.3", "description": "The WordPress version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] }, "woocommerce_version": { + "default": "8.6.1", "description": "The WooCommerce version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] }, "optional_features": { - "description": "WooCommerce features to enable in the testing environment.", - "type": "object", - "additionalProperties": false, - "properties": { - "hpos": { - "description": "Whether or not to enable High Performance Order Storage in the testing environment.", - "type": "boolean" - }, - "cc_blocks": { - "description": "Whether or not to enable Cart and Checkout Blocks in the testing environment.", - "type": "boolean" - } + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] } }, "upload_id": { @@ -265,12 +776,44 @@ "default": "", "description": "What event originated this request.", "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "additional_woo_plugins": { + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } + }, + "compatibility": { + "description": "Controls the scope of compatibility checks when additional plugins are specified. Accepts two values:\n 1. \"sut\" (default): Runs only the end-to-end tests of the plugin under test (SUT). This option is used to verify that your plugin functions correctly in the presence of other plugins on the same site.\n 2. \"all\": Runs custom end-to-end tests for all specified plugins that have custom tests. This extends the check to ensure not only that your plugin operates as expected with other plugins active, but also that these other plugins function correctly with your plugin active. Note: Be cautious when using this option as flaky tests in other plugins may lead to unreliable results.", + "type": "string", + "required": "true", + "default": "sut", + "enum": [ + "sut", + "all" + ] } } }, - "security": { - "title": "Security Test", - "description": "Enqueue Security tests.", + "api": { + "title": "WooAPITest", + "description": "Enqueue Woo API tests.", "context": [ "view" ], @@ -281,6 +824,63 @@ "description": "A WooCommerce Extension ID", "type": "integer" }, + "wordpress_version": { + "default": "6.4.3", + "description": "The WordPress version to use in the test.", + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] + }, + "woocommerce_version": { + "default": "8.6.1", + "description": "The WooCommerce version to use in the test.", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "optional_features": { + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] + } + }, "upload_id": { "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", "type": "uuid" @@ -302,6 +902,206 @@ "default": "", "description": "What event originated this request.", "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "additional_woo_plugins": { + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } + } + } + }, + "mass": { + "title": "massTest", + "description": "Enqueue mass tests in QIT.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "trigger": { + "required": true, + "description": "What event triggered this test run", + "type": "string" + }, + "test_type": { + "required": true, + "description": "What test type to execute.", + "type": "string", + "enum": { + "phpstan": "phpstan", + "compatibility": "compatibility", + "activation": "activation", + "security": "security", + "phpcompatibility": "phpcompatibility", + "malware": "malware", + "woo-api": "woo-api", + "woo-e2e": "woo-e2e", + "e2e": "e2e", + "api": "api" + } + }, + "woocommerce_version": { + "description": "The WoooCommerce version to use in the test.", + "default": "stable", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "wordpress_version": { + "description": "The WordPress version to use in the test.", + "default": "stable", + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] + }, + "php_version": { + "description": "The PHP version to use in the test.", + "type": "string", + "default": "7.4", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "min_php_version": { + "default": "7.2", + "description": "The minimum PHP version to use in a PHPCompatibility.", + "type": "string", + "enum": [ + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "max_php_version": { + "default": "8.3", + "description": "The maximum PHP version to use in a PHPCompatibility.", + "type": "string", + "enum": [ + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "whitelist_paths": { + "description": "Paths to whitelist from malware scan.", + "type": "array", + "items": { + "type": "string" + } + }, + "optional_features": { + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] + } + }, + "additional_woo_plugins": { + "default": [], + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "default": [], + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } + }, + "max_extensions": { + "description": "Maximum number of extensions to test.", + "type": "integer" + }, + "include_all": { + "default": false, + "description": "If set, run a test against all extensions.", + "type": "boolean" + }, + "only_developed_by_woo": { + "default": false, + "description": "If set to true, will only test extensions developed by Woo.", + "type": "boolean" + }, + "only_vendor_ids": { + "default ": [], + "description": "If set, will only test the extensions owned by these vendor IDs. (Comma-separated list of vendor IDs).", + "type": "array", + "uniqueItems": true, + "items": { + "type": "int", + "minimum": 0 + } + }, + "product_type": { + "default": "plugin", + "description": "The product type to test. (extension, theme)", + "type": "string", + "enum": [ + "plugin", + "theme" + ] } } } @@ -319,7 +1119,11 @@ "id": 789, "slug": "baz-extension" } - ] + ], + "environments": { + "e2e": "37fa32aea1dd90c4bbc87fa0c78d03cf" + }, + "hide_e2e": false } } } diff --git a/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner_on_different_environments__1.json b/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner_on_different_environments__1.json index bb3841ba..3fad343c 100644 --- a/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner_on_different_environments__1.json +++ b/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner_on_different_environments__1.json @@ -14,20 +14,26 @@ "manager_sync_v@QIT_CLI_VERSION@": { "expire": 1234567890, "value": { - "latest_cli_version": "0.1", + "latest_cli_version": "0.4.0", + "minimum_cli_version": "0.3.2", "enforce_latest": true, "test_types": { - "e2e": "e2e", "phpstan": "phpstan", "compatibility": "compatibility", "activation": "activation", - "security": "security" + "security": "security", + "phpcompatibility": "phpcompatibility", + "malware": "malware", + "woo-api": "woo-api", + "woo-e2e": "woo-e2e", + "e2e": "e2e", + "api": "api" }, - "wccom_url": "https:\/\/woocommerce.test", + "wccom_url": "https:\/\/woocommerce.com", "schemas": { - "e2e": { - "title": "e2eTest", - "description": "Enqueue E2E Tests.", + "phpstan": { + "title": "phpstanTest", + "description": "Enqueue PHPStan tests.", "context": [ "view" ], @@ -39,26 +45,129 @@ "type": "integer" }, "wordpress_version": { + "default": "6.4.3", "description": "The WordPress version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] }, "woocommerce_version": { + "default": "8.6.1", "description": "The WooCommerce version to use in the test.", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", "type": "string" }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + } + } + }, + "compatibility": { + "title": "compatibilityTest", + "description": "Enqueue Compatibility tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "wordpress_version": { + "default": "6.4.3", + "description": "The WordPress version to use in the test.", + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] + }, + "woocommerce_version": { + "default": "8.6.1", + "description": "The WooCommerce version to use in the test.", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, "optional_features": { - "description": "WooCommerce features to enable in the testing environment.", - "type": "object", - "additionalProperties": false, - "properties": { - "hpos": { - "description": "Whether or not to enable High Performance Order Storage in the testing environment.", - "type": "boolean" - }, - "cc_blocks": { - "description": "Whether or not to enable Cart and Checkout Blocks in the testing environment.", - "type": "boolean" - } + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] } }, "upload_id": { @@ -83,29 +192,271 @@ "description": "What event originated this request.", "type": "string" }, - "additional_woo_plugins": { - "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + } + } + }, + "activation": { + "title": "Activation Test", + "description": "Enqueue Activation tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "wordpress_version": { + "default": "6.4.3", + "description": "The WordPress version to use in the test.", + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] + }, + "woocommerce_version": { + "default": "8.6.1", + "description": "The WooCommerce version to use in the test.", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "optional_features": { + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", "type": "array", "uniqueItems": true, "items": { - "type": "integer", - "minimum": 1 + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] } }, - "additional_wordpress_plugins": { - "description": "A comma-separated list of Additional WordPress plugin slugs.", + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", + "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + } + } + }, + "security": { + "title": "Security Test", + "description": "Enqueue Security tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", + "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + } + } + }, + "phpcompatibility": { + "title": "PHPCompatibility Test", + "description": "Enqueue PHPCompatibility tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", + "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "min_php_version": { + "default": "7.2", + "description": "The minimum PHP version to test an extension's compatibility against.", + "type": "string", + "enum": [ + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "max_php_version": { + "default": "8.3", + "description": "The maximum PHP version to test an extension's compatibility against.", + "type": "string", + "enum": [ + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + } + } + }, + "malware": { + "title": "Malware Test", + "description": "Enqueue Malware tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", + "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "whitelist_paths": { + "description": "Paths to whitelist from malware scan.", "type": "array", - "uniqueItems": true, "items": { - "type": "string", - "minimum": 1 + "type": "string" } } } }, - "phpstan": { - "title": "phpstanTest", - "description": "Enqueue PHPStan tests.", + "woo-api": { + "title": "WooAPITest", + "description": "Enqueue Woo API tests.", "context": [ "view" ], @@ -117,12 +468,61 @@ "type": "integer" }, "wordpress_version": { + "default": "6.4.3", "description": "The WordPress version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] }, "woocommerce_version": { + "default": "8.6.1", "description": "The WooCommerce version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "optional_features": { + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] + } }, "upload_id": { "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", @@ -145,12 +545,34 @@ "default": "", "description": "What event originated this request.", "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "additional_woo_plugins": { + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } } } }, - "compatibility": { - "title": "compatibilityTest", - "description": "Enqueue Compatibility tests.", + "woo-e2e": { + "title": "WooE2ETest", + "description": "Enqueue Woo E2E tests.", "context": [ "view" ], @@ -162,26 +584,59 @@ "type": "integer" }, "wordpress_version": { + "default": "6.4.3", "description": "The WordPress version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] }, "woocommerce_version": { + "default": "8.6.1", "description": "The WooCommerce version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] }, "optional_features": { - "description": "WooCommerce features to enable in the testing environment.", - "type": "object", - "additionalProperties": false, - "properties": { - "hpos": { - "description": "Whether or not to enable High Performance Order Storage in the testing environment.", - "type": "boolean" - }, - "cc_blocks": { - "description": "Whether or not to enable Cart and Checkout Blocks in the testing environment.", - "type": "boolean" - } + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos" + ] + } + ] } }, "upload_id": { @@ -205,12 +660,34 @@ "default": "", "description": "What event originated this request.", "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "additional_woo_plugins": { + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } } } }, - "activation": { - "title": "Activation Test", - "description": "Enqueue Activation tests.", + "e2e": { + "title": "E2ETest", + "description": "Enqueue your custom E2E tests.", "context": [ "view" ], @@ -222,26 +699,60 @@ "type": "integer" }, "wordpress_version": { + "default": "6.4.3", "description": "The WordPress version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] }, "woocommerce_version": { + "default": "8.6.1", "description": "The WooCommerce version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] }, "optional_features": { - "description": "WooCommerce features to enable in the testing environment.", - "type": "object", - "additionalProperties": false, - "properties": { - "hpos": { - "description": "Whether or not to enable High Performance Order Storage in the testing environment.", - "type": "boolean" - }, - "cc_blocks": { - "description": "Whether or not to enable Cart and Checkout Blocks in the testing environment.", - "type": "boolean" - } + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] } }, "upload_id": { @@ -265,12 +776,44 @@ "default": "", "description": "What event originated this request.", "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "additional_woo_plugins": { + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } + }, + "compatibility": { + "description": "Controls the scope of compatibility checks when additional plugins are specified. Accepts two values:\n 1. \"sut\" (default): Runs only the end-to-end tests of the plugin under test (SUT). This option is used to verify that your plugin functions correctly in the presence of other plugins on the same site.\n 2. \"all\": Runs custom end-to-end tests for all specified plugins that have custom tests. This extends the check to ensure not only that your plugin operates as expected with other plugins active, but also that these other plugins function correctly with your plugin active. Note: Be cautious when using this option as flaky tests in other plugins may lead to unreliable results.", + "type": "string", + "required": "true", + "default": "sut", + "enum": [ + "sut", + "all" + ] } } }, - "security": { - "title": "Security Test", - "description": "Enqueue Security tests.", + "api": { + "title": "WooAPITest", + "description": "Enqueue Woo API tests.", "context": [ "view" ], @@ -281,6 +824,63 @@ "description": "A WooCommerce Extension ID", "type": "integer" }, + "wordpress_version": { + "default": "6.4.3", + "description": "The WordPress version to use in the test.", + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] + }, + "woocommerce_version": { + "default": "8.6.1", + "description": "The WooCommerce version to use in the test.", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "optional_features": { + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] + } + }, "upload_id": { "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", "type": "uuid" @@ -302,6 +902,206 @@ "default": "", "description": "What event originated this request.", "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "additional_woo_plugins": { + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } + } + } + }, + "mass": { + "title": "massTest", + "description": "Enqueue mass tests in QIT.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "trigger": { + "required": true, + "description": "What event triggered this test run", + "type": "string" + }, + "test_type": { + "required": true, + "description": "What test type to execute.", + "type": "string", + "enum": { + "phpstan": "phpstan", + "compatibility": "compatibility", + "activation": "activation", + "security": "security", + "phpcompatibility": "phpcompatibility", + "malware": "malware", + "woo-api": "woo-api", + "woo-e2e": "woo-e2e", + "e2e": "e2e", + "api": "api" + } + }, + "woocommerce_version": { + "description": "The WoooCommerce version to use in the test.", + "default": "stable", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "wordpress_version": { + "description": "The WordPress version to use in the test.", + "default": "stable", + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] + }, + "php_version": { + "description": "The PHP version to use in the test.", + "type": "string", + "default": "7.4", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "min_php_version": { + "default": "7.2", + "description": "The minimum PHP version to use in a PHPCompatibility.", + "type": "string", + "enum": [ + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "max_php_version": { + "default": "8.3", + "description": "The maximum PHP version to use in a PHPCompatibility.", + "type": "string", + "enum": [ + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "whitelist_paths": { + "description": "Paths to whitelist from malware scan.", + "type": "array", + "items": { + "type": "string" + } + }, + "optional_features": { + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] + } + }, + "additional_woo_plugins": { + "default": [], + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "default": [], + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } + }, + "max_extensions": { + "description": "Maximum number of extensions to test.", + "type": "integer" + }, + "include_all": { + "default": false, + "description": "If set, run a test against all extensions.", + "type": "boolean" + }, + "only_developed_by_woo": { + "default": false, + "description": "If set to true, will only test extensions developed by Woo.", + "type": "boolean" + }, + "only_vendor_ids": { + "default ": [], + "description": "If set, will only test the extensions owned by these vendor IDs. (Comma-separated list of vendor IDs).", + "type": "array", + "uniqueItems": true, + "items": { + "type": "int", + "minimum": 0 + } + }, + "product_type": { + "default": "plugin", + "description": "The product type to test. (extension, theme)", + "type": "string", + "enum": [ + "plugin", + "theme" + ] } } } @@ -319,7 +1119,11 @@ "id": 789, "slug": "baz-extension" } - ] + ], + "environments": { + "e2e": "37fa32aea1dd90c4bbc87fa0c78d03cf" + }, + "hide_e2e": false } } } diff --git a/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner_on_different_environments__2.json b/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner_on_different_environments__2.json index 9af92431..9d47c64c 100644 --- a/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner_on_different_environments__2.json +++ b/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner_on_different_environments__2.json @@ -14,20 +14,26 @@ "manager_sync_v@QIT_CLI_VERSION@": { "expire": 1234567890, "value": { - "latest_cli_version": "0.1", + "latest_cli_version": "0.4.0", + "minimum_cli_version": "0.3.2", "enforce_latest": true, "test_types": { - "e2e": "e2e", "phpstan": "phpstan", "compatibility": "compatibility", "activation": "activation", - "security": "security" + "security": "security", + "phpcompatibility": "phpcompatibility", + "malware": "malware", + "woo-api": "woo-api", + "woo-e2e": "woo-e2e", + "e2e": "e2e", + "api": "api" }, - "wccom_url": "https:\/\/woocommerce.test", + "wccom_url": "https:\/\/woocommerce.com", "schemas": { - "e2e": { - "title": "e2eTest", - "description": "Enqueue E2E Tests.", + "phpstan": { + "title": "phpstanTest", + "description": "Enqueue PHPStan tests.", "context": [ "view" ], @@ -39,26 +45,129 @@ "type": "integer" }, "wordpress_version": { + "default": "6.4.3", "description": "The WordPress version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] }, "woocommerce_version": { + "default": "8.6.1", "description": "The WooCommerce version to use in the test.", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", "type": "string" }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + } + } + }, + "compatibility": { + "title": "compatibilityTest", + "description": "Enqueue Compatibility tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "wordpress_version": { + "default": "6.4.3", + "description": "The WordPress version to use in the test.", + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] + }, + "woocommerce_version": { + "default": "8.6.1", + "description": "The WooCommerce version to use in the test.", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, "optional_features": { - "description": "WooCommerce features to enable in the testing environment.", - "type": "object", - "additionalProperties": false, - "properties": { - "hpos": { - "description": "Whether or not to enable High Performance Order Storage in the testing environment.", - "type": "boolean" - }, - "cc_blocks": { - "description": "Whether or not to enable Cart and Checkout Blocks in the testing environment.", - "type": "boolean" - } + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] } }, "upload_id": { @@ -83,29 +192,271 @@ "description": "What event originated this request.", "type": "string" }, - "additional_woo_plugins": { - "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + } + } + }, + "activation": { + "title": "Activation Test", + "description": "Enqueue Activation tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "wordpress_version": { + "default": "6.4.3", + "description": "The WordPress version to use in the test.", + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] + }, + "woocommerce_version": { + "default": "8.6.1", + "description": "The WooCommerce version to use in the test.", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "optional_features": { + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", "type": "array", "uniqueItems": true, "items": { - "type": "integer", - "minimum": 1 + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] } }, - "additional_wordpress_plugins": { - "description": "A comma-separated list of Additional WordPress plugin slugs.", + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", + "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + } + } + }, + "security": { + "title": "Security Test", + "description": "Enqueue Security tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", + "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + } + } + }, + "phpcompatibility": { + "title": "PHPCompatibility Test", + "description": "Enqueue PHPCompatibility tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", + "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "min_php_version": { + "default": "7.2", + "description": "The minimum PHP version to test an extension's compatibility against.", + "type": "string", + "enum": [ + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "max_php_version": { + "default": "8.3", + "description": "The maximum PHP version to test an extension's compatibility against.", + "type": "string", + "enum": [ + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + } + } + }, + "malware": { + "title": "Malware Test", + "description": "Enqueue Malware tests.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", + "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "whitelist_paths": { + "description": "Paths to whitelist from malware scan.", "type": "array", - "uniqueItems": true, "items": { - "type": "string", - "minimum": 1 + "type": "string" } } } }, - "phpstan": { - "title": "phpstanTest", - "description": "Enqueue PHPStan tests.", + "woo-api": { + "title": "WooAPITest", + "description": "Enqueue Woo API tests.", "context": [ "view" ], @@ -117,12 +468,61 @@ "type": "integer" }, "wordpress_version": { + "default": "6.4.3", "description": "The WordPress version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] }, "woocommerce_version": { + "default": "8.6.1", "description": "The WooCommerce version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "optional_features": { + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] + } }, "upload_id": { "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", @@ -145,12 +545,34 @@ "default": "", "description": "What event originated this request.", "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "additional_woo_plugins": { + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } } } }, - "compatibility": { - "title": "compatibilityTest", - "description": "Enqueue Compatibility tests.", + "woo-e2e": { + "title": "WooE2ETest", + "description": "Enqueue Woo E2E tests.", "context": [ "view" ], @@ -162,26 +584,59 @@ "type": "integer" }, "wordpress_version": { + "default": "6.4.3", "description": "The WordPress version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] }, "woocommerce_version": { + "default": "8.6.1", "description": "The WooCommerce version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] }, "optional_features": { - "description": "WooCommerce features to enable in the testing environment.", - "type": "object", - "additionalProperties": false, - "properties": { - "hpos": { - "description": "Whether or not to enable High Performance Order Storage in the testing environment.", - "type": "boolean" - }, - "cc_blocks": { - "description": "Whether or not to enable Cart and Checkout Blocks in the testing environment.", - "type": "boolean" - } + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos" + ] + } + ] } }, "upload_id": { @@ -205,12 +660,34 @@ "default": "", "description": "What event originated this request.", "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "additional_woo_plugins": { + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } } } }, - "activation": { - "title": "Activation Test", - "description": "Enqueue Activation tests.", + "e2e": { + "title": "E2ETest", + "description": "Enqueue your custom E2E tests.", "context": [ "view" ], @@ -222,26 +699,60 @@ "type": "integer" }, "wordpress_version": { + "default": "6.4.3", "description": "The WordPress version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] }, "woocommerce_version": { + "default": "8.6.1", "description": "The WooCommerce version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] }, "optional_features": { - "description": "WooCommerce features to enable in the testing environment.", - "type": "object", - "additionalProperties": false, - "properties": { - "hpos": { - "description": "Whether or not to enable High Performance Order Storage in the testing environment.", - "type": "boolean" - }, - "cc_blocks": { - "description": "Whether or not to enable Cart and Checkout Blocks in the testing environment.", - "type": "boolean" - } + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] } }, "upload_id": { @@ -265,12 +776,44 @@ "default": "", "description": "What event originated this request.", "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "additional_woo_plugins": { + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } + }, + "compatibility": { + "description": "Controls the scope of compatibility checks when additional plugins are specified. Accepts two values:\n 1. \"sut\" (default): Runs only the end-to-end tests of the plugin under test (SUT). This option is used to verify that your plugin functions correctly in the presence of other plugins on the same site.\n 2. \"all\": Runs custom end-to-end tests for all specified plugins that have custom tests. This extends the check to ensure not only that your plugin operates as expected with other plugins active, but also that these other plugins function correctly with your plugin active. Note: Be cautious when using this option as flaky tests in other plugins may lead to unreliable results.", + "type": "string", + "required": "true", + "default": "sut", + "enum": [ + "sut", + "all" + ] } } }, - "security": { - "title": "Security Test", - "description": "Enqueue Security tests.", + "api": { + "title": "WooAPITest", + "description": "Enqueue Woo API tests.", "context": [ "view" ], @@ -281,6 +824,63 @@ "description": "A WooCommerce Extension ID", "type": "integer" }, + "wordpress_version": { + "default": "6.4.3", + "description": "The WordPress version to use in the test.", + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] + }, + "woocommerce_version": { + "default": "8.6.1", + "description": "The WooCommerce version to use in the test.", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "optional_features": { + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] + } + }, "upload_id": { "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", "type": "uuid" @@ -302,6 +902,206 @@ "default": "", "description": "What event originated this request.", "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "additional_woo_plugins": { + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } + } + } + }, + "mass": { + "title": "massTest", + "description": "Enqueue mass tests in QIT.", + "context": [ + "view" + ], + "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", + "type": "object", + "properties": { + "trigger": { + "required": true, + "description": "What event triggered this test run", + "type": "string" + }, + "test_type": { + "required": true, + "description": "What test type to execute.", + "type": "string", + "enum": { + "phpstan": "phpstan", + "compatibility": "compatibility", + "activation": "activation", + "security": "security", + "phpcompatibility": "phpcompatibility", + "malware": "malware", + "woo-api": "woo-api", + "woo-e2e": "woo-e2e", + "e2e": "e2e", + "api": "api" + } + }, + "woocommerce_version": { + "description": "The WoooCommerce version to use in the test.", + "default": "stable", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "wordpress_version": { + "description": "The WordPress version to use in the test.", + "default": "stable", + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] + }, + "php_version": { + "description": "The PHP version to use in the test.", + "type": "string", + "default": "7.4", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "min_php_version": { + "default": "7.2", + "description": "The minimum PHP version to use in a PHPCompatibility.", + "type": "string", + "enum": [ + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "max_php_version": { + "default": "8.3", + "description": "The maximum PHP version to use in a PHPCompatibility.", + "type": "string", + "enum": [ + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "whitelist_paths": { + "description": "Paths to whitelist from malware scan.", + "type": "array", + "items": { + "type": "string" + } + }, + "optional_features": { + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] + } + }, + "additional_woo_plugins": { + "default": [], + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "default": [], + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } + }, + "max_extensions": { + "description": "Maximum number of extensions to test.", + "type": "integer" + }, + "include_all": { + "default": false, + "description": "If set, run a test against all extensions.", + "type": "boolean" + }, + "only_developed_by_woo": { + "default": false, + "description": "If set to true, will only test extensions developed by Woo.", + "type": "boolean" + }, + "only_vendor_ids": { + "default ": [], + "description": "If set, will only test the extensions owned by these vendor IDs. (Comma-separated list of vendor IDs).", + "type": "array", + "uniqueItems": true, + "items": { + "type": "int", + "minimum": 0 + } + }, + "product_type": { + "default": "plugin", + "description": "The product type to test. (extension, theme)", + "type": "string", + "enum": [ + "plugin", + "theme" + ] } } } @@ -319,7 +1119,11 @@ "id": 789, "slug": "baz-extension" } - ] + ], + "environments": { + "e2e": "37fa32aea1dd90c4bbc87fa0c78d03cf" + }, + "hide_e2e": false } } } diff --git a/src/tests/__snapshots__/RunTestsTest__test_run_with_additional_woo_plugins__1.json b/src/tests/__snapshots__/RunTestsTest__test_run_with_additional_woo_plugins__1.json index 03c54ee0..3db52378 100644 --- a/src/tests/__snapshots__/RunTestsTest__test_run_with_additional_woo_plugins__1.json +++ b/src/tests/__snapshots__/RunTestsTest__test_run_with_additional_woo_plugins__1.json @@ -2,7 +2,11 @@ "url": "https:\/\/qit.woo.com\/wp-json\/cd\/v1\/enqueue-e2e", "method": "POST", "post_body": { + "wordpress_version": "6.4.3", + "woocommerce_version": "8.6.1", + "php_version": "7.4", "additional_woo_plugins": "456,789", + "compatibility": "sut", "woo_id": 123, "event": "cli_published_extension_test" }, diff --git a/src/tests/__snapshots__/RunTestsTest__test_run_with_additional_woo_plugins__2.json b/src/tests/__snapshots__/RunTestsTest__test_run_with_additional_woo_plugins__2.json index 22dddd35..ef395185 100644 --- a/src/tests/__snapshots__/RunTestsTest__test_run_with_additional_woo_plugins__2.json +++ b/src/tests/__snapshots__/RunTestsTest__test_run_with_additional_woo_plugins__2.json @@ -2,7 +2,11 @@ "url": "https:\/\/qit.woo.com\/wp-json\/cd\/v1\/enqueue-e2e", "method": "POST", "post_body": { + "wordpress_version": "6.4.3", + "woocommerce_version": "8.6.1", + "php_version": "7.4", "additional_woo_plugins": "456,789", + "compatibility": "sut", "woo_id": "123", "event": "cli_published_extension_test" }, diff --git a/src/tests/__snapshots__/RunTestsTest__test_run_with_additional_woo_plugins__3.json b/src/tests/__snapshots__/RunTestsTest__test_run_with_additional_woo_plugins__3.json index 03c54ee0..3db52378 100644 --- a/src/tests/__snapshots__/RunTestsTest__test_run_with_additional_woo_plugins__3.json +++ b/src/tests/__snapshots__/RunTestsTest__test_run_with_additional_woo_plugins__3.json @@ -2,7 +2,11 @@ "url": "https:\/\/qit.woo.com\/wp-json\/cd\/v1\/enqueue-e2e", "method": "POST", "post_body": { + "wordpress_version": "6.4.3", + "woocommerce_version": "8.6.1", + "php_version": "7.4", "additional_woo_plugins": "456,789", + "compatibility": "sut", "woo_id": 123, "event": "cli_published_extension_test" }, diff --git a/src/tests/data/sync.json b/src/tests/data/sync.json index 1ba8ba94..178dd550 100644 --- a/src/tests/data/sync.json +++ b/src/tests/data/sync.json @@ -1,18 +1,24 @@ { - "latest_cli_version": "0.1", + "latest_cli_version": "0.4.0", + "minimum_cli_version": "0.3.2", "enforce_latest": true, "test_types": { - "e2e": "e2e", "phpstan": "phpstan", "compatibility": "compatibility", "activation": "activation", - "security": "security" + "security": "security", + "phpcompatibility": "phpcompatibility", + "malware": "malware", + "woo-api": "woo-api", + "woo-e2e": "woo-e2e", + "e2e": "e2e", + "api": "api" }, - "wccom_url": "https://woocommerce.test", + "wccom_url": "https://woocommerce.com", "schemas": { - "e2e": { - "title": "e2eTest", - "description": "Enqueue E2E Tests.", + "phpstan": { + "title": "phpstanTest", + "description": "Enqueue PHPStan tests.", "context": [ "view" ], @@ -24,26 +30,129 @@ "type": "integer" }, "wordpress_version": { + "default": "6.4.3", "description": "The WordPress version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] }, "woocommerce_version": { + "default": "8.6.1", "description": "The WooCommerce version to use in the test.", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", "type": "string" }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + } + } + }, + "compatibility": { + "title": "compatibilityTest", + "description": "Enqueue Compatibility tests.", + "context": [ + "view" + ], + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "wordpress_version": { + "default": "6.4.3", + "description": "The WordPress version to use in the test.", + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] + }, + "woocommerce_version": { + "default": "8.6.1", + "description": "The WooCommerce version to use in the test.", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, "optional_features": { - "description": "WooCommerce features to enable in the testing environment.", - "type": "object", - "additionalProperties": false, - "properties": { - "hpos": { - "description": "Whether or not to enable High Performance Order Storage in the testing environment.", - "type": "boolean" - }, - "cc_blocks": { - "description": "Whether or not to enable Cart and Checkout Blocks in the testing environment.", - "type": "boolean" - } + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] } }, "upload_id": { @@ -68,29 +177,271 @@ "description": "What event originated this request.", "type": "string" }, - "additional_woo_plugins": { - "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + } + } + }, + "activation": { + "title": "Activation Test", + "description": "Enqueue Activation tests.", + "context": [ + "view" + ], + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "wordpress_version": { + "default": "6.4.3", + "description": "The WordPress version to use in the test.", + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] + }, + "woocommerce_version": { + "default": "8.6.1", + "description": "The WooCommerce version to use in the test.", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "optional_features": { + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", "type": "array", "uniqueItems": true, "items": { - "type": "integer", - "minimum": 1 + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] } }, - "additional_wordpress_plugins": { - "description": "A comma-separated list of Additional WordPress plugin slugs.", + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", + "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + } + } + }, + "security": { + "title": "Security Test", + "description": "Enqueue Security tests.", + "context": [ + "view" + ], + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", + "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + } + } + }, + "phpcompatibility": { + "title": "PHPCompatibility Test", + "description": "Enqueue PHPCompatibility tests.", + "context": [ + "view" + ], + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", + "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "min_php_version": { + "default": "7.2", + "description": "The minimum PHP version to test an extension's compatibility against.", + "type": "string", + "enum": [ + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "max_php_version": { + "default": "8.3", + "description": "The maximum PHP version to test an extension's compatibility against.", + "type": "string", + "enum": [ + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + } + } + }, + "malware": { + "title": "Malware Test", + "description": "Enqueue Malware tests.", + "context": [ + "view" + ], + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "woo_id": { + "description": "A WooCommerce Extension ID", + "type": "integer" + }, + "upload_id": { + "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", + "type": "uuid" + }, + "client": { + "default": "other", + "description": "What client originated this request.", + "type": "string", + "enum": { + "qit_cli": "qit_cli", + "cd_client": "cd_client", + "qit_viewer": "qit_viewer", + "ci_runner": "ci_runner", + "mass_test": "mass_test", + "other": "other" + } + }, + "event": { + "default": "", + "description": "What event originated this request.", + "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "whitelist_paths": { + "description": "Paths to whitelist from malware scan.", "type": "array", - "uniqueItems": true, "items": { - "type": "string", - "minimum": 1 + "type": "string" } } } }, - "phpstan": { - "title": "phpstanTest", - "description": "Enqueue PHPStan tests.", + "woo-api": { + "title": "WooAPITest", + "description": "Enqueue Woo API tests.", "context": [ "view" ], @@ -102,12 +453,61 @@ "type": "integer" }, "wordpress_version": { + "default": "6.4.3", "description": "The WordPress version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] }, "woocommerce_version": { + "default": "8.6.1", "description": "The WooCommerce version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "optional_features": { + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] + } }, "upload_id": { "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", @@ -130,12 +530,34 @@ "default": "", "description": "What event originated this request.", "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "additional_woo_plugins": { + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } } } }, - "compatibility": { - "title": "compatibilityTest", - "description": "Enqueue Compatibility tests.", + "woo-e2e": { + "title": "WooE2ETest", + "description": "Enqueue Woo E2E tests.", "context": [ "view" ], @@ -147,26 +569,59 @@ "type": "integer" }, "wordpress_version": { + "default": "6.4.3", "description": "The WordPress version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] }, "woocommerce_version": { + "default": "8.6.1", "description": "The WooCommerce version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] }, "optional_features": { - "description": "WooCommerce features to enable in the testing environment.", - "type": "object", - "additionalProperties": false, - "properties": { - "hpos": { - "description": "Whether or not to enable High Performance Order Storage in the testing environment.", - "type": "boolean" - }, - "cc_blocks": { - "description": "Whether or not to enable Cart and Checkout Blocks in the testing environment.", - "type": "boolean" - } + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos" + ] + } + ] } }, "upload_id": { @@ -190,12 +645,34 @@ "default": "", "description": "What event originated this request.", "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "additional_woo_plugins": { + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } } } }, - "activation": { - "title": "Activation Test", - "description": "Enqueue Activation tests.", + "e2e": { + "title": "E2ETest", + "description": "Enqueue your custom E2E tests.", "context": [ "view" ], @@ -207,26 +684,60 @@ "type": "integer" }, "wordpress_version": { + "default": "6.4.3", "description": "The WordPress version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] }, "woocommerce_version": { + "default": "8.6.1", "description": "The WooCommerce version to use in the test.", - "type": "string" + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] }, "optional_features": { - "description": "WooCommerce features to enable in the testing environment.", - "type": "object", - "additionalProperties": false, - "properties": { - "hpos": { - "description": "Whether or not to enable High Performance Order Storage in the testing environment.", - "type": "boolean" - }, - "cc_blocks": { - "description": "Whether or not to enable Cart and Checkout Blocks in the testing environment.", - "type": "boolean" - } + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] } }, "upload_id": { @@ -250,12 +761,44 @@ "default": "", "description": "What event originated this request.", "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "additional_woo_plugins": { + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } + }, + "compatibility": { + "description": "Controls the scope of compatibility checks when additional plugins are specified. Accepts two values:\n 1. \"sut\" (default): Runs only the end-to-end tests of the plugin under test (SUT). This option is used to verify that your plugin functions correctly in the presence of other plugins on the same site.\n 2. \"all\": Runs custom end-to-end tests for all specified plugins that have custom tests. This extends the check to ensure not only that your plugin operates as expected with other plugins active, but also that these other plugins function correctly with your plugin active. Note: Be cautious when using this option as flaky tests in other plugins may lead to unreliable results.", + "type": "string", + "required": "true", + "default": "sut", + "enum": [ + "sut", + "all" + ] } } }, - "security": { - "title": "Security Test", - "description": "Enqueue Security tests.", + "api": { + "title": "WooAPITest", + "description": "Enqueue Woo API tests.", "context": [ "view" ], @@ -266,6 +809,63 @@ "description": "A WooCommerce Extension ID", "type": "integer" }, + "wordpress_version": { + "default": "6.4.3", + "description": "The WordPress version to use in the test.", + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] + }, + "woocommerce_version": { + "default": "8.6.1", + "description": "The WooCommerce version to use in the test.", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "php_version": { + "default": "7.4", + "description": "The PHP version to use in the test.", + "type": "string", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "optional_features": { + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] + } + }, "upload_id": { "description": "A development build upload ID, if we are testing a dev build instead of the latest version available in the marketplace.", "type": "uuid" @@ -287,6 +887,206 @@ "default": "", "description": "What event originated this request.", "type": "string" + }, + "is_product_update": { + "description": "Whether this is a product update test run.", + "type": "boolean" + }, + "additional_woo_plugins": { + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } + } + } + }, + "mass": { + "title": "massTest", + "description": "Enqueue mass tests in QIT.", + "context": [ + "view" + ], + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "trigger": { + "required": true, + "description": "What event triggered this test run", + "type": "string" + }, + "test_type": { + "required": true, + "description": "What test type to execute.", + "type": "string", + "enum": { + "phpstan": "phpstan", + "compatibility": "compatibility", + "activation": "activation", + "security": "security", + "phpcompatibility": "phpcompatibility", + "malware": "malware", + "woo-api": "woo-api", + "woo-e2e": "woo-e2e", + "e2e": "e2e", + "api": "api" + } + }, + "woocommerce_version": { + "description": "The WoooCommerce version to use in the test.", + "default": "stable", + "type": "string", + "enum": [ + "8.6.0-rc.1", + "8.5.1", + "8.5.2", + "8.6.0", + "8.6.1", + "stable", + "rc" + ] + }, + "wordpress_version": { + "description": "The WordPress version to use in the test.", + "default": "stable", + "type": "string", + "enum": [ + "6.5-beta2", + "6.1.5", + "6.2.4", + "6.3.3", + "6.4.3", + "stable", + "rc" + ] + }, + "php_version": { + "description": "The PHP version to use in the test.", + "type": "string", + "default": "7.4", + "enum": [ + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "min_php_version": { + "default": "7.2", + "description": "The minimum PHP version to use in a PHPCompatibility.", + "type": "string", + "enum": [ + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "max_php_version": { + "default": "8.3", + "description": "The maximum PHP version to use in a PHPCompatibility.", + "type": "string", + "enum": [ + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ] + }, + "whitelist_paths": { + "description": "Paths to whitelist from malware scan.", + "type": "array", + "items": { + "type": "string" + } + }, + "optional_features": { + "description": "A comma-separated list of WooCommerce features to enable in the testing environment.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "title": "Optional Feature", + "type": "string", + "enum": [ + "hpos", + "new_product_editor" + ] + } + ] + } + }, + "additional_woo_plugins": { + "default": [], + "description": "A comma-separated list of Additional WooCommerce Extension IDs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1 + } + }, + "additional_wordpress_plugins": { + "default": [], + "description": "A comma-separated list of Additional WordPress plugin slugs.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "minimum": 1 + } + }, + "max_extensions": { + "description": "Maximum number of extensions to test.", + "type": "integer" + }, + "include_all": { + "default": false, + "description": "If set, run a test against all extensions.", + "type": "boolean" + }, + "only_developed_by_woo": { + "default": false, + "description": "If set to true, will only test extensions developed by Woo.", + "type": "boolean" + }, + "only_vendor_ids": { + "default ": [], + "description": "If set, will only test the extensions owned by these vendor IDs. (Comma-separated list of vendor IDs).", + "type": "array", + "uniqueItems": true, + "items": { + "type": "int", + "minimum": 0 + } + }, + "product_type": { + "default": "plugin", + "description": "The product type to test. (extension, theme)", + "type": "string", + "enum": [ + "plugin", + "theme" + ] } } } @@ -304,5 +1104,9 @@ "id": 789, "slug": "baz-extension" } - ] + ], + "environments": { + "e2e": "37fa32aea1dd90c4bbc87fa0c78d03cf" + }, + "hide_e2e": false } \ No newline at end of file