diff --git a/.travis.yml b/.travis.yml index be0daf855c3b44cf57b25e53519e1d528c852447..9a94626445095f107d4447316fb995b4f00fbbb6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,11 +30,12 @@ before_script: - sh -c "if [ '$TEST_SUITE' = 'integration' ] || [ '$TEST_SUITE' = 'integration_integrity' ]; then mysql -e 'create database magento_integration_tests;'; mv dev/tests/integration/etc/local-mysql.travis.xml.dist dev/tests/integration/etc/local-mysql.xml; fi" # Install tools for static tests - sh -c "if [ '$TEST_SUITE' = 'static_phpcs' ] || [ '$TEST_SUITE' = 'static_annotation' ]; then pear install pear/PHP_CodeSniffer-1.5.2; fi" + # Change memmory_limit for travis server - echo 'memory_limit = -1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - phpenv rehash; script: # Unit tests - sh -c "if [ '$TEST_SUITE' = 'unit' ]; then ./vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist; fi" + - sh -c "if [ '$TEST_SUITE' = 'unit' ]; then ./vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist; fi" # Integration tests - sh -c "if [ '$TEST_SUITE' = 'integration' ]; then cd dev/tests/integration/; ./../../../vendor/bin/phpunit -c phpunit.xml.dist; fi" # Integration integrity tests diff --git a/CHANGELOG.md b/CHANGELOG.md index 1538aca81b9ea66cfefbce4acb4fce5f1a4f6b15..4ba3ae52992c28d9d3d00e9747f63f02e1faf17a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,24 @@ +0.1.0-alpha98 +============= +* GitHub requests: + * [#678] (https://github.com/magento/magento2/issues/678) -- Fixed Travis CI builds +* Functional tests: + * Create Sales Order Backend + * Delete Products from Wishlist + * Download Products Report + * Mass Orders Update + * Sales Tax Report +* Fixed bugs: + * Fixed an issue where success message was not displayed after product review submit + * Fixed an issue where it was impossible to start checkout process using PayPal from the JavaScript pop-up window when the Display Actual Price option was set to On Gesture + * Fixed an issue where a fatal error was thrown after shipping method selection in PayPal Express Checkout + * Fixed an issue with parameters exceptions in SOAP response + * Fixed an issue where testGetRequestTokenOauthTimestampRefused unit test failed in certain cases + * Fixed an issue where TestCreateCustomer test thrown fatal error when making a SOAP request + * Fixed an issue with required parameters in WSDL + * Fixed an issue where Customer Account Service returned void response in the resetPassword method + * Fixed an issue where REST API failed during bundle product creation + 0.1.0-alpha97 ============= * Various improvements: diff --git a/app/code/Magento/AdminNotification/composer.json b/app/code/Magento/AdminNotification/composer.json index 946ca70e54cbf9ca77b460c82ac672df322c805f..d6b9a1858302433349e76cdc9af00e3888244128 100644 --- a/app/code/Magento/AdminNotification/composer.json +++ b/app/code/Magento/AdminNotification/composer.json @@ -3,15 +3,15 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "lib-libxml": "*", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Authorization/composer.json b/app/code/Magento/Authorization/composer.json index e4b92a7168f7e916b562a2eca66b39c8e65feb2f..19783cd57f058c2c07d2b81c8f7c7ba808ab2f16 100644 --- a/app/code/Magento/Authorization/composer.json +++ b/app/code/Magento/Authorization/composer.json @@ -3,12 +3,12 @@ "description": "Authorization module provides access to Magento ACL functionality.", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-backend": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-backend": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Authorizenet/composer.json b/app/code/Magento/Authorizenet/composer.json index a29aeab87e2297614f3ea65bddfe20ffa044b86e..452828c3d788fdf6d0fae5a92fd364298e75bfde 100644 --- a/app/code/Magento/Authorizenet/composer.json +++ b/app/code/Magento/Authorizenet/composer.json @@ -3,18 +3,18 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-checkout": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-payment": "0.1.0-alpha97", - "magento/module-centinel": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-checkout": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-payment": "0.1.0-alpha98", + "magento/module-centinel": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Backend/composer.json b/app/code/Magento/Backend/composer.json index 6381f36e6cd0c0163ffacee2f363897d398fff6b..ed736bd65da7f5acc4683a40bf2f4074dd0373bb 100644 --- a/app/code/Magento/Backend/composer.json +++ b/app/code/Magento/Backend/composer.json @@ -3,27 +3,27 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-directory": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/module-cron": "0.1.0-alpha97", - "magento/module-theme": "0.1.0-alpha97", - "magento/module-reports": "0.1.0-alpha97", - "magento/module-catalog-search": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-user": "0.1.0-alpha97", - "magento/module-backup": "0.1.0-alpha97", - "magento/module-email": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-translation": "0.1.0-alpha97", - "magento/module-require-js": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-directory": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/module-cron": "0.1.0-alpha98", + "magento/module-theme": "0.1.0-alpha98", + "magento/module-reports": "0.1.0-alpha98", + "magento/module-catalog-search": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-user": "0.1.0-alpha98", + "magento/module-backup": "0.1.0-alpha98", + "magento/module-email": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-translation": "0.1.0-alpha98", + "magento/module-require-js": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Backup/composer.json b/app/code/Magento/Backup/composer.json index ee63f6d2344309889608a62aab96c492cbc3f255..2503def2156196b7273526174fa37a0c768bb878 100644 --- a/app/code/Magento/Backup/composer.json +++ b/app/code/Magento/Backup/composer.json @@ -3,15 +3,15 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-cron": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-cron": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Bundle/composer.json b/app/code/Magento/Bundle/composer.json index b7e4ac63c1c1439bb31ae5e1e02050b7237ae6b8..b5576e91c0cff9f532c0d8b38a33a8ce8ca751dc 100644 --- a/app/code/Magento/Bundle/composer.json +++ b/app/code/Magento/Bundle/composer.json @@ -3,24 +3,24 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-tax": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-checkout": "0.1.0-alpha97", - "magento/module-catalog-inventory": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-catalog-rule": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/module-gift-message": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", - "magento/module-webapi": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-tax": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-checkout": "0.1.0-alpha98", + "magento/module-catalog-inventory": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-catalog-rule": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/module-gift-message": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", + "magento/module-webapi": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Captcha/composer.json b/app/code/Magento/Captcha/composer.json index 4ae84418b0039360f1135650803a60e04d27c5c8..7d3f0eff666befd1b1662f104cd9c13ab1990949 100644 --- a/app/code/Magento/Captcha/composer.json +++ b/app/code/Magento/Captcha/composer.json @@ -3,16 +3,16 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-checkout": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-checkout": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Catalog/Service/V1/Category/ProductLinks/WriteService.php b/app/code/Magento/Catalog/Service/V1/Category/ProductLinks/WriteService.php index 082b927dd1099112feab7911e5ca1ebf955c8542..c25e5a72e7f3155c2ee12e929e1aa5817a4baed2 100644 --- a/app/code/Magento/Catalog/Service/V1/Category/ProductLinks/WriteService.php +++ b/app/code/Magento/Catalog/Service/V1/Category/ProductLinks/WriteService.php @@ -102,11 +102,11 @@ class WriteService implements WriteServiceInterface $category->save(); } catch (\Exception $e) { throw new CouldNotSaveException( - 'Could not save product "%1" with position %2 to category %3', + 'Could not save product "%product_id" with position %position to category %category_id', [ - $productId, - $productLink->getPosition(), - $categoryId, + 'product_id' => $productId, + 'position' => $productLink->getPosition(), + 'category_id' => $categoryId ], $e ); @@ -137,10 +137,10 @@ class WriteService implements WriteServiceInterface $category->save(); } catch (\Exception $e) { throw new CouldNotSaveException( - 'Could not remove product "%1" from category with ID "%2"', + 'Could not remove product "%product_sku" from category with ID "%category_id"', [ - $productSku, - $categoryId, + 'product_sku' => $productSku, + 'category_id' => $categoryId, ], $e ); diff --git a/app/code/Magento/Catalog/Service/V1/Category/WriteService.php b/app/code/Magento/Catalog/Service/V1/Category/WriteService.php index e2725bf82094dc8372cb11457230ae8e2bdfb190..307d05be3416c1bb0424479439c106e004fb2cd4 100644 --- a/app/code/Magento/Catalog/Service/V1/Category/WriteService.php +++ b/app/code/Magento/Catalog/Service/V1/Category/WriteService.php @@ -86,7 +86,7 @@ class WriteService implements WriteServiceInterface $this->validateCategory($categoryModel); $categoryModel->save(); } catch (\Exception $e) { - throw new CouldNotSaveException('Could not save category: %1', [$e->getMessage()], $e); + throw new CouldNotSaveException('Could not save category: %message', ['message' => $e->getMessage()], $e); } return $categoryModel->getId(); } @@ -105,7 +105,7 @@ class WriteService implements WriteServiceInterface try { $category->delete(); } catch (\Exception $e) { - throw new StateException('Cannot delete category with id %1', [$categoryId], $e); + throw new StateException('Cannot delete category with id %category_id', ['category_id' => $categoryId], $e); } return true; diff --git a/app/code/Magento/Catalog/composer.json b/app/code/Magento/Catalog/composer.json index 5a75b0a230d2e14b7e66b1ec263d8dbb2fae9faf..9816d6d7ad3984031e5cd5c94e56404b6c9a97e7 100644 --- a/app/code/Magento/Catalog/composer.json +++ b/app/code/Magento/Catalog/composer.json @@ -3,33 +3,33 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/module-cms": "0.1.0-alpha97", - "magento/module-indexer": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-theme": "0.1.0-alpha97", - "magento/module-checkout": "0.1.0-alpha97", - "magento/module-log": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-widget": "0.1.0-alpha97", - "magento/module-wishlist": "0.1.0-alpha97", - "magento/module-tax": "0.1.0-alpha97", - "magento/module-msrp": "0.1.0-alpha97", - "magento/module-catalog-inventory": "0.1.0-alpha97", - "magento/module-directory": "0.1.0-alpha97", - "magento/module-catalog-rule": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-catalog-search": "0.1.0-alpha97", - "magento/module-product-alert": "0.1.0-alpha97", - "magento/module-url-rewrite": "0.1.0-alpha97", - "magento/module-catalog-url-rewrite": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/module-cms": "0.1.0-alpha98", + "magento/module-indexer": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-theme": "0.1.0-alpha98", + "magento/module-checkout": "0.1.0-alpha98", + "magento/module-log": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-widget": "0.1.0-alpha98", + "magento/module-wishlist": "0.1.0-alpha98", + "magento/module-tax": "0.1.0-alpha98", + "magento/module-msrp": "0.1.0-alpha98", + "magento/module-catalog-inventory": "0.1.0-alpha98", + "magento/module-directory": "0.1.0-alpha98", + "magento/module-catalog-rule": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-catalog-search": "0.1.0-alpha98", + "magento/module-product-alert": "0.1.0-alpha98", + "magento/module-url-rewrite": "0.1.0-alpha98", + "magento/module-catalog-url-rewrite": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/CatalogImportExport/composer.json b/app/code/Magento/CatalogImportExport/composer.json index 4e6aaa07908e231289feaa6cb05157cfebd72e87..5f6009a6b507cbd9e0445234fde1548f72a9158e 100644 --- a/app/code/Magento/CatalogImportExport/composer.json +++ b/app/code/Magento/CatalogImportExport/composer.json @@ -3,20 +3,20 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-core": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/module-import-export": "0.1.0-alpha97", - "magento/module-indexer": "0.1.0-alpha97", - "magento/module-store": "0.1.0-alpha97", - "magento/module-catalog-inventory": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-core": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/module-import-export": "0.1.0-alpha98", + "magento/module-indexer": "0.1.0-alpha98", + "magento/module-store": "0.1.0-alpha98", + "magento/module-catalog-inventory": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "ext-ctype": "*", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/CatalogInventory/composer.json b/app/code/Magento/CatalogInventory/composer.json index e377c3bbbe8103a02e910b07c3fdf4b128968abc..9e56de86a5012b8d50b3bc470f24c6d764695788 100644 --- a/app/code/Magento/CatalogInventory/composer.json +++ b/app/code/Magento/CatalogInventory/composer.json @@ -3,19 +3,19 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-indexer": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-indexer": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/CatalogRule/composer.json b/app/code/Magento/CatalogRule/composer.json index a6c09e071f118a5b73d0764361bfdabe3112c69a..d3f41c07eb7252e82819748b4a5087cde475803f 100644 --- a/app/code/Magento/CatalogRule/composer.json +++ b/app/code/Magento/CatalogRule/composer.json @@ -3,17 +3,17 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-rule": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-rule": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/CatalogSearch/composer.json b/app/code/Magento/CatalogSearch/composer.json index a9cc6a7815b9b909ef3ad266a0241f36d558c2ee..e976256674b51393015426f7d3f7b58abd71c1b3 100644 --- a/app/code/Magento/CatalogSearch/composer.json +++ b/app/code/Magento/CatalogSearch/composer.json @@ -3,20 +3,20 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-directory": "0.1.0-alpha97", - "magento/module-indexer": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-theme": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-directory": "0.1.0-alpha98", + "magento/module-indexer": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-theme": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/CatalogUrlRewrite/composer.json b/app/code/Magento/CatalogUrlRewrite/composer.json index 0eb731ddbca007b3a5652f3d18c548f03a74e9c4..c1c1912ef7eeb4c663d4ee059b901242e5302834 100644 --- a/app/code/Magento/CatalogUrlRewrite/composer.json +++ b/app/code/Magento/CatalogUrlRewrite/composer.json @@ -3,18 +3,18 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-catalog-import-export": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/module-import-export": "0.1.0-alpha97", - "magento/module-store": "0.1.0-alpha97", - "magento/module-url-rewrite": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-catalog-import-export": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/module-import-export": "0.1.0-alpha98", + "magento/module-store": "0.1.0-alpha98", + "magento/module-url-rewrite": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Centinel/composer.json b/app/code/Magento/Centinel/composer.json index 0ca946052efe616fb30f9af725b90093a8239ecd..f9e19a28ff953022b9a85249a685a85545168dfe 100644 --- a/app/code/Magento/Centinel/composer.json +++ b/app/code/Magento/Centinel/composer.json @@ -3,16 +3,16 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-checkout": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-checkout": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Checkout/composer.json b/app/code/Magento/Checkout/composer.json index 772f86efbdb04c0d2ad761fe13252c149033da67..f5bbda4fc26a1ec59f1c936e5a8f318e49901967 100644 --- a/app/code/Magento/Checkout/composer.json +++ b/app/code/Magento/Checkout/composer.json @@ -3,27 +3,27 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-authorization": "0.1.0-alpha97", - "magento/module-catalog-inventory": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-payment": "0.1.0-alpha97", - "magento/module-tax": "0.1.0-alpha97", - "magento/module-directory": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/module-gift-message": "0.1.0-alpha97", - "magento/module-wishlist": "0.1.0-alpha97", - "magento/module-page-cache": "0.1.0-alpha97", - "magento/module-theme": "0.1.0-alpha97", - "magento/module-msrp": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-authorization": "0.1.0-alpha98", + "magento/module-catalog-inventory": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-payment": "0.1.0-alpha98", + "magento/module-tax": "0.1.0-alpha98", + "magento/module-directory": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/module-gift-message": "0.1.0-alpha98", + "magento/module-wishlist": "0.1.0-alpha98", + "magento/module-page-cache": "0.1.0-alpha98", + "magento/module-theme": "0.1.0-alpha98", + "magento/module-msrp": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/CheckoutAgreements/composer.json b/app/code/Magento/CheckoutAgreements/composer.json index ba2e152066f7852d8350e0b6d24cb155d79a7278..83c52cd325b9ddc5626007d508d46b55d74d9574 100644 --- a/app/code/Magento/CheckoutAgreements/composer.json +++ b/app/code/Magento/CheckoutAgreements/composer.json @@ -3,14 +3,14 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-checkout": "0.1.0-alpha97", - "magento/module-store": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-checkout": "0.1.0-alpha98", + "magento/module-store": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Cms/composer.json b/app/code/Magento/Cms/composer.json index da8253d95d932fb649af8c876bbb2b99310afeb5..49ffbcf4fa66c6c03a6508680a9fcd61ac439ae6 100644 --- a/app/code/Magento/Cms/composer.json +++ b/app/code/Magento/Cms/composer.json @@ -3,19 +3,19 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-theme": "0.1.0-alpha97", - "magento/module-widget": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-email": "0.1.0-alpha97", - "magento/module-ui": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-theme": "0.1.0-alpha98", + "magento/module-widget": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-email": "0.1.0-alpha98", + "magento/module-ui": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/CmsUrlRewrite/composer.json b/app/code/Magento/CmsUrlRewrite/composer.json index acf8fb0f3b86e8f1f25193856e8664de1a05915d..0817b25e54b151545e4ea5911de385c30de25981 100644 --- a/app/code/Magento/CmsUrlRewrite/composer.json +++ b/app/code/Magento/CmsUrlRewrite/composer.json @@ -3,13 +3,13 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-cms": "0.1.0-alpha97", - "magento/module-url-rewrite": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-cms": "0.1.0-alpha98", + "magento/module-url-rewrite": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/ConfigurableImportExport/composer.json b/app/code/Magento/ConfigurableImportExport/composer.json index e17863da679de1091fdc572a1f68b717774769b2..60a4cb8ee0a1f0c57924e16f9d0c6c027499389b 100644 --- a/app/code/Magento/ConfigurableImportExport/composer.json +++ b/app/code/Magento/ConfigurableImportExport/composer.json @@ -3,16 +3,16 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-catalog-import-export": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/module-import-export": "0.1.0-alpha97", - "magento/module-configurable-product": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-catalog-import-export": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/module-import-export": "0.1.0-alpha98", + "magento/module-configurable-product": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/ConfigurableProduct/Service/V1/Product/Option/WriteService.php b/app/code/Magento/ConfigurableProduct/Service/V1/Product/Option/WriteService.php index 28fe23b5e1d489c10b8c52bc1e79572215dd4bfc..17e66e503bf694b8b3586931a20b4397b0230703 100644 --- a/app/code/Magento/ConfigurableProduct/Service/V1/Product/Option/WriteService.php +++ b/app/code/Magento/ConfigurableProduct/Service/V1/Product/Option/WriteService.php @@ -37,7 +37,6 @@ use Magento\Framework\StoreManagerInterface; use Magento\Framework\Exception\InputException; use Magento\Framework\Exception\NoSuchEntityException; use Magento\Framework\Exception\CouldNotSaveException; -use Magento\Webapi\Exception; /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) @@ -105,6 +104,7 @@ class WriteService implements WriteServiceInterface */ public function add($productSku, Option $option) { + $this->validateNewOptionData($option); $product = $this->productRepository->get($productSku); $allowedTypes = [ProductType::TYPE_SIMPLE, ProductType::TYPE_VIRTUAL, ConfigurableType::TYPE_CODE]; if (!in_array($product->getTypeId(), $allowedTypes)) { @@ -138,6 +138,46 @@ class WriteService implements WriteServiceInterface return $configurableAttribute->getId(); } + /** + * Ensure that all necessary data is available for a new option creation. + * + * @param Option $option + * @return void + * @throws InputException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + */ + public function validateNewOptionData(Option $option) + { + $inputException = new InputException(); + if (!$option->getAttributeId()) { + $inputException->addError('Option attribute ID is not specified.'); + } + if (!$option->getType()) { + $inputException->addError('Option type is not specified.'); + } + if (!$option->getLabel()) { + $inputException->addError('Option label is not specified.'); + } + if (!$option->getValues()) { + $inputException->addError('Option values are not specified.'); + } else { + foreach ($option->getValues() as $optionValue) { + if (!$optionValue->getIndex()) { + $inputException->addError('Value index is not specified for an option.'); + } + if (null === $optionValue->getPrice()) { + $inputException->addError('Price is not specified for an option.'); + } + if (null === $optionValue->isPercent()) { + $inputException->addError('Percent/absolute is not specified for an option.'); + } + } + } + if ($inputException->wasErrorAdded()) { + throw $inputException; + } + } + /** * {@inheritdoc} */ @@ -148,13 +188,13 @@ class WriteService implements WriteServiceInterface $configurableAttribute = $this->configurableAttributeFactory->create(); $configurableAttribute->load($optionId); if (!$configurableAttribute->getId() || $configurableAttribute->getProductId() != $product->getId()) { - throw new NoSuchEntityException('Option with id "%1" not found', [$optionId]); + throw new NoSuchEntityException('Option with id "%option_id" not found', ['option_id' => $optionId]); } $configurableAttribute = $this->optionConverter->getModelFromData($option, $configurableAttribute); try { $configurableAttribute->save(); } catch (\Exception $e) { - throw new CouldNotSaveException('Could not update option with id "%1"', [$optionId]); + throw new CouldNotSaveException('Could not update option with id "%option_id"', ['option_id' => $optionId]); } return true; @@ -180,21 +220,19 @@ class WriteService implements WriteServiceInterface } /** + * Get product by SKU. + * * @param string $productSku * @return \Magento\Catalog\Model\Product - * @throws \Magento\Webapi\Exception + * @throws InputException */ private function getProduct($productSku) { $product = $this->productRepository->get($productSku); if (ConfigurableType::TYPE_CODE !== $product->getTypeId()) { - throw new Exception( - 'Product with specified sku: "%1" is not a configurable product', - Exception::HTTP_FORBIDDEN, - Exception::HTTP_FORBIDDEN, - [ - $product->getSku() - ] + throw new InputException( + 'Product with specified sku: "%sku" is not a configurable product', + ['sku' => $product->getSku()] ); } return $product; diff --git a/app/code/Magento/ConfigurableProduct/composer.json b/app/code/Magento/ConfigurableProduct/composer.json index dd6b68d1aca04b8a9b430b759605db614a6e0f83..a73d1b581d4f66d68faf76870ede5abad01cd5e5 100644 --- a/app/code/Magento/ConfigurableProduct/composer.json +++ b/app/code/Magento/ConfigurableProduct/composer.json @@ -3,23 +3,23 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-catalog-inventory": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-checkout": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-catalog-rule": "0.1.0-alpha97", - "magento/module-directory": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", - "magento/module-webapi": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-catalog-inventory": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-checkout": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-catalog-rule": "0.1.0-alpha98", + "magento/module-directory": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", + "magento/module-webapi": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Contact/composer.json b/app/code/Magento/Contact/composer.json index c4b5409c8bcc45b44752247a7658fe70b9003e0b..01e17f636387e200c3e03a8e9b744bbdda73942a 100644 --- a/app/code/Magento/Contact/composer.json +++ b/app/code/Magento/Contact/composer.json @@ -3,15 +3,15 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-cms": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-cms": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Core/composer.json b/app/code/Magento/Core/composer.json index 9d33c4c29624a3c9aad2c6bcee50a2e15e4ccf10..23b7e1efcde2075fdfd72a5580545b2e13dd2d56 100644 --- a/app/code/Magento/Core/composer.json +++ b/app/code/Magento/Core/composer.json @@ -3,18 +3,18 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-cron": "0.1.0-alpha97", - "magento/module-theme": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/module-page-cache": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-cron": "0.1.0-alpha98", + "magento/module-theme": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/module-page-cache": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "lib-libxml": "*", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Cron/composer.json b/app/code/Magento/Cron/composer.json index 0ada7c1ab43494048073483dc68e72a3b7e0c856..6cb1f839846d5d1e08a3a390d2a7ae4937200352 100644 --- a/app/code/Magento/Cron/composer.json +++ b/app/code/Magento/Cron/composer.json @@ -3,13 +3,13 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/CurrencySymbol/composer.json b/app/code/Magento/CurrencySymbol/composer.json index 92f7949f60bd0c084e5a2b5553ef074ae2e2c77e..72802c323858aa0a00bb7aebd73e6a4e86fc5f14 100644 --- a/app/code/Magento/CurrencySymbol/composer.json +++ b/app/code/Magento/CurrencySymbol/composer.json @@ -3,16 +3,16 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-page-cache": "0.1.0-alpha97", - "magento/module-directory": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-page-cache": "0.1.0-alpha98", + "magento/module-directory": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Customer/Service/V1/CustomerAccountService.php b/app/code/Magento/Customer/Service/V1/CustomerAccountService.php index 4b34f881786a03fd5d47c7c4e555aa87e03109bc..899114e148a5393e47912dc30383f96867afa83c 100644 --- a/app/code/Magento/Customer/Service/V1/CustomerAccountService.php +++ b/app/code/Magento/Customer/Service/V1/CustomerAccountService.php @@ -355,6 +355,7 @@ class CustomerAccountService implements CustomerAccountServiceInterface $this->checkPasswordStrength($newPassword); $customerModel->setPasswordHash($this->getPasswordHash($newPassword)); $customerModel->save(); + return true; } /** diff --git a/app/code/Magento/Customer/Service/V1/CustomerAccountServiceInterface.php b/app/code/Magento/Customer/Service/V1/CustomerAccountServiceInterface.php index 54448946c068a2f32242298a632409c26d93e611..4f6b77914137f8b0c52cb5ea74c12cb5b1a0727c 100644 --- a/app/code/Magento/Customer/Service/V1/CustomerAccountServiceInterface.php +++ b/app/code/Magento/Customer/Service/V1/CustomerAccountServiceInterface.php @@ -194,7 +194,7 @@ interface CustomerAccountServiceInterface * @param string $customerId * @param string $resetToken Token sent to customer via e-mail * @param string $newPassword - * @return void + * @return bool true on success * @throws \Magento\Framework\Exception\State\InputMismatchException If token is mismatched * @throws \Magento\Framework\Exception\State\ExpiredException If token is expired * @throws \Magento\Framework\Exception\InputException If token or customer id is invalid diff --git a/app/code/Magento/Customer/composer.json b/app/code/Magento/Customer/composer.json index e1d3c73fe7d8074725e4d551f3801d7798390c0e..2606751e6141c20a3c212cbbd3fe48a4aee825b1 100644 --- a/app/code/Magento/Customer/composer.json +++ b/app/code/Magento/Customer/composer.json @@ -3,27 +3,27 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/module-directory": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-newsletter": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-checkout": "0.1.0-alpha97", - "magento/module-wishlist": "0.1.0-alpha97", - "magento/module-theme": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-review": "0.1.0-alpha97", - "magento/module-tax": "0.1.0-alpha97", - "magento/module-page-cache": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", - "magento/module-authorization": "0.1.0-alpha97", - "magento/module-integration": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/module-directory": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-newsletter": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-checkout": "0.1.0-alpha98", + "magento/module-wishlist": "0.1.0-alpha98", + "magento/module-theme": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-review": "0.1.0-alpha98", + "magento/module-tax": "0.1.0-alpha98", + "magento/module-page-cache": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", + "magento/module-authorization": "0.1.0-alpha98", + "magento/module-integration": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/CustomerImportExport/composer.json b/app/code/Magento/CustomerImportExport/composer.json index b422fcd758fa52648d5cdc604c01a18da6c2ee68..a15aa5a2ab4ae8f2d55b053beb79373367452a01 100644 --- a/app/code/Magento/CustomerImportExport/composer.json +++ b/app/code/Magento/CustomerImportExport/composer.json @@ -3,17 +3,17 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/module-import-export": "0.1.0-alpha97", - "magento/module-directory": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/module-import-export": "0.1.0-alpha98", + "magento/module-directory": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/DesignEditor/composer.json b/app/code/Magento/DesignEditor/composer.json index 76d6d3100b3f6cbc8e82e3820bd4785981aac406..17e3dce6173d364492704c6363f86bc904f3a716 100644 --- a/app/code/Magento/DesignEditor/composer.json +++ b/app/code/Magento/DesignEditor/composer.json @@ -3,16 +3,16 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-theme": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-theme": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Dhl/composer.json b/app/code/Magento/Dhl/composer.json index 764da496332e274f077860425507ba580e1b174e..a6e18f87b530b2cef615f6cd02eb2eab3cca309e 100644 --- a/app/code/Magento/Dhl/composer.json +++ b/app/code/Magento/Dhl/composer.json @@ -3,21 +3,21 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-shipping": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-directory": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-checkout": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-catalog-inventory": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-shipping": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-directory": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-checkout": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-catalog-inventory": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "lib-libxml": "*", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Directory/composer.json b/app/code/Magento/Directory/composer.json index a58450d3f7f0eb7e2287e36fb95f3bbb428bbe2f..649e7f2cce9ecddf77267301afa58273535cc7e4 100644 --- a/app/code/Magento/Directory/composer.json +++ b/app/code/Magento/Directory/composer.json @@ -3,15 +3,15 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "lib-libxml": "*", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Downloadable/composer.json b/app/code/Magento/Downloadable/composer.json index 427bfb86449386eeb6c31ee9b354138b1a498eb6..29ce648667608faff84868cea8e9d970998b30c3 100644 --- a/app/code/Magento/Downloadable/composer.json +++ b/app/code/Magento/Downloadable/composer.json @@ -3,26 +3,26 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-tax": "0.1.0-alpha97", - "magento/module-theme": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-checkout": "0.1.0-alpha97", - "magento/module-directory": "0.1.0-alpha97", - "magento/module-wishlist": "0.1.0-alpha97", - "magento/module-gift-message": "0.1.0-alpha97", - "magento/module-catalog-inventory": "0.1.0-alpha97", - "magento/module-msrp": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-tax": "0.1.0-alpha98", + "magento/module-theme": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-checkout": "0.1.0-alpha98", + "magento/module-directory": "0.1.0-alpha98", + "magento/module-wishlist": "0.1.0-alpha98", + "magento/module-gift-message": "0.1.0-alpha98", + "magento/module-catalog-inventory": "0.1.0-alpha98", + "magento/module-msrp": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Eav/composer.json b/app/code/Magento/Eav/composer.json index 4762b42b045c6d438179de82286e1c032fa7d4df..54e4f1f2853ccbec6b7ca802c0c1774325bffbca 100644 --- a/app/code/Magento/Eav/composer.json +++ b/app/code/Magento/Eav/composer.json @@ -3,15 +3,15 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Email/composer.json b/app/code/Magento/Email/composer.json index 8b02103b840cb2f765671e8a407c18ae2df3f7fc..00e01ba77459fa5fabb4a3f61f44b443a3c80959 100644 --- a/app/code/Magento/Email/composer.json +++ b/app/code/Magento/Email/composer.json @@ -3,15 +3,15 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-cms": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-cms": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Fedex/composer.json b/app/code/Magento/Fedex/composer.json index c23658cc4a48f0eac61c86779cf00df6507e5ad6..32b84ec73ef3c2af021ebbd68c12e59ce11eed16 100644 --- a/app/code/Magento/Fedex/composer.json +++ b/app/code/Magento/Fedex/composer.json @@ -3,19 +3,19 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-shipping": "0.1.0-alpha97", - "magento/module-directory": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-catalog-inventory": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-shipping": "0.1.0-alpha98", + "magento/module-directory": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-catalog-inventory": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "lib-libxml": "*", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/GiftMessage/composer.json b/app/code/Magento/GiftMessage/composer.json index 38540a41549dfe53be00a0c9a65335401c445c2f..b6f223ae1fab03eeb20190f44b0192445cc372e1 100644 --- a/app/code/Magento/GiftMessage/composer.json +++ b/app/code/Magento/GiftMessage/composer.json @@ -3,20 +3,20 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-checkout": "0.1.0-alpha97", - "magento/module-multishipping": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-checkout": "0.1.0-alpha98", + "magento/module-multishipping": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/GoogleAdwords/composer.json b/app/code/Magento/GoogleAdwords/composer.json index 5d8a4ec9ad4d08da2844f3429cf628ea7eccb75f..30d86f3de8621b045209c8c79b26d6796163e825 100644 --- a/app/code/Magento/GoogleAdwords/composer.json +++ b/app/code/Magento/GoogleAdwords/composer.json @@ -3,13 +3,13 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/GoogleAnalytics/composer.json b/app/code/Magento/GoogleAnalytics/composer.json index 1520dd03b09796c545c976c3f6b67a2927142451..d37451ce687547026391035ffb81bd2796363854 100644 --- a/app/code/Magento/GoogleAnalytics/composer.json +++ b/app/code/Magento/GoogleAnalytics/composer.json @@ -3,13 +3,13 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/GoogleOptimizer/composer.json b/app/code/Magento/GoogleOptimizer/composer.json index b3bc0b4e2887a8bdec38734bfae83fc093e0005b..61834880cdddb83647ebae6a64f42c99cc70f157 100644 --- a/app/code/Magento/GoogleOptimizer/composer.json +++ b/app/code/Magento/GoogleOptimizer/composer.json @@ -3,16 +3,16 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-google-analytics": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-cms": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-google-analytics": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-cms": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/GoogleShopping/composer.json b/app/code/Magento/GoogleShopping/composer.json index 40ab8c4fc338fab7d05cc3479aaed71f49de9246..a745694b62e9ddbfbde188d9e9beb50339ec724b 100644 --- a/app/code/Magento/GoogleShopping/composer.json +++ b/app/code/Magento/GoogleShopping/composer.json @@ -3,19 +3,19 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-directory": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/module-tax": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-directory": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/module-tax": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/GroupedImportExport/composer.json b/app/code/Magento/GroupedImportExport/composer.json index ff4046298de10022a39f1b6d7ca1b2e78f9053ef..c6f0282751b99c5c4aa20b2d62cb402fa9ad35b7 100644 --- a/app/code/Magento/GroupedImportExport/composer.json +++ b/app/code/Magento/GroupedImportExport/composer.json @@ -3,16 +3,16 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-import-export": "0.1.0-alpha97", - "magento/module-catalog-import-export": "0.1.0-alpha97", - "magento/module-grouped-product": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-import-export": "0.1.0-alpha98", + "magento/module-catalog-import-export": "0.1.0-alpha98", + "magento/module-grouped-product": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/GroupedProduct/composer.json b/app/code/Magento/GroupedProduct/composer.json index f1fcf590315add378547dcca2fa22d22d80e5e56..157c79664c81a3d2a47dbed9513e8bfc07f0d1f5 100644 --- a/app/code/Magento/GroupedProduct/composer.json +++ b/app/code/Magento/GroupedProduct/composer.json @@ -3,21 +3,21 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-catalog-inventory": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-checkout": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-msrp": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-catalog-inventory": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-checkout": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-msrp": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/ImportExport/composer.json b/app/code/Magento/ImportExport/composer.json index 561eddbb92c57d7193d8881afd28030c7120aed8..0893d2ffac4946bc162885cdf8df3f30b9798e3d 100644 --- a/app/code/Magento/ImportExport/composer.json +++ b/app/code/Magento/ImportExport/composer.json @@ -3,17 +3,17 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/module-indexer": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/module-indexer": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "ext-ctype": "*", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Indexer/composer.json b/app/code/Magento/Indexer/composer.json index 895ea508063bdfa13e9d6c3a9d4c3c6a9737307e..c077d1cb6d95aa184f6945f4a8e1e771ee5f94bb 100644 --- a/app/code/Magento/Indexer/composer.json +++ b/app/code/Magento/Indexer/composer.json @@ -3,13 +3,13 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-page-cache": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-page-cache": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Install/composer.json b/app/code/Magento/Install/composer.json index 54dfe0c181dc2e7a135f4add7f2d93089bf5c3d3..e77069c40ddce51028c8bbdec7c43e0081c8f8ee 100644 --- a/app/code/Magento/Install/composer.json +++ b/app/code/Magento/Install/composer.json @@ -3,16 +3,16 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-directory": "0.1.0-alpha97", - "magento/module-user": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-theme": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-directory": "0.1.0-alpha98", + "magento/module-user": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-theme": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Integration/composer.json b/app/code/Magento/Integration/composer.json index 9c0e59d43d47eee484cb31592afd9ec20eceb723..ac122e1c5aa8d19ed56562df0c712ec698b1add2 100644 --- a/app/code/Magento/Integration/composer.json +++ b/app/code/Magento/Integration/composer.json @@ -3,17 +3,17 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-user": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", - "magento/module-authorization": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-user": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", + "magento/module-authorization": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/LayeredNavigation/composer.json b/app/code/Magento/LayeredNavigation/composer.json index 8086986cb7b4307c55ab8c99673a08a65f0816e7..3673a1dd30314cda73bd2a215be04e404e533ef4 100644 --- a/app/code/Magento/LayeredNavigation/composer.json +++ b/app/code/Magento/LayeredNavigation/composer.json @@ -3,13 +3,13 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Log/composer.json b/app/code/Magento/Log/composer.json index 69e46c04b5ff52d9449e7f8c9e3470f60dd8b7d1..0fa1ad00f7fe2aefb0aa26c1fabfe7f88dad3c96 100644 --- a/app/code/Magento/Log/composer.json +++ b/app/code/Magento/Log/composer.json @@ -3,16 +3,16 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Msrp/composer.json b/app/code/Magento/Msrp/composer.json index 0b4b89d2783f53367c73e943b332c463e9a93264..95939c5e8bf7262319c8f0efe91c0cd0442c1ea9 100644 --- a/app/code/Magento/Msrp/composer.json +++ b/app/code/Magento/Msrp/composer.json @@ -3,21 +3,21 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-bundle": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-configurable-product": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-downloadable": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/module-grouped-product": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-store": "0.1.0-alpha97", - "magento/module-tax": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-bundle": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-configurable-product": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-downloadable": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/module-grouped-product": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-store": "0.1.0-alpha98", + "magento/module-tax": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Msrp/view/base/web/js/msrp.js b/app/code/Magento/Msrp/view/base/web/js/msrp.js index 85c1a66a587c46e7fcc8d4316ba595cc7afb0825..39be72ddcf7a1190740c48359f391a89215e9d09 100644 --- a/app/code/Magento/Msrp/view/base/web/js/msrp.js +++ b/app/code/Magento/Msrp/view/base/web/js/msrp.js @@ -47,6 +47,9 @@ define(["jquery", "jquery/ui", "mage/dropdown"], function($) { this.element.trigger('reloadPrice'); var dialog = $("#map-popup-click-for-price"); this._popupDialog(dialog, this.options.popupId); + if (this.options.addToCartUrl) { + $(this.options.cartForm).attr('action', this.options.addToCartUrl); + } if (!this.options.showAddToCart) { $('#product_addtocart_form_from_popup').hide(); } @@ -87,7 +90,6 @@ define(["jquery", "jquery/ui", "mage/dropdown"], function($) { } if (this.options.addToCartUrl) { $('.mage-dropdown-dialog > .ui-dialog-content').dropdownDialog("close"); - $(this.options.cartForm).attr('action', this.options.addToCartUrl); } $(this.options.cartForm).submit(); } diff --git a/app/code/Magento/Multishipping/composer.json b/app/code/Magento/Multishipping/composer.json index 3b6e72a0456699b4091f4e52ca0f4652cf2646c5..8c854c979c5356b30417349974c85670c1b93653 100644 --- a/app/code/Magento/Multishipping/composer.json +++ b/app/code/Magento/Multishipping/composer.json @@ -3,19 +3,19 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-checkout": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-payment": "0.1.0-alpha97", - "magento/module-tax": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-theme": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-checkout": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-payment": "0.1.0-alpha98", + "magento/module-tax": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-theme": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Newsletter/composer.json b/app/code/Magento/Newsletter/composer.json index 1299cb531075cc1ade0e0e4a976f41bfd60eb5fd..1fa8e57e7a7341052e800da182e58114d1e3f87a 100644 --- a/app/code/Magento/Newsletter/composer.json +++ b/app/code/Magento/Newsletter/composer.json @@ -3,20 +3,20 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-widget": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-cms": "0.1.0-alpha97", - "magento/module-email": "0.1.0-alpha97", - "magento/module-cron": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-widget": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-cms": "0.1.0-alpha98", + "magento/module-email": "0.1.0-alpha98", + "magento/module-cron": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/OfflinePayments/composer.json b/app/code/Magento/OfflinePayments/composer.json index 65ed9dc6de6e7230ec1bcc44dc9ab880b56f6f05..b318a197759623f976fc990a1c4bebc627e45382 100644 --- a/app/code/Magento/OfflinePayments/composer.json +++ b/app/code/Magento/OfflinePayments/composer.json @@ -3,12 +3,12 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-payment": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-payment": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/OfflineShipping/composer.json b/app/code/Magento/OfflineShipping/composer.json index 35d7460d1d66169061dd9ca920d4493a4bb22ccc..837b044618a38ef2351cc2db4e64d4bcfc4f99b2 100644 --- a/app/code/Magento/OfflineShipping/composer.json +++ b/app/code/Magento/OfflineShipping/composer.json @@ -3,19 +3,19 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-shipping": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-sales-rule": "0.1.0-alpha97", - "magento/module-directory": "0.1.0-alpha97", - "magento/module-checkout": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-shipping": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-sales-rule": "0.1.0-alpha98", + "magento/module-directory": "0.1.0-alpha98", + "magento/module-checkout": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Ogone/composer.json b/app/code/Magento/Ogone/composer.json index 63095972229bcce3320b8392f09e0e28cb8da378..1460b4737226621cfe95c68325a52e84c5077232 100644 --- a/app/code/Magento/Ogone/composer.json +++ b/app/code/Magento/Ogone/composer.json @@ -3,15 +3,15 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-payment": "0.1.0-alpha97", - "magento/module-checkout": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-payment": "0.1.0-alpha98", + "magento/module-checkout": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/PageCache/Controller/Block.php b/app/code/Magento/PageCache/Controller/Block.php index 572babf097c6213ce8fc376baa0ce18c5ac29b2a..f712b19b81720d4664f9afdfb1d25f09d7746386 100644 --- a/app/code/Magento/PageCache/Controller/Block.php +++ b/app/code/Magento/PageCache/Controller/Block.php @@ -43,7 +43,7 @@ class Block extends \Magento\Framework\App\Action\Action $blocks = json_decode($blocks); $handles = json_decode($handles); - $this->_view->loadLayout($handles); + $this->_view->loadLayout($handles, true, true, false); $data = array(); $layout = $this->_view->getLayout(); diff --git a/app/code/Magento/PageCache/composer.json b/app/code/Magento/PageCache/composer.json index a6cd124ebca9a97e4cd35fb49548c3e8f30e045f..637740ce1bd9218ca2945e260076c95983721743 100644 --- a/app/code/Magento/PageCache/composer.json +++ b/app/code/Magento/PageCache/composer.json @@ -3,13 +3,13 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/PayPalRecurringPayment/composer.json b/app/code/Magento/PayPalRecurringPayment/composer.json index e45d930bccb05e7d4bc2e842d281aa4dc32a5023..a461470fa5bef528ecb744d59734bd6ce84af003 100644 --- a/app/code/Magento/PayPalRecurringPayment/composer.json +++ b/app/code/Magento/PayPalRecurringPayment/composer.json @@ -3,17 +3,17 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-directory": "0.1.0-alpha97", - "magento/module-payment": "0.1.0-alpha97", - "magento/module-paypal": "0.1.0-alpha97", - "magento/module-recurring-payment": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-directory": "0.1.0-alpha98", + "magento/module-payment": "0.1.0-alpha98", + "magento/module-paypal": "0.1.0-alpha98", + "magento/module-recurring-payment": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Payment/composer.json b/app/code/Magento/Payment/composer.json index ac92021012d119be03b11b2b97c38fb352337599..d94ee2ccce6be787732f6ff49bef7fed66a386d3 100644 --- a/app/code/Magento/Payment/composer.json +++ b/app/code/Magento/Payment/composer.json @@ -3,16 +3,16 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-centinel": "0.1.0-alpha97", - "magento/module-checkout": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-centinel": "0.1.0-alpha98", + "magento/module-checkout": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Paypal/Block/Bml/Shortcut.php b/app/code/Magento/Paypal/Block/Bml/Shortcut.php index 61d55a5c657a96bcc35f29a25bb4c53465a213c0..ee1677dc10423fecd054d744ef0669f5485c2dc8 100644 --- a/app/code/Magento/Paypal/Block/Bml/Shortcut.php +++ b/app/code/Magento/Paypal/Block/Bml/Shortcut.php @@ -93,6 +93,7 @@ class Shortcut extends \Magento\Framework\View\Element\Template implements Catal * @param string $startAction * @param string $alias * @param string $bmlMethodCode + * @param string $shortcutTemplate * @param array $data */ public function __construct @@ -105,6 +106,7 @@ class Shortcut extends \Magento\Framework\View\Element\Template implements Catal $startAction, $alias, $bmlMethodCode, + $shortcutTemplate, array $data = array() ) { $this->_paymentData = $paymentData; @@ -114,6 +116,7 @@ class Shortcut extends \Magento\Framework\View\Element\Template implements Catal $this->_paymentMethodCode = $paymentMethodCode; $this->_startAction = $startAction; $this->_alias = $alias; + $this->setTemplate($shortcutTemplate); $this->_bmlMethodCode = $bmlMethodCode; parent::__construct($context, $data); } diff --git a/app/code/Magento/Paypal/Block/Express/Shortcut.php b/app/code/Magento/Paypal/Block/Express/Shortcut.php index 86c0c87bc24cc146c6c6a83d625aa91a0c970a62..0a2cc61ef0ba4bad16418fd8d77db60056c5b407 100644 --- a/app/code/Magento/Paypal/Block/Express/Shortcut.php +++ b/app/code/Magento/Paypal/Block/Express/Shortcut.php @@ -121,6 +121,7 @@ class Shortcut extends \Magento\Framework\View\Element\Template implements Catal * @param string $startAction * @param string $checkoutType * @param string $alias + * @param string $shortcutTemplate * @param \Magento\Checkout\Model\Session $checkoutSession * @param array $data */ @@ -137,6 +138,7 @@ class Shortcut extends \Magento\Framework\View\Element\Template implements Catal $startAction, $checkoutType, $alias, + $shortcutTemplate, \Magento\Checkout\Model\Session $checkoutSession = null, array $data = array() ) { @@ -152,6 +154,7 @@ class Shortcut extends \Magento\Framework\View\Element\Template implements Catal $this->_startAction = $startAction; $this->_checkoutType = $checkoutType; $this->_alias = $alias; + $this->setTemplate($shortcutTemplate); parent::__construct($context, $data); $this->_isScopePrivate = true; diff --git a/app/code/Magento/Paypal/Model/Observer.php b/app/code/Magento/Paypal/Model/Observer.php index 77e23a27ecafd78cec07d461d46e853631adbed4..aad004543ae557f3cec5e5a26f280c112ca12835 100644 --- a/app/code/Magento/Paypal/Model/Observer.php +++ b/app/code/Magento/Paypal/Model/Observer.php @@ -81,11 +81,6 @@ class Observer */ protected $_shortcutFactory; - /** - * Shortcut template path - */ - const SHORTCUT_TEMPLATE = 'express/shortcut.phtml'; - /** * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Paypal\Helper\Hss $paypalHss @@ -242,6 +237,7 @@ class Observer /** @var \Magento\Catalog\Block\ShortcutButtons $shortcutButtons */ $shortcutButtons = $observer->getEvent()->getContainer(); $blocks = [ + 'Magento\Paypal\Block\Express\ShortcutContainer', 'Magento\Paypal\Block\Express\Shortcut', 'Magento\Paypal\Block\PayflowExpress\Shortcut', 'Magento\Paypal\Block\Bml\Shortcut', @@ -265,8 +261,6 @@ class Observer $observer->getEvent()->getIsCatalogProduct() )->setShowOrPosition( $observer->getEvent()->getOrPosition() - )->setTemplate( - self::SHORTCUT_TEMPLATE ); $shortcutButtons->addShortcut($shortcut); } diff --git a/app/code/Magento/Paypal/composer.json b/app/code/Magento/Paypal/composer.json index 62d584462c61f36476f3a23a2f00a7fa8b87968d..46d3f8695df83f75eba445d06b5bd29430852637 100644 --- a/app/code/Magento/Paypal/composer.json +++ b/app/code/Magento/Paypal/composer.json @@ -3,25 +3,25 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-checkout": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-payment": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-tax": "0.1.0-alpha97", - "magento/module-directory": "0.1.0-alpha97", - "magento/module-theme": "0.1.0-alpha97", - "magento/module-centinel": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-checkout": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-payment": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-tax": "0.1.0-alpha98", + "magento/module-directory": "0.1.0-alpha98", + "magento/module-theme": "0.1.0-alpha98", + "magento/module-centinel": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "lib-libxml": "*", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Paypal/etc/di.xml b/app/code/Magento/Paypal/etc/di.xml index 4fc299e88f13d35c7069ae3605066acc18bd5c46..e953780e8fdba4095f81dbcadf2064cfc7e28de8 100644 --- a/app/code/Magento/Paypal/etc/di.xml +++ b/app/code/Magento/Paypal/etc/di.xml @@ -58,14 +58,22 @@ <argument name="startAction" xsi:type="string">paypal/express/start/button/1</argument> <argument name="checkoutType" xsi:type="string">Magento\Paypal\Model\Express\Checkout</argument> <argument name="alias" xsi:type="string">product.info.addtocart.paypal</argument> + <argument name="shortcutTemplate" xsi:type="string">express/shortcut.phtml</argument> </arguments> </type> + <virtualType name="Magento\Paypal\Block\Express\ShortcutContainer" type="Magento\Paypal\Block\Express\Shortcut"> + <arguments> + <argument name="alias" xsi:type="string">product.info.addtocart.paypalShortcutContainer</argument> + <argument name="shortcutTemplate" xsi:type="string">express/shortcut/container.phtml</argument> + </arguments> + </virtualType> <virtualType name="Magento\Paypal\Block\PayflowExpress\Shortcut" type="Magento\Paypal\Block\Express\Shortcut"> <arguments> <argument name="paymentMethodCode" xsi:type="const">Magento\Paypal\Model\Config::METHOD_WPP_PE_EXPRESS</argument> <argument name="startAction" xsi:type="string">paypal/payflowexpress/start/button/1</argument> <argument name="checkoutType" xsi:type="string">Magento\Paypal\Model\PayflowExpress\Checkout</argument> <argument name="alias" xsi:type="string">product.info.addtocart.payflow</argument> + <argument name="shortcutTemplate" xsi:type="string">express/shortcut.phtml</argument> </arguments> </virtualType> <type name="Magento\Paypal\Block\Bml\Shortcut"> @@ -74,6 +82,7 @@ <argument name="startAction" xsi:type="string">paypal/bml/start/button/1</argument> <argument name="bmlMethodCode" xsi:type="const">Magento\Paypal\Model\Config::METHOD_WPP_BML</argument> <argument name="alias" xsi:type="string">product.info.addtocart.paypalbml</argument> + <argument name="shortcutTemplate" xsi:type="string">express/shortcut.phtml</argument> </arguments> </type> <type name="Magento\Payment\Model\Checks\Composite"> diff --git a/app/code/Magento/Paypal/view/frontend/templates/express/shortcut.phtml b/app/code/Magento/Paypal/view/frontend/templates/express/shortcut.phtml index 9c65d060a06b08d47dda3c9dd932449bdd72ce0d..af04820dd791441e85e1788c139ff3f07f40ceed 100644 --- a/app/code/Magento/Paypal/view/frontend/templates/express/shortcut.phtml +++ b/app/code/Magento/Paypal/view/frontend/templates/express/shortcut.phtml @@ -42,10 +42,6 @@ if ($this->isOrPositionBefore()) { alt="<?php echo __('Checkout with PayPal'); ?>" title="<?php echo __('Checkout with PayPal'); ?>"/> <?php if ($this->getConfirmationUrl() || $this->getIsInCatalogProduct()): ?> - <?php if ($this->getIsInCatalogProduct()): ?> - <input type="hidden" id="pp-checkout-url" name="return_url" value=""/> - <?php endif; ?> - <?php $confirmationUrl = $this->getConfirmationUrl(); $isInCatalogProduct = $this->getIsInCatalogProduct(); @@ -62,7 +58,7 @@ require(['jquery', 'Magento_Paypal/js/paypal-checkout'], function($){ confirmUrl: "<?php echo !empty($confirmationUrl) ? $confirmationUrl : false ?>", isCatalogProduct: "<?php echo !empty($isInCatalogProduct) ? $isInCatalogProduct : false ?>", paypalCheckoutSelector: '#pp-checkout-url', - productAddToCartForm: '#product_addtocart_form' + shortcutContainerClass: '<?php echo "." . $shortcutHtmlId ?>' }); }); diff --git a/app/code/Magento/Paypal/view/frontend/templates/express/shortcut/container.phtml b/app/code/Magento/Paypal/view/frontend/templates/express/shortcut/container.phtml new file mode 100644 index 0000000000000000000000000000000000000000..dca1c8e6637e65ff1719419539575788db2f8900 --- /dev/null +++ b/app/code/Magento/Paypal/view/frontend/templates/express/shortcut/container.phtml @@ -0,0 +1,33 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> +<?php +/** + * @var $this Magento\Paypal\Block\Express\Shortcut + */ +?> +<?php if ($this->getIsInCatalogProduct()): ?> + <input type="hidden" id="pp-checkout-url" name="return_url" value=""/> +<?php endif; ?> + diff --git a/app/code/Magento/Paypal/view/frontend/web/js/paypal-checkout.js b/app/code/Magento/Paypal/view/frontend/web/js/paypal-checkout.js index 00f7df3977cc29f52e9db7fd301ddaf002348c6e..45249b2fa16de021c475c83968d4e11f85d80a41 100644 --- a/app/code/Magento/Paypal/view/frontend/web/js/paypal-checkout.js +++ b/app/code/Magento/Paypal/view/frontend/web/js/paypal-checkout.js @@ -42,8 +42,10 @@ define([ } } if (this.options.isCatalogProduct) { - $(this.options.paypalCheckoutSelector).val(returnUrl); - $(this.options.productAddToCartForm).submit(); + // find the form from which the button was clicked + var form = $(this.options.shortcutContainerClass).closest("form"); + $(form).find(this.options.paypalCheckoutSelector).val(returnUrl); + $(form).submit(); } else { $.mage.redirect(returnUrl); } diff --git a/app/code/Magento/Paypal/view/frontend/web/order-review.js b/app/code/Magento/Paypal/view/frontend/web/order-review.js index 3c610bb94ccbcfe3ff286f31999aaeab8ac9cfc9..1034dafb4366885623c56f2e8379b040c1740ce0 100644 --- a/app/code/Magento/Paypal/view/frontend/web/order-review.js +++ b/app/code/Magento/Paypal/view/frontend/web/order-review.js @@ -176,6 +176,7 @@ define([ if (this.element.data('mageValidation')) { return this.element.validation().valid(); } + return true; }, /** diff --git a/app/code/Magento/Persistent/composer.json b/app/code/Magento/Persistent/composer.json index a25825eaa2c736d9eeee8ffaee7e6515fc5d2634..378bcf76865b6fc345f9d15d62b819dca8a396e1 100644 --- a/app/code/Magento/Persistent/composer.json +++ b/app/code/Magento/Persistent/composer.json @@ -3,17 +3,17 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-checkout": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-cron": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-checkout": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-cron": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/ProductAlert/composer.json b/app/code/Magento/ProductAlert/composer.json index 9f3c3216d0764860b82da3c56dfbe8fea1b37754..785422097cfd493d60d7c9973a882ca3444d4b82 100644 --- a/app/code/Magento/ProductAlert/composer.json +++ b/app/code/Magento/ProductAlert/composer.json @@ -3,15 +3,15 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/RecurringPayment/composer.json b/app/code/Magento/RecurringPayment/composer.json index b8bd1ab1c5e5ea72b8f796738bcaf244401095ed..94442e13902359145cd974d92ef58c34f8354f3b 100644 --- a/app/code/Magento/RecurringPayment/composer.json +++ b/app/code/Magento/RecurringPayment/composer.json @@ -3,22 +3,22 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-checkout": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/module-payment": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-theme": "0.1.0-alpha97", - "magento/module-catalog-inventory": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-checkout": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/module-payment": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-theme": "0.1.0-alpha98", + "magento/module-catalog-inventory": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Reports/composer.json b/app/code/Magento/Reports/composer.json index 47d42e8dced5dc995da52b50a1f111d38f4a1d21..0cdedfb4e612b519767e75affc51bdcf7c779f89 100644 --- a/app/code/Magento/Reports/composer.json +++ b/app/code/Magento/Reports/composer.json @@ -3,27 +3,27 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-cms": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-widget": "0.1.0-alpha97", - "magento/module-log": "0.1.0-alpha97", - "magento/module-wishlist": "0.1.0-alpha97", - "magento/module-review": "0.1.0-alpha97", - "magento/module-catalog-inventory": "0.1.0-alpha97", - "magento/module-tax": "0.1.0-alpha97", - "magento/module-downloadable": "0.1.0-alpha97", - "magento/module-sales-rule": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-cms": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-widget": "0.1.0-alpha98", + "magento/module-log": "0.1.0-alpha98", + "magento/module-wishlist": "0.1.0-alpha98", + "magento/module-review": "0.1.0-alpha98", + "magento/module-catalog-inventory": "0.1.0-alpha98", + "magento/module-tax": "0.1.0-alpha98", + "magento/module-downloadable": "0.1.0-alpha98", + "magento/module-sales-rule": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/RequireJs/composer.json b/app/code/Magento/RequireJs/composer.json index 5f6b598c2778473ce0c282e165137a04a5823192..23ec053254d7b8e6544a8ade058c10b93932df04 100644 --- a/app/code/Magento/RequireJs/composer.json +++ b/app/code/Magento/RequireJs/composer.json @@ -3,11 +3,11 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/framework": "0.1.0-alpha97", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Review/composer.json b/app/code/Magento/Review/composer.json index 29c172fbb70478ceb54e616c83266203cefcf969..5449d3aa435eba1bc8351adf774beb9f4e9dc7a3 100644 --- a/app/code/Magento/Review/composer.json +++ b/app/code/Magento/Review/composer.json @@ -3,20 +3,20 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/module-theme": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-tax": "0.1.0-alpha97", - "magento/module-newsletter": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/module-theme": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-tax": "0.1.0-alpha98", + "magento/module-newsletter": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Rss/composer.json b/app/code/Magento/Rss/composer.json index f4380ee4515bc623a09ada1185f9be20bef01b98..0583eb66b6a49539510dbcafd860034651efb92c 100644 --- a/app/code/Magento/Rss/composer.json +++ b/app/code/Magento/Rss/composer.json @@ -3,13 +3,13 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Rule/composer.json b/app/code/Magento/Rule/composer.json index bb7975eda0ff5968ed40f4b3c13e8a84ffd971f0..7d9fa0e7d97f47f5c3e4aec66907151ec13c9b09 100644 --- a/app/code/Magento/Rule/composer.json +++ b/app/code/Magento/Rule/composer.json @@ -3,16 +3,16 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "lib-libxml": "*", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Sales/composer.json b/app/code/Magento/Sales/composer.json index 46bc9944d9bbb531b1100932020414bf69796a51..c0d7676c85fb060102da75376ad99485fae27fc1 100644 --- a/app/code/Magento/Sales/composer.json +++ b/app/code/Magento/Sales/composer.json @@ -3,31 +3,31 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-authorization": "0.1.0-alpha97", - "magento/module-payment": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-checkout": "0.1.0-alpha97", - "magento/module-theme": "0.1.0-alpha97", - "magento/module-sales-rule": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-widget": "0.1.0-alpha97", - "magento/module-directory": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/module-tax": "0.1.0-alpha97", - "magento/module-gift-message": "0.1.0-alpha97", - "magento/module-reports": "0.1.0-alpha97", - "magento/module-catalog-inventory": "0.1.0-alpha97", - "magento/module-wishlist": "0.1.0-alpha97", - "magento/module-email": "0.1.0-alpha97", - "magento/module-shipping": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-authorization": "0.1.0-alpha98", + "magento/module-payment": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-checkout": "0.1.0-alpha98", + "magento/module-theme": "0.1.0-alpha98", + "magento/module-sales-rule": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-widget": "0.1.0-alpha98", + "magento/module-directory": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/module-tax": "0.1.0-alpha98", + "magento/module-gift-message": "0.1.0-alpha98", + "magento/module-reports": "0.1.0-alpha98", + "magento/module-catalog-inventory": "0.1.0-alpha98", + "magento/module-wishlist": "0.1.0-alpha98", + "magento/module-email": "0.1.0-alpha98", + "magento/module-shipping": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/SalesRule/composer.json b/app/code/Magento/SalesRule/composer.json index 19d2b6b920a496449229242648af0171d2169678..bb8754a0464ad0e95cb1b1c4a7f977164a8af100 100644 --- a/app/code/Magento/SalesRule/composer.json +++ b/app/code/Magento/SalesRule/composer.json @@ -3,26 +3,26 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-rule": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-directory": "0.1.0-alpha97", - "magento/module-shipping": "0.1.0-alpha97", - "magento/module-payment": "0.1.0-alpha97", - "magento/module-reports": "0.1.0-alpha97", - "magento/module-catalog-rule": "0.1.0-alpha97", - "magento/module-widget": "0.1.0-alpha97", - "magento/module-cron": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-rule": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-directory": "0.1.0-alpha98", + "magento/module-shipping": "0.1.0-alpha98", + "magento/module-payment": "0.1.0-alpha98", + "magento/module-reports": "0.1.0-alpha98", + "magento/module-catalog-rule": "0.1.0-alpha98", + "magento/module-widget": "0.1.0-alpha98", + "magento/module-cron": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Sendfriend/composer.json b/app/code/Magento/Sendfriend/composer.json index 976cf398f14b608675d0f91538fbe2a436324faa..e9aefbc67e21746d66ce6d3c599720d2b0f033f7 100644 --- a/app/code/Magento/Sendfriend/composer.json +++ b/app/code/Magento/Sendfriend/composer.json @@ -3,16 +3,16 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-theme": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-theme": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Shipping/composer.json b/app/code/Magento/Shipping/composer.json index aa103114a723e579ecf384a1b071bb82dd433558..30e15a97db3e5fd62b1543fdc39579b8d611f6da 100644 --- a/app/code/Magento/Shipping/composer.json +++ b/app/code/Magento/Shipping/composer.json @@ -3,23 +3,23 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-directory": "0.1.0-alpha97", - "magento/module-contact": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-payment": "0.1.0-alpha97", - "magento/module-tax": "0.1.0-alpha97", - "magento/module-catalog-inventory": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-directory": "0.1.0-alpha98", + "magento/module-contact": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-payment": "0.1.0-alpha98", + "magento/module-tax": "0.1.0-alpha98", + "magento/module-catalog-inventory": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "ext-gd": "*", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Sitemap/composer.json b/app/code/Magento/Sitemap/composer.json index cd9d94f30552e78d9277567f2b109b2f55806dc0..1ceb37b1c822eaf70846d71cded0424b1bc928d2 100644 --- a/app/code/Magento/Sitemap/composer.json +++ b/app/code/Magento/Sitemap/composer.json @@ -3,18 +3,18 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/module-cms": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-catalog-url-rewrite": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/module-cms": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-catalog-url-rewrite": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Store/composer.json b/app/code/Magento/Store/composer.json index 622ac35b3bd81761948012cb8f83ac5199b27f92..5a32828033dd3a2535abcfe5689c2dfd1d96e98b 100644 --- a/app/code/Magento/Store/composer.json +++ b/app/code/Magento/Store/composer.json @@ -3,14 +3,14 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-core": "0.1.0-alpha97", - "magento/module-directory": "0.1.0-alpha97", - "magento/module-ui": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-core": "0.1.0-alpha98", + "magento/module-directory": "0.1.0-alpha98", + "magento/module-ui": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Tax/composer.json b/app/code/Magento/Tax/composer.json index b21fa5a1319071f6b86cc20e2870297e0f1d68a9..faa67acb52c6d8b3a1bd8ab129e73874570bdfae 100644 --- a/app/code/Magento/Tax/composer.json +++ b/app/code/Magento/Tax/composer.json @@ -3,23 +3,23 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-directory": "0.1.0-alpha97", - "magento/module-checkout": "0.1.0-alpha97", - "magento/module-shipping": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-reports": "0.1.0-alpha97", - "magento/module-configurable-product": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-directory": "0.1.0-alpha98", + "magento/module-checkout": "0.1.0-alpha98", + "magento/module-shipping": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-reports": "0.1.0-alpha98", + "magento/module-configurable-product": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/TaxImportExport/composer.json b/app/code/Magento/TaxImportExport/composer.json index 549e0fd2d5fd225ecf731ae94e9a6679b5a18f7b..c5552cbb187717a1ca96d32e45ba7735f97e20e4 100644 --- a/app/code/Magento/TaxImportExport/composer.json +++ b/app/code/Magento/TaxImportExport/composer.json @@ -3,15 +3,15 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-tax": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-directory": "0.1.0-alpha97", - "magento/module-store": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-tax": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-directory": "0.1.0-alpha98", + "magento/module-store": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Theme/composer.json b/app/code/Magento/Theme/composer.json index eae6bdbc4cc83863452bb6e51ce06b470829278b..25294ec39fe0751c7f9df08e22988817afa39add 100644 --- a/app/code/Magento/Theme/composer.json +++ b/app/code/Magento/Theme/composer.json @@ -3,17 +3,17 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-cms": "0.1.0-alpha97", - "magento/module-translation": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-cms": "0.1.0-alpha98", + "magento/module-translation": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Translation/composer.json b/app/code/Magento/Translation/composer.json index ecb509392ce676baee07ed76b9aa54e44ad224b5..7dd5da0f009bb1296e56cf6b1c527b4402daee55 100644 --- a/app/code/Magento/Translation/composer.json +++ b/app/code/Magento/Translation/composer.json @@ -3,14 +3,14 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-core": "0.1.0-alpha97", - "magento/module-store": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-core": "0.1.0-alpha98", + "magento/module-store": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Ui/composer.json b/app/code/Magento/Ui/composer.json index cc0b3354d6a0037bf1e0018795fd1c4dde3ae62d..b8a564f6d859beb432f1841d7f0aa65b941b4ebb 100644 --- a/app/code/Magento/Ui/composer.json +++ b/app/code/Magento/Ui/composer.json @@ -3,13 +3,13 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-store": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-store": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Ups/composer.json b/app/code/Magento/Ups/composer.json index ea4a5bd145de979281a344748b53a2e4dc4382fe..10debbf8f1d99018fb67d5a641b06c0827c86d7e 100644 --- a/app/code/Magento/Ups/composer.json +++ b/app/code/Magento/Ups/composer.json @@ -3,18 +3,18 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-shipping": "0.1.0-alpha97", - "magento/module-directory": "0.1.0-alpha97", - "magento/module-catalog-inventory": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-shipping": "0.1.0-alpha98", + "magento/module-directory": "0.1.0-alpha98", + "magento/module-catalog-inventory": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/UrlRewrite/composer.json b/app/code/Magento/UrlRewrite/composer.json index 2faad085665013f35c5138b3ca0ea40f4755e358..5fde5c1e6eccaba2c9dde2ffd97700c60390c13f 100644 --- a/app/code/Magento/UrlRewrite/composer.json +++ b/app/code/Magento/UrlRewrite/composer.json @@ -3,18 +3,18 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-store": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-catalog-url-rewrite": "0.1.0-alpha97", - "magento/module-cms": "0.1.0-alpha97", - "magento/module-cms-url-rewrite": "0.1.0-alpha97", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-store": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-catalog-url-rewrite": "0.1.0-alpha98", + "magento/module-cms": "0.1.0-alpha98", + "magento/module-cms-url-rewrite": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/User/Model/User.php b/app/code/Magento/User/Model/User.php index 1b9260fb773efc41ce963285f91f0c47c8b150b2..d42bd15220da9f2b18722d8a3de93bfe006f1065 100644 --- a/app/code/Magento/User/Model/User.php +++ b/app/code/Magento/User/Model/User.php @@ -211,7 +211,8 @@ class User extends AbstractModel implements StorageInterface '_roleFactory', '_encryptor', '_transportBuilder', - '_storeManager' + '_storeManager', + '_validatorBeforeSave' ) ); } diff --git a/app/code/Magento/User/composer.json b/app/code/Magento/User/composer.json index 6db87fb5083cf235df5b8a9e624a71c78e0de61e..f0a8e811680f445ec3ef948d024d94d0aeff35b4 100644 --- a/app/code/Magento/User/composer.json +++ b/app/code/Magento/User/composer.json @@ -3,16 +3,16 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-authorization": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-integration": "0.1.0-alpha97", - "magento/module-theme": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-authorization": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-integration": "0.1.0-alpha98", + "magento/module-theme": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Usps/composer.json b/app/code/Magento/Usps/composer.json index ebab020361b6e97636087f1c62ce59c6034fa499..a5470c3bd376ce209f18194924efbd470fc02740 100644 --- a/app/code/Magento/Usps/composer.json +++ b/app/code/Magento/Usps/composer.json @@ -3,19 +3,19 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-shipping": "0.1.0-alpha97", - "magento/module-directory": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-catalog-inventory": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-shipping": "0.1.0-alpha98", + "magento/module-directory": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-catalog-inventory": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "lib-libxml": "*", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Webapi/Controller/ServiceArgsSerializer.php b/app/code/Magento/Webapi/Controller/ServiceArgsSerializer.php index 49e55065c933be1d53bde5ca870f66133d183ce8..8ab2e7811260f1be4444159fff3174f28058f7c8 100644 --- a/app/code/Magento/Webapi/Controller/ServiceArgsSerializer.php +++ b/app/code/Magento/Webapi/Controller/ServiceArgsSerializer.php @@ -213,8 +213,8 @@ class ServiceArgsSerializer if ($type === TypeProcessor::ANY_TYPE) { continue; } - //If custom attribute value is an array then its a data object type - $attributeValue = $this->_createFromArray($type, $customAttributeValue); + + $attributeValue = $this->_createDataObjectForTypeAndArrayValue($type, $customAttributeValue); } else { $attributeValue = $this->_convertValue($customAttributeValue, $type); } @@ -228,6 +228,28 @@ class ServiceArgsSerializer return $result; } + /** + * Creates a data object type from a given type name and a PHP array. + * + * @param string $type The type of data object to create + * @param array $customAttributeValue The data object values + * @return mixed + */ + protected function _createDataObjectForTypeAndArrayValue($type, $customAttributeValue) + { + if (substr($type, -2) === "[]") { + $type = substr($type, 0, -2); + $attributeValue = []; + foreach ($customAttributeValue as $value) { + $attributeValue[] = $this->_createFromArray($type, $value); + } + } else { + $attributeValue = $this->_createFromArray($type, $customAttributeValue); + } + + return $attributeValue; + } + /** * Convert data from array to Data Object representation if type is Data Object or array of Data Objects. * diff --git a/app/code/Magento/Webapi/composer.json b/app/code/Magento/Webapi/composer.json index 5774dfbea9d4905c46d8a1718a2943fc451820b2..b18f8e6f495bd83c3a569a6d89eb11f0470276d7 100644 --- a/app/code/Magento/Webapi/composer.json +++ b/app/code/Magento/Webapi/composer.json @@ -3,17 +3,17 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-authorization": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-integration": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-user": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-authorization": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-integration": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-user": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Weee/composer.json b/app/code/Magento/Weee/composer.json index 4579e60f538bc9c95e74857e258046e42b262062..aabbb4d654f3a15cfe04867bafed6759677c72b1 100644 --- a/app/code/Magento/Weee/composer.json +++ b/app/code/Magento/Weee/composer.json @@ -3,21 +3,21 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-tax": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-directory": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-eav": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-bundle": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-tax": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-directory": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-eav": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-bundle": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Widget/composer.json b/app/code/Magento/Widget/composer.json index be96f2855b615678a67f86a7dd70e93143ad4276..ca7a34c58a88a73bac66b41e1abd620168b83be1 100644 --- a/app/code/Magento/Widget/composer.json +++ b/app/code/Magento/Widget/composer.json @@ -3,16 +3,16 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-cms": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-cms": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/code/Magento/Wishlist/composer.json b/app/code/Magento/Wishlist/composer.json index b4547a75dd3e7a82109edfbd03c1d6d2248123d8..b43053c8d6d95b545cf1d5c913a2750d544fe05b 100644 --- a/app/code/Magento/Wishlist/composer.json +++ b/app/code/Magento/Wishlist/composer.json @@ -3,25 +3,25 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha97", - "magento/module-customer": "0.1.0-alpha97", - "magento/module-catalog": "0.1.0-alpha97", - "magento/module-core": "0.1.0-alpha97", - "magento/module-checkout": "0.1.0-alpha97", - "magento/module-theme": "0.1.0-alpha97", - "magento/module-catalog-inventory": "0.1.0-alpha97", - "magento/module-rss": "0.1.0-alpha97", - "magento/module-backend": "0.1.0-alpha97", - "magento/module-bundle": "0.1.0-alpha97", - "magento/module-sales": "0.1.0-alpha97", - "magento/module-grouped-product": "0.1.0-alpha97", - "magento/module-configurable-product": "0.1.0-alpha97", - "magento/module-downloadable": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/module-store": "0.1.0-alpha98", + "magento/module-customer": "0.1.0-alpha98", + "magento/module-catalog": "0.1.0-alpha98", + "magento/module-core": "0.1.0-alpha98", + "magento/module-checkout": "0.1.0-alpha98", + "magento/module-theme": "0.1.0-alpha98", + "magento/module-catalog-inventory": "0.1.0-alpha98", + "magento/module-rss": "0.1.0-alpha98", + "magento/module-backend": "0.1.0-alpha98", + "magento/module-bundle": "0.1.0-alpha98", + "magento/module-sales": "0.1.0-alpha98", + "magento/module-grouped-product": "0.1.0-alpha98", + "magento/module-configurable-product": "0.1.0-alpha98", + "magento/module-downloadable": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/design/adminhtml/Magento/backend/composer.json b/app/design/adminhtml/Magento/backend/composer.json index 53888ad9bdcaacb51bc3d7b1c343023062f487da..407afee3724f47ca8dd1e66adbf2b928f94e4162 100644 --- a/app/design/adminhtml/Magento/backend/composer.json +++ b/app/design/adminhtml/Magento/backend/composer.json @@ -3,11 +3,11 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/framework": "0.1.0-alpha97", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-theme", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/design/adminhtml/Magento/backend/theme.xml b/app/design/adminhtml/Magento/backend/theme.xml index 6c738f9599b9921ead5a518b9ca6f0a32d1277ba..acbb07ba133ac657601c0f5c529fe712dfaaf120 100644 --- a/app/design/adminhtml/Magento/backend/theme.xml +++ b/app/design/adminhtml/Magento/backend/theme.xml @@ -24,5 +24,5 @@ --> <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Magento 2 backend</title> - <version>0.1.0-alpha97</version> + <version>0.1.0-alpha98</version> </theme> diff --git a/app/design/frontend/Magento/blank/composer.json b/app/design/frontend/Magento/blank/composer.json index ff9957a1d877dfe412eee1553b3c98507a7b3e05..8386cbafd9d0de7c9f4e0c5a9e79564a81297b48 100644 --- a/app/design/frontend/Magento/blank/composer.json +++ b/app/design/frontend/Magento/blank/composer.json @@ -3,11 +3,11 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/framework": "0.1.0-alpha97", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-theme", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/design/frontend/Magento/blank/theme.xml b/app/design/frontend/Magento/blank/theme.xml index 4ce39439c7b780d0b0396357e829b82061b24e1d..feb7ace0aa1b62f95de20c69fdb7e80b391282d2 100644 --- a/app/design/frontend/Magento/blank/theme.xml +++ b/app/design/frontend/Magento/blank/theme.xml @@ -24,7 +24,7 @@ --> <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Magento Blank</title> - <version>0.1.0-alpha97</version> + <version>0.1.0-alpha98</version> <media> <preview_image>media/preview.jpg</preview_image> </media> diff --git a/app/design/frontend/Magento/plushe/composer.json b/app/design/frontend/Magento/plushe/composer.json index a4be706b5b2771d2d068e27195a54afd3d5d308e..afab06c39758188917c22cce60bcd5c62a1e89b7 100644 --- a/app/design/frontend/Magento/plushe/composer.json +++ b/app/design/frontend/Magento/plushe/composer.json @@ -3,12 +3,12 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/theme-frontend-blank": "0.1.0-alpha97", - "magento/framework": "0.1.0-alpha97", + "magento/theme-frontend-blank": "0.1.0-alpha98", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-theme", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "extra": { "map": [ [ diff --git a/app/design/frontend/Magento/plushe/theme.xml b/app/design/frontend/Magento/plushe/theme.xml index 99f74b8f2eb49b0db81188f921c8f5d4b384c3f3..ae7f7d0b8f1324751b2b0461d0e3bfd215ee666f 100644 --- a/app/design/frontend/Magento/plushe/theme.xml +++ b/app/design/frontend/Magento/plushe/theme.xml @@ -24,7 +24,7 @@ --> <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Magento Plushe</title> - <version>0.1.0-alpha97</version> + <version>0.1.0-alpha98</version> <parent>Magento/blank</parent> <media> <preview_image>media/preview.jpg</preview_image> diff --git a/app/design/install/Magento/basic/theme.xml b/app/design/install/Magento/basic/theme.xml index 2f2fbec2347a2a7194275c6427648df786f459be..2e347e2c16323c630adf479e6559de10682737dc 100644 --- a/app/design/install/Magento/basic/theme.xml +++ b/app/design/install/Magento/basic/theme.xml @@ -24,5 +24,5 @@ --> <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Magento Basic</title> - <version>0.1.0-alpha97</version> + <version>0.1.0-alpha98</version> </theme> diff --git a/app/i18n/magento/de_de/composer.json b/app/i18n/magento/de_de/composer.json index f985c2c20c57c593b9dd8baf3f63177fb253195a..062c3add97428645d9aadae2db6684c3eee85560 100644 --- a/app/i18n/magento/de_de/composer.json +++ b/app/i18n/magento/de_de/composer.json @@ -1,9 +1,9 @@ { "name": "magento/language-de_de", "description": "German (Germany) language", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "require": { - "magento/framework": "0.1.0-alpha97", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-language", diff --git a/app/i18n/magento/en_us/composer.json b/app/i18n/magento/en_us/composer.json index 14c9283de5bbb3a68d84607539b6d74639b2726d..576af7cda01ba1a6f9d1f6f18e4b911ed18e4f3d 100644 --- a/app/i18n/magento/en_us/composer.json +++ b/app/i18n/magento/en_us/composer.json @@ -1,9 +1,9 @@ { "name": "magento/language-en_us", "description": "English (United States) language", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "require": { - "magento/framework": "0.1.0-alpha97", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-language", diff --git a/app/i18n/magento/es_es/composer.json b/app/i18n/magento/es_es/composer.json index 8bfa7b0685df2e5658ad6937d00f33163a775bbe..d5702cc1f5dbea2b23ee7917c8f0d2ceefb4c546 100644 --- a/app/i18n/magento/es_es/composer.json +++ b/app/i18n/magento/es_es/composer.json @@ -1,9 +1,9 @@ { "name": "magento/language-es_es", "description": "Spanish (Spain) language", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "require": { - "magento/framework": "0.1.0-alpha97", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-language", diff --git a/app/i18n/magento/fr_fr/composer.json b/app/i18n/magento/fr_fr/composer.json index 162eba88f30190192492b6dd2b0d1b945057ab96..5d9c4962205e5a6cd80ea6cee91f684302c06d3c 100644 --- a/app/i18n/magento/fr_fr/composer.json +++ b/app/i18n/magento/fr_fr/composer.json @@ -1,9 +1,9 @@ { "name": "magento/language-fr_fr", "description": "French (France) language", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "require": { - "magento/framework": "0.1.0-alpha97", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-language", diff --git a/app/i18n/magento/nl_nl/composer.json b/app/i18n/magento/nl_nl/composer.json index 9a85fa702e1998d57396b01875e3501641ca6165..c8c6d10ede64ebe02d167c31600972cd9a00c78c 100644 --- a/app/i18n/magento/nl_nl/composer.json +++ b/app/i18n/magento/nl_nl/composer.json @@ -1,9 +1,9 @@ { "name": "magento/language-nl_nl", "description": "Dutch (Netherlands) language", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "require": { - "magento/framework": "0.1.0-alpha97", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-language", diff --git a/app/i18n/magento/pt_br/composer.json b/app/i18n/magento/pt_br/composer.json index 7d62abb51678ecdab51774721e91768e5f4be959..38f0b204123212eee040eb16a5060b193a23b141 100644 --- a/app/i18n/magento/pt_br/composer.json +++ b/app/i18n/magento/pt_br/composer.json @@ -1,9 +1,9 @@ { "name": "magento/language-pt_br", "description": "Portuguese (Brazil) language", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "require": { - "magento/framework": "0.1.0-alpha97", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-language", diff --git a/app/i18n/magento/zh_cn/composer.json b/app/i18n/magento/zh_cn/composer.json index 16562ae1971bd26c9b4300ffe47802b150a10a98..45f3b1ea226c9acc8fde8ab63d4c29c142aa813e 100644 --- a/app/i18n/magento/zh_cn/composer.json +++ b/app/i18n/magento/zh_cn/composer.json @@ -1,9 +1,9 @@ { "name": "magento/language-zh_cn", "description": "Chinese (China) language", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "require": { - "magento/framework": "0.1.0-alpha97", + "magento/framework": "0.1.0-alpha98", "magento/magento-composer-installer": "*" }, "type": "magento2-language", diff --git a/composer.json b/composer.json index 43976dfad94adb4ed0ffe5bbdee53198bf830126..ca94c7c2a83132a52fceb5bb93632ae46bc0c07a 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "magento/project-community-edition", "description": "Magento project (Community Edition)", "type": "project", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "require": { "php": "~5.4.11|~5.5.0" }, diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Grid.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Grid.php index 7c11952fad3fcc29e74f52e3295da5ee1fdf4f62..76d6fb16a12696d47fa3e788d7a737ca1050ce5e 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Grid.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Grid.php @@ -151,11 +151,46 @@ abstract class Grid extends Block protected $option = '[name="status"]'; /** - * Selector for action expand Filter + * Filter button * * @var string */ - protected $filterOpen = '.action.filters-toggle'; + protected $filterButton = '.action.filters-toggle'; + + /** + * Active class + * + * @var string + */ + protected $active = '.active'; + + /** + * Base part of row locator template for getRow() method + * + * @var string + */ + protected $location = '//div[@class="grid"]//tr['; + + /** + * Secondary part of row locator template for getRow() method + * + * @var string + */ + protected $rowTemplate = 'td[contains(text(),normalize-space("%s"))]'; + + /** + * Secondary part of row locator template for getRow() method with strict option + * + * @var string + */ + protected $rowTemplateStrict = 'td[text()[normalize-space()="%s"]]'; + + /** + * Magento grid loader + * + * @var string + */ + protected $loader = '[data-role="spinner"]'; /** * Get backend abstract block @@ -200,10 +235,11 @@ abstract class Grid extends Block */ public function search(array $filter) { + $this->openFilterBlock(); $this->resetFilter(); $this->prepareForSearch($filter); $this->_rootElement->find($this->searchButton, Locator::SELECTOR_CSS)->click(); - $this->getTemplateBlock()->waitLoader(); + $this->waitLoader(); $this->reinitRootElement(); } @@ -215,6 +251,7 @@ abstract class Grid extends Block */ public function searchAndOpen(array $filter) { + $this->openFilterBlock(); $this->search($filter); $rowItem = $this->_rootElement->find($this->rowItem, Locator::SELECTOR_CSS); if ($rowItem->isVisible()) { @@ -225,6 +262,24 @@ abstract class Grid extends Block } } + /** + * Wait loader + * + * @return void + */ + protected function waitLoader() + { + $browser = $this->browser; + $selector = $this->loader; + $browser->waitUntil( + function () use ($browser, $selector) { + $productSavedMessage = $browser->find($selector); + return $productSavedMessage->isVisible() == false ? true : null; + } + ); + $this->getTemplateBlock()->waitLoader(); + } + /** * Method that waits for the configured selector using class attributes. */ @@ -247,6 +302,7 @@ abstract class Grid extends Block */ public function searchAndSelect(array $filter) { + $this->openFilterBlock(); $this->search($filter); $selectItem = $this->_rootElement->find($this->selectItem); if ($selectItem->isVisible()) { @@ -261,12 +317,9 @@ abstract class Grid extends Block */ public function resetFilter() { - $expandFilterButton = $this->_rootElement->find($this->filterOpen, Locator::SELECTOR_CSS); - if ($expandFilterButton->isVisible()) { - $expandFilterButton->click(); - } + $this->openFilterBlock(); $this->_rootElement->find($this->resetButton, Locator::SELECTOR_CSS)->click(); - $this->getTemplateBlock()->waitLoader(); + $this->waitLoader(); $this->reinitRootElement(); } @@ -323,6 +376,7 @@ abstract class Grid extends Block */ protected function getRow(array $filter, $isSearchable = true, $isStrict = true) { + $this->openFilterBlock(); if ($isSearchable) { $this->search($filter); } @@ -349,6 +403,7 @@ abstract class Grid extends Block */ public function isRowVisible(array $filter, $isSearchable = true, $isStrict = true) { + $this->openFilterBlock(); return $this->getRow($filter, $isSearchable, $isStrict)->isVisible(); } @@ -360,11 +415,25 @@ abstract class Grid extends Block */ public function sortGridByField($field, $sort = "desc") { + $this->openFilterBlock(); $sortBlock = $this->_rootElement->find(sprintf($this->sortLink, $field, $sort)); if ($sortBlock->isVisible()) { $sortBlock->click(); - $this->getTemplateBlock()->waitLoader(); + $this->waitLoader(); } $this->reinitRootElement(); } + + /** + * Open Filter Block + * + * @return void + */ + protected function openFilterBlock() + { + $button = $this->_rootElement->find($this->filterButton); + if ($button->isVisible() && !$this->_rootElement->find($this->filterButton . $this->active)->isVisible()) { + $button->click(); + } + } } diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/AddBundleProductToCartFromCustomerWishlistOnFrontendTest/test.csv b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/AddBundleProductToCartFromCustomerWishlistOnFrontendTest/test.csv deleted file mode 100644 index 3e389686633d0e435c6a93822d7f360dc8f82c38..0000000000000000000000000000000000000000 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/AddBundleProductToCartFromCustomerWishlistOnFrontendTest/test.csv +++ /dev/null @@ -1,3 +0,0 @@ -"products";"qty";"constraint" -"bundleProduct::bundle_dynamic_product";"2";"assertProductQtyInShoppingCart, assertProductsIsAbsentInWishlist" -"bundleProduct::bundle_fixed_product";"2";"assertProductQtyInShoppingCart, assertProductsIsAbsentInWishlist" diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/BundleDynamicTest.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/BundleDynamicTest.php index da5588b335ccc246ff10c0e4b737d679573798fb..57103046af3697d87dc22217233bfc886171186f 100755 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/BundleDynamicTest.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/BundleDynamicTest.php @@ -66,12 +66,12 @@ class BundleDynamicTest extends Functional $productForm->fill($bundle, null, $category); $createProductPage->getFormPageActions()->save(); //Verification - $createProductPage->getMessagesBlock()->assertSuccessMessage(); + $createProductPage->getMessagesBlock()->waitSuccessMessage(); // Flush cache $cachePage = Factory::getPageFactory()->getAdminCache(); $cachePage->open(); $cachePage->getActionsBlock()->flushMagentoCache(); - $cachePage->getMessagesBlock()->assertSuccessMessage(); + $cachePage->getMessagesBlock()->waitSuccessMessage(); //Verification $this->assertOnGrid($bundle); $this->assertOnCategory($bundle); @@ -88,7 +88,7 @@ class BundleDynamicTest extends Functional $productGridPage = Factory::getPageFactory()->getCatalogProductIndex(); $productGridPage->open(); $gridBlock = $productGridPage->getProductGrid(); - $this->assertTrue($gridBlock->isRowVisible(['sku' => $product->getProductSku()])); + $this->assertTrue($gridBlock->isRowVisible(['sku' => $product->getSku()])); } /** diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/BundleFixedTest.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/BundleFixedTest.php index 11796d0e4996e4a2ab8b4c2d57dc9f6b763cacde..26025de223c91d60e1843beb668d946339b96e12 100755 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/BundleFixedTest.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/BundleFixedTest.php @@ -66,12 +66,12 @@ class BundleFixedTest extends Functional $productForm->fill($bundle, null, $category); $createProductPage->getFormPageActions()->save(); //Verification - $createProductPage->getMessagesBlock()->assertSuccessMessage(); + $createProductPage->getMessagesBlock()->waitSuccessMessage(); // Flush cache $cachePage = Factory::getPageFactory()->getAdminCache(); $cachePage->open(); $cachePage->getActionsBlock()->flushMagentoCache(); - $cachePage->getMessagesBlock()->assertSuccessMessage(); + $cachePage->getMessagesBlock()->waitSuccessMessage(); //Verification $this->assertOnGrid($bundle); $this->assertOnCategory($bundle); @@ -88,7 +88,7 @@ class BundleFixedTest extends Functional $productGridPage = Factory::getPageFactory()->getCatalogProductIndex(); $productGridPage->open(); $gridBlock = $productGridPage->getProductGrid(); - $this->assertTrue($gridBlock->isRowVisible(['sku' => $product->getProductSku()])); + $this->assertTrue($gridBlock->isRowVisible(['sku' => $product->getSku()])); } /** diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/EditBundleTest.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/EditBundleTest.php index bd41afca571e58549d4cc80c7ce71d531fef2734..c6b5eb6d960c7fbb1949de6683de78f64efd80b1 100755 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/EditBundleTest.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/EditBundleTest.php @@ -73,13 +73,13 @@ class EditBundleTest extends Functional $productGridPage->open(); $gridBlock->searchAndOpen([ - 'sku' => $product->getProductSku(), + 'sku' => $product->getSku(), 'type' => 'Bundle Product' ]); $productForm->fill($editProduct); $editProductPage->getFormPageActions()->save(); //Verifying - $editProductPage->getMessagesBlock()->assertSuccessMessage(); + $editProductPage->getMessagesBlock()->waitSuccessMessage(); // Flush cache $cachePage->open(); $cachePage->getActionsBlock()->flushMagentoCache(); @@ -112,7 +112,7 @@ class EditBundleTest extends Functional $productGridPage = Factory::getPageFactory()->getCatalogProductIndex(); $productGridPage->open(); $gridBlock = $productGridPage->getProductGrid(); - $this->assertTrue($gridBlock->isRowVisible(['sku' => $product->getProductSku()])); + $this->assertTrue($gridBlock->isRowVisible(['sku' => $product->getSku()])); } /** diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/ProductForm.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/ProductForm.xml index e54210bf60065f98c811d3c7ff8b14b4abbefee8..3c5c315ec91f6b13cfb6c3b1b395bc313754d53f 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/ProductForm.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/ProductForm.xml @@ -64,6 +64,15 @@ <description /> </fields> </product-details> + <search-engine-optimization> + <class>\Magento\Backend\Test\Block\Widget\Tab</class> + <selector>#product_info_tabs_search-engine-optimization</selector> + <strategy>css selector</strategy> + <wrapper>product</wrapper> + <fields> + <url_key/> + </fields> + </search-engine-optimization> <websites> <class>\Magento\Backend\Test\Block\Widget\Tab</class> <selector>#product_info_tabs_websites</selector> @@ -137,7 +146,6 @@ <is_returnable> <input>select</input> </is_returnable> - <url_key/> <gift_message_available> <input>select</input> </gift_message_available> diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductIsNotDisplayingOnFrontend.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductIsNotDisplayingOnFrontend.php index fab93fbed78322f2b1267a482a32e52338a2e76e..a7e92102079adbc7d65c722e0eb4bb76daa9e035 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductIsNotDisplayingOnFrontend.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductIsNotDisplayingOnFrontend.php @@ -168,7 +168,7 @@ class AssertProductIsNotDisplayingOnFrontend extends AbstractConstraint } if ($isProductVisible) { - $errors[] = '- product with name "{$product->getName()}" is found in this category.'; + $errors[] = "- product with name '{$product->getName()}' is found in this category."; } return $errors; diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/AssignProducts.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/AssignProducts.php index fdc3c604ce6ee641f0be781cc8997effa0e44f4d..51fb6832a78df48ca683f181d9ae4608b0d361bc 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/AssignProducts.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/AssignProducts.php @@ -40,9 +40,9 @@ class AssignProducts extends Product { parent::__construct($configuration, $placeholders); - $this->_placeholders[$this->assignType . '_simple::getProductSku'] = array($this, 'productProvider'); + $this->_placeholders[$this->assignType . '_simple::getSku'] = array($this, 'productProvider'); $this->_placeholders[$this->assignType . '_simple::getName'] = array($this, 'productProvider'); - $this->_placeholders[$this->assignType . '_configurable::getProductSku'] = array($this, 'productProvider'); + $this->_placeholders[$this->assignType . '_configurable::getSku'] = array($this, 'productProvider'); $this->_placeholders[$this->assignType . '_configurable::getName'] = array($this, 'productProvider'); } @@ -61,11 +61,11 @@ class AssignProducts extends Product $this->assignType . '_products' => array( 'value' => array( 'product_1' => array( - 'sku' => '%' . $this->assignType . '_simple::getProductSku%', + 'sku' => '%' . $this->assignType . '_simple::getSku%', 'name' => '%' . $this->assignType . '_simple::getName%' ), 'product_2' => array( - 'sku' => '%' . $this->assignType . '_configurable::getProductSku%', + 'sku' => '%' . $this->assignType . '_configurable::getSku%', 'name' => '%' . $this->assignType . '_configurable::getName%' ) ), diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Cart/Item.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Cart/Item.php index ea2967a46fa1849ad77924f2cc345bfd4d81908e..01d262eb1004dcee47be14368e117d350e124c8d 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Cart/Item.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Cart/Item.php @@ -77,9 +77,9 @@ class Item implements FixtureInterface $cartItem['options'] = isset($cartItem['options']) ? $cartItem['options'] + $checkoutCustomOptions : $checkoutCustomOptions; - $cartItem['qty'] = isset($checkoutData['options']['qty']) - ? $checkoutData['options']['qty'] - : 1; + if (isset($checkoutData['options']['qty'])) { + $cartItem['qty'] = $checkoutData['options']['qty']; + } $this->data = $cartItem; } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.php index 3588eb403a55c88f93ce198c8b57e10b33e6865c..1a0b79f2d3f0a3521c55bd70c7c158e3986385fc 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.php @@ -496,7 +496,7 @@ class CatalogProductSimple extends InjectableFixture 'is_required' => '0', 'default_value' => '', 'input' => 'text', - 'group' => 'autosettings', + 'group' => 'search-engine-optimization', ]; protected $url_path = [ diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.xml index 395b2745e59f3eee11a610051ae0ea1b66eb1193..bafc13ce22afc7b3869a79445912da8a2435f92f 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.xml @@ -386,7 +386,7 @@ <is_required>0</is_required> <default_value></default_value> <input>text</input> - <group>autosettings</group> + <group>search-engine-optimization</group> </url_key> <url_path> <attribute_code>url_path</attribute_code> diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CheckoutData.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CheckoutData.php index 9fc2f4132795d0bfd9f0e61bf33cebd02013c68b..1e754e93ff4fdccf77bc7b54145724d4ee83d471 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CheckoutData.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CheckoutData.php @@ -182,8 +182,13 @@ class CheckoutData implements FixtureInterface ] ], 'order_big_qty' => [ - 'options' => [ - 'qty' => 2 + 'qty' => 900 + ], + 'order_custom_price' => [ + 'checkout_data' => [ + 'qty' => 3, + 'use_custom_price' => "Yes", + 'custom_price' => 100, ], 'cartItem' => [] ] diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual.php index 02a73c9f117b1dbe68f5218ad53aad2370f36309..a627caf18e3181491bfdc04b430a74f5caacfb8a 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual.php @@ -515,7 +515,7 @@ class CatalogProductVirtual extends InjectableFixture 'is_required' => '0', 'default_value' => '', 'input' => 'text', - 'group' => 'autosettings', + 'group' => 'search-engine-optimization', ]; protected $url_path = [ diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual/CheckoutData.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual/CheckoutData.php index 065ca948351e9662746cf12e01c94baa0dccb9e5..89095fbc193f1357c7bd5f5de1ff7b45eafba3e5 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual/CheckoutData.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual/CheckoutData.php @@ -54,6 +54,13 @@ class CheckoutData extends \Magento\Catalog\Test\Fixture\CatalogProductSimple\Ch 'subtotal' => 50 ] ], + 'order_custom_price' => [ + 'checkout_data' => [ + 'qty' => 3, + 'use_custom_price' => "Yes", + 'custom_price' => 100, + ], + ] ]; return isset($presets[$name]) ? $presets[$name] : null; } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CrosssellProducts.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CrosssellProducts.php index 94d0b6b3cafc785566641b5f40a25b82203494c5..5e1ffb8b8b147a27cc8138a04076a13e4b899b08 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CrosssellProducts.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CrosssellProducts.php @@ -39,25 +39,25 @@ class CrosssellProducts extends AssignProducts /** * @var array */ - protected $_products = array(); + protected $_products = []; /** * Init Data */ protected function _initData() { - $this->_dataConfig = array( + $this->_dataConfig = [ 'assignType ' => $this->assignType, - ); + ]; /** @var $type Related|Upsell */ $type = 'Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab\\' . ucfirst(strtolower($this->assignType)); - $productsArray = array(); + $productsArray = []; foreach ($this->_products as $key => $product) { /** @var $product \Magento\Catalog\Test\Fixture\Product */ - $productsArray['product_' . $key] = array( - 'sku' => $product->getProductSku(), + $productsArray['product_' . $key] = [ + 'sku' => $product->getSku(), 'name' => $product->getName() - ); + ]; } $this->_data['fields'][$this->assignType . '_products']['value'] = $productsArray; $this->_data['fields'][$this->assignType . '_products']['group'] = $type::GROUP; diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product.php index 511551329a9200156ddabb2c2a1decc53d8dc165..b1a79bc26f64dbcc50c83f87e9890be914842ddc 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product.php @@ -245,7 +245,7 @@ class Product extends DataFixture * * @return string */ - public function getProductSku() + public function getSku() { return $this->getData('fields/sku/value'); } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php index b50bb378285d9dc85df40ae841cfda075146b6bf..09b71b1168cb44aab1561907705af846c6449ac3 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php @@ -145,7 +145,7 @@ class Curl extends AbstractCurl implements CatalogProductSimpleInterface $prefix = isset($config['input_prefix']) ? $config['input_prefix'] : null; $data = $this->prepareData($fixture, $prefix); - return ['id' => $this->createProduct($data, $config)]; + return $this->createProduct($data, $config); } /** @@ -342,7 +342,7 @@ class Curl extends AbstractCurl implements CatalogProductSimpleInterface * * @param array $data * @param array $config - * @return int|null + * @return array * @throws \Exception */ protected function createProduct(array $data, array $config) @@ -359,7 +359,7 @@ class Curl extends AbstractCurl implements CatalogProductSimpleInterface } preg_match("~Location: [^\s]*\/id\/(\d+)~", $response, $matches); - return isset($matches[1]) ? $matches[1] : null; + return ['id' => isset($matches[1]) ? $matches[1] : null]; } /** diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Ui.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Ui.php index 386e930188124c081b516e28c997ed0eb8b48762..08d1ca7fcd37989e72f3aa5a6d4bd3c331b5b7c0 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Ui.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Ui.php @@ -52,6 +52,6 @@ class Ui extends AbstractUi implements CatalogProductSimpleInterface $createProductPage->getProductForm()->fill($fixture); $createProductPage->getFormPageActions()->save(); - $createProductPage->getMessagesBlock()->assertSuccessMessage(); + $createProductPage->getMessagesBlock()->waitSuccessMessage(); } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Ui/CreateProduct.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Ui/CreateProduct.php index 1552bdb046f15d7981a1eb21bf1f61a43f13f1f8..50741b1855277ab2a681d150bd36038647654c74 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Ui/CreateProduct.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Ui/CreateProduct.php @@ -52,6 +52,6 @@ class CreateProduct extends Ui $createProductPage->getProductForm()->fill($fixture); $createProductPage->getFormPageActions()->save(); - $createProductPage->getMessagesBlock()->assertSuccessMessage(); + $createProductPage->getMessagesBlock()->waitSuccessMessage(); } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple.php index b6b51204c0022cd64d68113a7404508c2820a776..f42af6bc00447ecae18ddeab1aaeef430079cebf 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple.php @@ -75,6 +75,22 @@ class CatalogProductSimple extends AbstractRepository 'checkout_data' => ['preset' => 'order_big_qty'], ]; + $this->_data['simple_for_sales'] = [ + 'attribute_set_id' => ['dataSet' => 'default'], + 'name' => 'Simple Product %isolation%', + 'sku' => 'sku_simple_product_%isolation%', + 'weight' => 1, + 'quantity_and_stock_status' => [ + 'qty' => 25.0000, + 'is_in_stock' => 'In Stock', + ], + 'price' => ['value' => 560.00, 'preset' => '-'], + 'tax_class_id' => ['dataSet' => 'Taxable Goods'], + 'website_ids' => ['Main Website'], + 'visibility' => 'Catalog, Search', + 'checkout_data' => ['preset' => 'order_custom_price'], + ]; + $this->_data['100_dollar_product'] = [ 'sku' => '100_dollar_product%isolation%', 'name' => '100_dollar_product%isolation%', diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductVirtual.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductVirtual.php index 4727bf50ba9d5782ccfcdca9fd982ac1542e868a..9e28fdc45fed7b395e1e2b624a4118b761f797cf 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductVirtual.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductVirtual.php @@ -60,6 +60,42 @@ class CatalogProductVirtual extends AbstractRepository 'checkout_data' => ['preset' => 'order_default'], ]; + $this->_data['virtual_big_qty'] = [ + 'tax_class_id' => ['dataSet' => 'Taxable Goods'], + 'status' => 'Product online', + 'website_ids' => ['Main Website'], + 'is_virtual' => 'Yes', + 'url_key' => 'virtual-product%isolation%', + 'visibility' => 'Catalog, Search', + 'attribute_set_id' => ['dataSet' => 'default'], + 'name' => 'Virtual product %isolation%', + 'sku' => 'sku_virtual_product_%isolation%', + 'quantity_and_stock_status' => [ + 'qty' => 1000.0000, + 'is_in_stock' => 'In Stock', + ], + 'price' => ['value' => 10.00, 'preset' => '-'], + 'checkout_data' => ['preset' => 'order_big_qty'], + ]; + + $this->_data['virtual_for_sales'] = [ + 'tax_class_id' => ['dataSet' => 'Taxable Goods'], + 'status' => 'Product online', + 'website_ids' => ['Main Website'], + 'is_virtual' => 'Yes', + 'url_key' => 'virtual-product%isolation%', + 'visibility' => 'Catalog, Search', + 'attribute_set_id' => ['dataSet' => 'default'], + 'name' => 'Virtual product %isolation%', + 'sku' => 'sku_virtual_product_%isolation%', + 'quantity_and_stock_status' => [ + 'qty' => 666.0000, + 'is_in_stock' => 'In Stock', + ], + 'price' => ['value' => 10.00, 'preset' => '-'], + 'checkout_data' => ['preset' => 'order_custom_price'], + ]; + $this->_data['50_dollar_product'] = [ 'name' => '50_dollar_product %isolation%', 'sku' => '50_dollar_product_%isolation%', diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/AssignProductTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/AssignProductTest.php index 5b91970cf3e5c4d9a28b20e34097c078f93b1a38..cca1d8567c9a2d9594042bc0a7bdb3aeab938907 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/AssignProductTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/AssignProductTest.php @@ -68,15 +68,15 @@ class AssignProductTest extends Functional $products = [$simple, $configurable, $bundle]; /** @var Product $product */ foreach ($products as $product) { - $categoryProductsGrid->searchAndSelect(['sku' => $product->getProductSku()]); + $categoryProductsGrid->searchAndSelect(['sku' => $product->getSku()]); } $actionsBlock->save(); - $messagesBlock->assertSuccessMessage(); + $messagesBlock->waitSuccessMessage(); //Clean Cache $cachePage = Factory::getPageFactory()->getAdminCache(); $cachePage->open(); $cachePage->getActionsBlock()->flushMagentoCache(); - $cachePage->getMessagesBlock()->assertSuccessMessage(); + $cachePage->getMessagesBlock()->waitSuccessMessage(); //Verifying $this->assertProductsOnCategory($category, $products); } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/CreateTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/CreateTest.php index 9592b70c86b127d0e9ecf84084d5258b4582cc05..6ceb5c581859a9437b734dad0ffb7552a2de18da 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/CreateTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/CreateTest.php @@ -60,12 +60,12 @@ class CreateTest extends Functional $formBlock->fill($category); $actionsBlock->save(); //Verifying - $messagesBlock->assertSuccessMessage(); + $messagesBlock->waitSuccessMessage(); //Flush cache $cachePage = Factory::getPageFactory()->getAdminCache(); $cachePage->open(); $cachePage->getActionsBlock()->flushMagentoCache(); - $cachePage->getMessagesBlock()->assertSuccessMessage(); + $cachePage->getMessagesBlock()->waitSuccessMessage(); //Verifying $this->assertCategoryOnFrontend($category); } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateProductTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateProductTest.php index cec15ea5a64218035be702cd2a589421ae3639f7..51a5cd8a1718724b47df5453b2c92724b20ac180 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateProductTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateProductTest.php @@ -61,12 +61,12 @@ class CreateProductTest extends Functional $createProductPage->open(['type' => 'simple', 'set' => 4]); $productForm->fill($product); $createProductPage->getFormPageActions()->save(); - $createProductPage->getMessagesBlock()->assertSuccessMessage(); + $createProductPage->getMessagesBlock()->waitSuccessMessage(); //Flush cache $cachePage = Factory::getPageFactory()->getAdminCache(); $cachePage->open(); $cachePage->getActionsBlock()->flushMagentoCache(); - $cachePage->getMessagesBlock()->assertSuccessMessage(); + $cachePage->getMessagesBlock()->waitSuccessMessage(); //Verifying $this->assertOnGrid($product); $this->assertOnCategory($product); @@ -83,7 +83,7 @@ class CreateProductTest extends Functional $productGridPage = Factory::getPageFactory()->getCatalogProductIndex(); $productGridPage->open(); $gridBlock = $productGridPage->getProductGrid(); - $this->assertTrue($gridBlock->isRowVisible(['sku' => $product->getProductSku()])); + $this->assertTrue($gridBlock->isRowVisible(['sku' => $product->getSku()])); } /** diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleWithCategoryTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleWithCategoryTest.php index 46941390782dd5393f9ce817fa7082524be3dd7b..07aef9e7e1c6f50d90517d03c2c941f4f997492b 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleWithCategoryTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleWithCategoryTest.php @@ -75,7 +75,7 @@ class CreateSimpleWithCategoryTest extends Functional $cachePage = Factory::getPageFactory()->getAdminCache(); $cachePage->open(); $cachePage->getActionsBlock()->flushMagentoCache(); - $cachePage->getMessagesBlock()->assertSuccessMessage(); + $cachePage->getMessagesBlock()->waitSuccessMessage(); //Verifying $this->assertProductOnFrontend($product); } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleWithCustomOptionsAndCategoryTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleWithCustomOptionsAndCategoryTest.php index 3a5ff5ba818be6c290ed346b82ddef2e6ac1a632..ca11077153ae3823d2afea13d06963fd8f0727fb 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleWithCustomOptionsAndCategoryTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleWithCustomOptionsAndCategoryTest.php @@ -66,7 +66,7 @@ class CreateSimpleWithCustomOptionsAndCategoryTest extends Functional $productForm->fill($product, null, $category); $createProductPage->getFormPageActions()->save(); //Verifying - $createProductPage->getMessagesBlock()->assertSuccessMessage(); + $createProductPage->getMessagesBlock()->waitSuccessMessage(); // Flush cache $cachePage = Factory::getPageFactory()->getAdminCache(); $cachePage->open(); @@ -88,7 +88,7 @@ class CreateSimpleWithCustomOptionsAndCategoryTest extends Functional $productGridPage->open(); /** @var \Magento\Catalog\Test\Block\Adminhtml\Product\Grid $gridBlock */ $gridBlock = $productGridPage->getProductGrid(); - $this->assertTrue($gridBlock->isRowVisible(['sku' => $product->getProductSku()])); + $this->assertTrue($gridBlock->isRowVisible(['sku' => $product->getSku()])); } /** diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateTest.php index 8201bf4935bbf5b1678da50f700d037ef2f8e1e2..5a4de0f34e91ade0e41a763280960a7a6a4b51ce 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateTest.php @@ -65,12 +65,12 @@ class CreateTest extends Functional $productForm->fill($product); $createProductPage->getFormPageActions()->save(); //Verifying - $createProductPage->getMessagesBlock()->assertSuccessMessage(); + $createProductPage->getMessagesBlock()->waitSuccessMessage(); //Flush cache $cachePage = Factory::getPageFactory()->getAdminCache(); $cachePage->open(); $cachePage->getActionsBlock()->flushMagentoCache(); - $cachePage->getMessagesBlock()->assertSuccessMessage(); + $cachePage->getMessagesBlock()->waitSuccessMessage(); //Verifying $this->assertOnGrid($product); $this->assertOnCategory($product); @@ -88,7 +88,7 @@ class CreateTest extends Functional $productGridPage->open(); /** @var \Magento\Catalog\Test\Block\Adminhtml\Product\Grid $gridBlock */ $gridBlock = $productGridPage->getProductGrid(); - $this->assertTrue($gridBlock->isRowVisible(['sku' => $product->getProductSku()])); + $this->assertTrue($gridBlock->isRowVisible(['sku' => $product->getSku()])); } /** diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualTest.php index 49e46187a420fe9636619daccca1a4291e924433..c66f161a33943635b9fe7e0e9074603ba6b47d51 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualTest.php @@ -62,12 +62,12 @@ class CreateVirtualTest extends Functional $productForm->fill($product); $createProductPage->getFormPageActions()->save(); //Verifying - $createProductPage->getMessagesBlock()->assertSuccessMessage(); + $createProductPage->getMessagesBlock()->waitSuccessMessage(); //Flush cache $cachePage = Factory::getPageFactory()->getAdminCache(); $cachePage->open(); $cachePage->getActionsBlock()->flushMagentoCache(); - $cachePage->getMessagesBlock()->assertSuccessMessage(); + $cachePage->getMessagesBlock()->waitSuccessMessage(); //Verifying $this->assertOnGrid($product); $this->assertOnCategory($product); @@ -85,7 +85,7 @@ class CreateVirtualTest extends Functional $productGridPage->open(); /** @var \Magento\Catalog\Test\Block\Adminhtml\Product\Grid $gridBlock */ $gridBlock = $productGridPage->getProductGrid(); - $this->assertTrue($gridBlock->isRowVisible(['sku' => $product->getProductSku()])); + $this->assertTrue($gridBlock->isRowVisible(['sku' => $product->getSku()])); } /** diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/EditSimpleProductTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/EditSimpleProductTest.php index edcfd32bd1a77eadee14dfaf40a12197d8350ebf..5b54b2321f3823a9ae94875d10704d3f52b5a0da 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/EditSimpleProductTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/EditSimpleProductTest.php @@ -65,11 +65,11 @@ class EditSimpleProductTest extends Functional $cachePage = Factory::getPageFactory()->getAdminCache(); $productGridPage->open(); - $gridBlock->searchAndOpen(['sku' => $product->getProductSku(), 'type' => 'Simple Product']); + $gridBlock->searchAndOpen(['sku' => $product->getSku(), 'type' => 'Simple Product']); $productForm->fill($editProduct); $editProductPage->getFormPageActions()->save(); //Verifying - $editProductPage->getMessagesBlock()->assertSuccessMessage(); + $editProductPage->getMessagesBlock()->waitSuccessMessage(); // Flush cache $cachePage->open(); $cachePage->getActionsBlock()->flushMagentoCache(); @@ -90,7 +90,7 @@ class EditSimpleProductTest extends Functional $productGridPage = Factory::getPageFactory()->getCatalogProductIndex(); $productGridPage->open(); $gridBlock = $productGridPage->getProductGrid(); - $this->assertTrue($gridBlock->isRowVisible(['sku' => $product->getProductSku()])); + $this->assertTrue($gridBlock->isRowVisible(['sku' => $product->getSku()])); } /** diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UnassignCategoryTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UnassignCategoryTest.php index 89ad44368f8394ee5ef177081ddb054b12fa5339..bdab3e8df1e8d46c34a5680574a33cfdfe61f4e0 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UnassignCategoryTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UnassignCategoryTest.php @@ -63,12 +63,12 @@ class UnassignCategoryTest extends Functional $productForm->clearCategorySelect(); $editProductPage->getFormPageActions()->save(); //Verifying - $editProductPage->getMessagesBlock()->assertSuccessMessage(); + $editProductPage->getMessagesBlock()->waitSuccessMessage(); //Flush cache $cachePage = Factory::getPageFactory()->getAdminCache(); $cachePage->open(); $cachePage->getActionsBlock()->flushMagentoCache(); - $cachePage->getMessagesBlock()->assertSuccessMessage(); + $cachePage->getMessagesBlock()->waitSuccessMessage(); //Verifying $this->assertAbsenceOnCategory($simple); } diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchEntityTest.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchEntityTest.php index f4aacf5f36800f86a0352efa536e62bec39337fa..5e2861cf2fce68f73291390dc986d53f896eb162 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchEntityTest.php @@ -96,7 +96,6 @@ class AdvancedSearchEntityTest extends Injectable CmsIndex $cmsIndex, AdvancedSearch $searchPage ) { - $this->markTestIncomplete('MAGETWO-27664'); $cmsIndex->open(); $cmsIndex->getSearchBlock()->clickAdvancedSearchButton(); $searchForm = $searchPage->getForm(); diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchTest.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchTest.php index b91c88f1ed0c90737d0c4df0b714a69ae54fc419..a4d279831fbee310bfa165fe5814b72c8b643f52 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchTest.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchTest.php @@ -40,7 +40,6 @@ class AdvancedSearchTest extends Functional */ public function testProductSearch() { - $this->markTestIncomplete('MAGETWO-27664'); //Data $productFixture = Factory::getFixtureFactory()->getMagentoCatalogSimpleProduct(); $productFixture->switchData('simple'); diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsBlock/Curl.php b/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsBlock/Curl.php index 54bb378e9ac1f2681d1058edadea9c1b13a91e5c..63acc851a480f11d8ad3c835f91856ea2f77010c 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsBlock/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsBlock/Curl.php @@ -28,7 +28,6 @@ use Mtf\System\Config; use Mtf\Fixture\FixtureInterface; use Mtf\Util\Protocol\CurlInterface; use Mtf\Util\Protocol\CurlTransport; -use Magento\Backend\Test\Handler\Extractor; use Mtf\Util\Protocol\CurlTransport\BackendDecorator; use Mtf\Handler\Curl as AbstractCurl; @@ -43,7 +42,7 @@ class Curl extends AbstractCurl implements CmsBlockInterface * * @var string */ - protected $saveUrl = 'cms/block/save'; + protected $saveUrl = 'cms/block/save/back/edit'; /** * Mapping values for data @@ -85,11 +84,10 @@ class Curl extends AbstractCurl implements CmsBlockInterface throw new \Exception("CMS Block entity creating by curl handler was not successful! Response: $response"); } - $url = 'cms/block/index/sort/creation_time/dir/desc'; - $regExpPattern = '@^.*block_id\/(\d+)\/.*' . $fixture->getTitle() . '@ms'; - $extractor = new Extractor($url, $regExpPattern); + preg_match("`block_id\/(\d*?)\/`", $response, $matches); + $id = isset($matches[1]) ? $matches[1] : null; - return ['block_id' => $extractor->getData()[1]]; + return ['block_id' => $id]; } /** diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsPage/Curl.php b/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsPage/Curl.php index 24505b7d5c72680f7d27f4ed701d6d377e593b28..91e04bf84419c980f8ef265673a055853bb06a0d 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsPage/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsPage/Curl.php @@ -67,7 +67,7 @@ class Curl extends Conditions implements CmsPageInterface * * @var string */ - protected $url = 'cms/page/save/back/edit/active_tab/content_section/'; + protected $url = 'admin/cms_page/save/back/edit/active_tab/main_section/'; /** * Post request for creating a cms page diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable/ConfigurableAttributesData.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable/ConfigurableAttributesData.php index 7fdf2610f350324d590f8068f08ad533cb1c1873..c38fe3940cacb5a18e05c857564766fb03492afd 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable/ConfigurableAttributesData.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable/ConfigurableAttributesData.php @@ -690,6 +690,7 @@ class ConfigurableAttributesData implements FixtureInterface foreach ($attribute['options'] as $optionKey => $option) { $compositeKey = "{$attributeKey}:{$optionKey}"; $optionId = $this->getAttributeOptionId($compositeKey); + $optionId = ($optionId !== null) ? $optionId : $rowKey . $optionKey; $row['name'] .= '-' . $optionId; $row['sku'] .= '_' . $optionId; diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/AddConfigurableProductToCartFromCustomerWishlistOnFrontendTest/test.csv b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/AddConfigurableProductToCartFromCustomerWishlistOnFrontendTest/test.csv deleted file mode 100644 index 36bcde341f1c85687573501fd9b2d8af42665ccc..0000000000000000000000000000000000000000 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/AddConfigurableProductToCartFromCustomerWishlistOnFrontendTest/test.csv +++ /dev/null @@ -1,2 +0,0 @@ -"products";"qty";"constraint" -"configurableProductInjectable::default";"3";"assertProductQtyInShoppingCart, assertProductsIsAbsentInWishlist" diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableProductEntityTest/test.csv b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableProductEntityTest/test.csv index 9e539ae215302b69ad6a6e33ba6d6ef21cdfd232..86da61ac30da5b8cfa8baa8f60b6708f85e2c6ac 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableProductEntityTest/test.csv +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableProductEntityTest/test.csv @@ -1,5 +1,5 @@ "product/data/configurable_attributes_data/preset";"product/data/checkout_data/preset";"product/data/name";"product/data/sku";"product/data/tax_class_id";"product/data/price/value";"product/data/special_price";"product/data/category_ids/presets";"product/data/short_description";"product/data/description";"product/data/weight";"product/data/quantity_and_stock_status/is_in_stock";"product/data/affected_attribute_set";"constraint";"issue" -"two_new_options";"two_new_options";"Configurable Product %isolation%";"configurable_sku_%isolation%";"-";"100";"-";"default_subcategory";"Configurable short description";"Configurable Product description %isolation%";"2";"In Stock";"custom_attribute_set_%isolation%";"assertProductSaveMessage, assertProductInGrid, assertChildProductsInGrid, assertConfigurableProductForm, assertProductInCategory, assertConfigurableProductPage, assertProductInStock, assertConfigurableProductInCart, assertChildProductIsNotDisplayedSeparately";"Bug: MAGETWO-28347" +"two_new_options";"two_new_options";"Configurable Product %isolation%";"configurable_sku_%isolation%";"-";"100";"-";"default_subcategory";"Configurable short description";"Configurable Product description %isolation%";"2";"In Stock";"custom_attribute_set_%isolation%";"assertProductSaveMessage, assertProductInGrid, assertChildProductsInGrid, assertConfigurableProductForm, assertProductInCategory, assertConfigurableProductPage, assertProductInStock, assertConfigurableProductInCart, assertChildProductIsNotDisplayedSeparately";"" "two_options";"two_options";"Configurable Product %isolation%";"configurable_sku_%isolation%";"-";"100";"-";"-";"Configurable short description";"Configurable Product description %isolation%";"2";"-";"custom_attribute_set_%isolation%";"assertProductSaveMessage, assertProductInGrid, assertChildProductsInGrid, assertConfigurableProductForm, assertConfigurableProductPage, assertProductInStock, assertConfigurableProductInCart";"" -"two_new_options";"two_new_options_with_special_price";"Configurable Product %isolation%";"configurable_sku_%isolation%";"-";"100";"10";"-";"Configurable short description";"Configurable Product description %isolation%";"2";"In Stock";"custom_attribute_set_%isolation%";"assertProductSaveMessage, assertProductInGrid, assertChildProductsInGrid, assertConfigurableProductForm, assertConfigurableProductPage, assertProductInStock, assertConfigurableProductInCart, assertProductSpecialPriceOnProductPage";"Bug: MAGETWO-28347" +"two_new_options";"two_new_options_with_special_price";"Configurable Product %isolation%";"configurable_sku_%isolation%";"-";"100";"10";"-";"Configurable short description";"Configurable Product description %isolation%";"2";"In Stock";"custom_attribute_set_%isolation%";"assertProductSaveMessage, assertProductInGrid, assertChildProductsInGrid, assertConfigurableProductForm, assertConfigurableProductPage, assertProductInStock, assertConfigurableProductInCart, assertProductSpecialPriceOnProductPage";"" "two_options_with_assigned_product";"two_options_with_assigned_product";"Configurable Product %isolation%";"configurable_sku_%isolation%";"-";"100";"-";"-";"Configurable short description";"Configurable Product description %isolation%";"2";"In Stock";"custom_attribute_set_%isolation%";"assertProductSaveMessage, assertProductInGrid, assertConfigurableProductForm, assertConfigurableProductPage, assertProductInStock, assertConfigurableProductInCart";"" diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableTest.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableTest.php index a260c58e4c1fba91fba187c99615ad900644e306..871319c6d014c087f5551fa315aa372343e7a4f3 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableTest.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableTest.php @@ -54,12 +54,12 @@ class CreateConfigurableTest extends Functional $createProductPage->getProductForm()->fill($product); $createProductPage->getFormPageActions()->save($product); //Verifying - $createProductPage->getMessagesBlock()->assertSuccessMessage(); + $createProductPage->getMessagesBlock()->waitSuccessMessage(); //Flush cache $cachePage = Factory::getPageFactory()->getAdminCache(); $cachePage->open(); $cachePage->getActionsBlock()->flushMagentoCache(); - $cachePage->getMessagesBlock()->assertSuccessMessage(); + $cachePage->getMessagesBlock()->waitSuccessMessage(); //Verifying $this->assertOnGrid($product); $this->assertOnFrontend($product); @@ -75,7 +75,7 @@ class CreateConfigurableTest extends Functional { //Search data $configurableSearch = [ - 'sku' => $product->getProductSku(), + 'sku' => $product->getSku(), 'type' => 'Configurable Product' ]; $variationSkus = $product->getVariationSkus(); diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateWithAttributeTest.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateWithAttributeTest.php index a89e555204a8c23d9d25418ef8822b442ed48393..8e9e0aa3fdc7d5f5529b116394afd53715f21121 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateWithAttributeTest.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateWithAttributeTest.php @@ -166,7 +166,7 @@ class CreateWithAttributeTest extends Functional protected function assertOnGrid(Product $product) { $configurableSearch = [ - 'sku' => $product->getProductSku(), + 'sku' => $product->getSku(), 'type' => 'Configurable Product', ]; $productGridPage = Factory::getPageFactory()->getCatalogProductIndex(); diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/EditConfigurableTest.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/EditConfigurableTest.php index a63df3a08ee26c133671012685540293d71ccd43..6c40208db9a0e476ef5d3d1e4d4c98d95394c672 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/EditConfigurableTest.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/EditConfigurableTest.php @@ -45,7 +45,7 @@ class EditConfigurableTest extends CreateConfigurableTest $configurable = Factory::getFixtureFactory()->getMagentoConfigurableProductConfigurableProduct(); $configurable->switchData('configurable'); $configurable->persist(); - $productSku = $configurable->getProductSku(); + $productSku = $configurable->getSku(); //Preparing Data for editing product $editProduct = $configurable->getEditData(); @@ -62,7 +62,7 @@ class EditConfigurableTest extends CreateConfigurableTest $productForm->fill($editProduct); $createProductPage->getFormPageActions()->save(); //Verifying - $createProductPage->getMessagesBlock()->assertSuccessMessage(); + $createProductPage->getMessagesBlock()->waitSuccessMessage(); //Flush cache $cachePage = Factory::getPageFactory()->getAdminCache(); $cachePage->open(); diff --git a/dev/tests/functional/tests/app/Magento/Core/Test/Block/Messages.php b/dev/tests/functional/tests/app/Magento/Core/Test/Block/Messages.php index 272bc300d5a0d7cc4f6b9160d7c2e78824dfdc75..ebd84bab9fb80de0a46a01b24eb43d5017fbbac9 100644 --- a/dev/tests/functional/tests/app/Magento/Core/Test/Block/Messages.php +++ b/dev/tests/functional/tests/app/Magento/Core/Test/Block/Messages.php @@ -69,11 +69,11 @@ class Messages extends Block protected $warningMessage = '[data-ui-id$=message-warning]'; /** - * Check for success message + * Wait for success message * * @return bool */ - public function assertSuccessMessage() + public function waitSuccessMessage() { return $this->waitForElementVisible($this->successMessage, Locator::SELECTOR_CSS); } diff --git a/dev/tests/functional/tests/app/Magento/Core/Test/TestCase/UpdateCustomVariableEntityTest.php b/dev/tests/functional/tests/app/Magento/Core/Test/TestCase/UpdateCustomVariableEntityTest.php index 31841881598a49ce2806f7b86d5ceb94df9b402d..419b4040d6bc68722c7b80b4b19d16e3337fc699 100644 --- a/dev/tests/functional/tests/app/Magento/Core/Test/TestCase/UpdateCustomVariableEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Core/Test/TestCase/UpdateCustomVariableEntityTest.php @@ -26,6 +26,7 @@ namespace Magento\Core\Test\TestCase; use Mtf\ObjectManager; use Mtf\TestCase\Injectable; +use Mtf\Fixture\FixtureFactory; use Magento\Store\Test\Fixture\Store; use Magento\Core\Test\Fixture\SystemVariable; use Magento\Core\Test\Page\Adminhtml\SystemVariableNew; @@ -79,11 +80,13 @@ class UpdateCustomVariableEntityTest extends Injectable /** * Prepare data * - * @param Store $storeOrigin + * @param FixtureFactory $factory * @return array */ - public function __prepare(Store $storeOrigin) + public function __prepare(FixtureFactory $factory) { + /** @var Store $storeOrigin */ + $storeOrigin = $factory->createByCode('store', ['dataSet' => 'custom']); $storeOrigin->persist(); self::$storeName = $storeOrigin->getName(); @@ -126,9 +129,7 @@ class UpdateCustomVariableEntityTest extends Injectable Store $storeOrigin, $saveAction ) { - $filter = [ - 'code' => $customVariableOrigin->getCode(), - ]; + $filter = ['code' => $customVariableOrigin->getCode()]; // Steps $this->systemVariableIndexPage->open(); diff --git a/dev/tests/functional/tests/app/Magento/Core/Test/TestStep/SetupConfigurationStep.php b/dev/tests/functional/tests/app/Magento/Core/Test/TestStep/SetupConfigurationStep.php new file mode 100644 index 0000000000000000000000000000000000000000..3885d317fb5a4fe3da722b1c9c8d9009c09a5433 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Core/Test/TestStep/SetupConfigurationStep.php @@ -0,0 +1,82 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Core\Test\TestStep; + +use Mtf\TestStep\TestStepInterface; +use Mtf\Fixture\FixtureFactory; + +/** + * Class SetupConfigurationStep + * Setup configuration using handler + */ +class SetupConfigurationStep implements TestStepInterface +{ + /** + * Factory for Fixtures + * + * @var FixtureFactory + */ + protected $fixtureFactory; + + /** + * Configuration data + * + * @var string + */ + protected $configData; + + /** + * Preparing step properties + * + * @constructor + * @param FixtureFactory $fixtureFactory + * @param string $configData + */ + public function __construct(FixtureFactory $fixtureFactory, $configData) + { + $this->fixtureFactory = $fixtureFactory; + $this->configData = $configData; + } + + /** + * Set config + * + * @return array + */ + public function run() + { + $configData = array_map('trim', explode(',', $this->configData)); + $result = []; + + foreach ($configData as $configDataSet) { + $config = $this->fixtureFactory->createByCode('configData', ['dataSet' => $configDataSet]); + $config->persist(); + + $result[] = $config; + } + + return ['config' => $result]; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/Tab/Addresses.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/Tab/Addresses.php index 9bee1e823f4d2f4624efc3294d6ac154f84bfade..2fa402172fe160e57b910cdf4f41c77e567ff2aa 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/Tab/Addresses.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/Tab/Addresses.php @@ -33,7 +33,6 @@ use Magento\Backend\Test\Block\Widget\Tab; /** * Class Addresses * Customer addresses edit block - * */ class Addresses extends Tab { @@ -90,6 +89,9 @@ class Addresses extends Tab * @param FixtureInterface|FixtureInterface[] $address * @return $this * @throws \Exception + * + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function updateAddresses($address) { @@ -112,7 +114,16 @@ class Addresses extends Tab $this->_fill($this->dataMapping(['country_id' => $countryId])); $this->waitForElementNotVisible($this->loader, Locator::SELECTOR_XPATH); } - $this->fillFormTab($address->getData(), $this->_rootElement); + $defaultAddress = ['default_billing' => 'No', 'default_shipping' => 'No']; + $addressData = $address->getData(); + foreach ($defaultAddress as $key => $value) { + if (isset($addressData[$key])) { + $defaultAddress[$key] = $value; + } + } + $this->_fill($this->dataMapping($defaultAddress)); + + $this->fillFormTab(array_diff($addressData, $defaultAddress), $this->_rootElement); } return $this; @@ -155,6 +166,8 @@ class Addresses extends Tab * @param array|null $fields * @param Element|null $element * @return array + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getDataFormTab($fields = null, Element $element = null) { diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/BackendCustomerCreateTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/BackendCustomerCreateTest.php index ba03767a5bd6a5f6555c9d6372100238d6831db3..b89641190482fbf96f2624585317301ab88b425e 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/BackendCustomerCreateTest.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/BackendCustomerCreateTest.php @@ -59,7 +59,7 @@ class BackendCustomerCreateTest extends Functional $customerPage->getPageActionsBlock()->addNew(); $customerCreatePage->getCustomerForm()->fillCustomer($customerFixture); $customerCreatePage->getPageActionsBlock()->saveAndContinue(); - $customerCreatePage->getMessagesBlock()->assertSuccessMessage(); + $customerCreatePage->getMessagesBlock()->waitSuccessMessage(); //Verifying $customerPage->open(); diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/AddGroupedProductToCartFromCustomerWishlistOnFrontendTest.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Customer/Products/ListProducts.php similarity index 57% rename from dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/AddGroupedProductToCartFromCustomerWishlistOnFrontendTest.php rename to dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Customer/Products/ListProducts.php index 5c48aa0bae3ce6bf09613fd1352b31aba64392b0..2ad161a7fe38efd7fe1ba8fdea2c9322ffd3bd4d 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/AddGroupedProductToCartFromCustomerWishlistOnFrontendTest.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Customer/Products/ListProducts.php @@ -18,34 +18,37 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * + * @spi * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\GroupedProduct\Test\TestCase; +namespace Magento\Downloadable\Test\Block\Customer\Products; -use Magento\Wishlist\Test\TestCase\AddProductsToCartFromCustomerWishlistOnFrontendTest as AddProductsToCartFromWishlist; +use Mtf\Block\Block; +use Mtf\Client\Element\Locator; /** - * Test Creation for Adding Grouped product from Wishlist to Cart - * - * Test Flow: - * - * Preconditions: - * 1. Create customer and login to frontend - * 2. Grouped product is created - * 3. Add grouped product to customer's wishlist - * - * Steps: - * 1. Navigate to My Account -> My Wishlist - * 2. Fill qty and update wish list - * 3. Click "Add to Cart" - * 4. Perform asserts - * - * @group Wishlist_(CS) - * @ZephyrId MAGETWO-25268 + * Class ListProducts + * Downloadable Products block */ -class AddGroupedProductToCartFromCustomerWishlistOnFrontendTest extends AddProductsToCartFromWishlist +class ListProducts extends Block { - // + /** + * Link selector + * + * @var string + */ + protected $link = '//a[contains(text(), "%s")]'; + + /** + * Open Link by title + * + * @param string $linkTitle + * @return void + */ + public function openLink($linkTitle) + { + $this->_rootElement->find(sprintf($this->link, $linkTitle), Locator::SELECTOR_XPATH)->click(); + } } diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable.php index d137958d3de58a9d414ced98cf18e16afbc20984..b6f0fc765ccb350822d88bec2a1de92f0678ed3e 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable.php @@ -24,12 +24,7 @@ namespace Magento\Downloadable\Test\Fixture; -use Mtf\System\Config; -use Mtf\Handler\HandlerFactory; -use Mtf\Fixture\FixtureFactory; use Mtf\Fixture\InjectableFixture; -use Mtf\Repository\RepositoryFactory; -use Mtf\System\Event\EventManagerInterface; /** * Class DownloadableProductInjectable @@ -52,44 +47,6 @@ class DownloadableProductInjectable extends InjectableFixture protected $handlerInterface = 'Magento\Downloadable\Test\Handler\DownloadableProductInjectable\DownloadableProductInjectableInterface'; // @codingStandardsIgnoreEnd - /** - * Constructor - * - * @constructor - * @param Config $configuration - * @param RepositoryFactory $repositoryFactory - * @param FixtureFactory $fixtureFactory - * @param HandlerFactory $handlerFactory - * @param EventManagerInterface $eventManager - * @param array $data - * @param string $dataSet - * @param bool $persist - */ - public function __construct( - Config $configuration, - RepositoryFactory $repositoryFactory, - FixtureFactory $fixtureFactory, - HandlerFactory $handlerFactory, - EventManagerInterface $eventManager, - array $data = [], - $dataSet = '', - $persist = false - ) { - if (!isset($data['url_key']) && isset($data['name'])) { - $data['url_key'] = trim(strtolower(preg_replace('#[^0-9a-z%]+#i', '-', $data['name'])), '-'); - } - parent::__construct( - $configuration, - $repositoryFactory, - $fixtureFactory, - $handlerFactory, - $eventManager, - $data, - $dataSet, - $persist - ); - } - protected $dataConfig = [ 'type_id' => 'downloadable', 'create_url_params' => [ @@ -102,6 +59,7 @@ class DownloadableProductInjectable extends InjectableFixture protected $defaultDataSet = [ 'name' => 'DownloadableProduct_%isolation%', 'sku' => 'DownloadableProduct_%isolation%', + 'url_key' => 'downloadableproduct_%isolation%', 'price' => ['value' => 100.00], 'tax_class_id' => ['dataSet' => 'Taxable Goods'], 'description' => 'This is description for downloadable product', @@ -585,7 +543,7 @@ class DownloadableProductInjectable extends InjectableFixture 'is_required' => '0', 'default_value' => '', 'input' => 'text', - 'group' => 'autosettings' + 'group' => 'search-engine-optimization' ]; protected $url_path = [ diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable.xml b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable.xml index f95a61f537900c84b432b453053a86ba78c87c7a..87f68c2c92cd2e832b58af28a9c6582463502ae2 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable.xml +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable.xml @@ -400,6 +400,7 @@ <is_required>0</is_required> <default_value></default_value> <input>text</input> + <group>search-engine-optimization</group> </url_key> <url_path> <attribute_code>url_path</attribute_code> diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable/Links.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable/Links.php index 39a0a9d5930ee2084eea4617f9de5675e4ef769f..a97fe0769d86b53b741d05f9db952f5e2d729a0b 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable/Links.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable/Links.php @@ -128,10 +128,10 @@ class Links implements FixtureInterface 'number_of_downloads' => 3, 'sample' => [ 'sample_type_url' => 'Yes', - 'sample_url' => 'http://example3.com' + 'sample_url' => 'http://example.net' ], 'file_type_url' => 'Yes', - 'file_link_url' => 'http://example3.com', + 'file_link_url' => 'http://example.net', 'is_shareable' => 'Yes', 'sort_order' => 0 ], @@ -163,10 +163,10 @@ class Links implements FixtureInterface 'is_shareable' => 'Yes', 'sample' => [ 'sample_type_url' => 'Yes', - 'sample_url' => 'http://example.com/sample2' + 'sample_url' => 'http://example.net/sample2' ], 'file_type_url' => 'Yes', - 'file_link_url' => 'http://example2.com', + 'file_link_url' => 'http://example.net/', 'sort_order' => 1 ], ] @@ -196,10 +196,10 @@ class Links implements FixtureInterface 'number_of_downloads' => 3, 'sample' => [ 'sample_type_url' => 'Yes', - 'sample_url' => 'http://example3.com' + 'sample_url' => 'http://example.net' ], 'file_type_url' => 'Yes', - 'file_link_url' => 'http://example3.com', + 'file_link_url' => 'http://example.net', 'is_shareable' => 'Yes', 'sort_order' => 1 ], @@ -209,10 +209,10 @@ class Links implements FixtureInterface 'number_of_downloads' => 5, 'sample' => [ 'sample_type_url' => 'Yes', - 'sample_url' => 'http://example3.com' + 'sample_url' => 'http://example.net' ], 'file_type_url' => 'Yes', - 'file_link_url' => 'http://example3.com', + 'file_link_url' => 'http://example.net', 'is_shareable' => 'Yes', 'sort_order' => 2 ] diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Handler/DownloadableProductInjectable/Curl.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Handler/DownloadableProductInjectable/Curl.php index d71ff09faf3bf56d7d49e5e782fbf8f17ea7235e..e5eeda697079913050ead3bfd8d28b22df9f9374 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Handler/DownloadableProductInjectable/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Handler/DownloadableProductInjectable/Curl.php @@ -26,6 +26,9 @@ namespace Magento\Downloadable\Test\Handler\DownloadableProductInjectable; use Mtf\System\Config; use Mtf\Fixture\FixtureInterface; +use Mtf\Util\Protocol\CurlInterface; +use Mtf\Util\Protocol\CurlTransport; +use Mtf\Util\Protocol\CurlTransport\BackendDecorator; use Magento\Catalog\Test\Handler\CatalogProductSimple\Curl as ProductCurl; /** @@ -104,4 +107,33 @@ class Curl extends ProductCurl implements DownloadableProductInjectableInterface return $this->replaceMappingData($data); } + + /** + * Create product via curl + * + * @param array $data + * @param array $config + * @return array + * @throws \Exception + */ + protected function createProduct(array $data, array $config) + { + $url = $this->getUrl($config); + $curl = new BackendDecorator(new CurlTransport(), new Config()); + $curl->addOption(CURLOPT_HEADER, 1); + $curl->write(CurlInterface::POST, $url, '1.0', [], $data); + $response = $curl->read(); + $curl->close(); + + if (!strpos($response, 'data-ui-id="messages-message-success"')) { + throw new \Exception("Product creation by curl handler was not successful! Response: $response"); + } + preg_match("~Location: [^\s]*\/id\/(\d+)~", $response, $matches); + foreach ($data['downloadable']['link'] as $key => $link) { + preg_match('`"link_id":"(\d*?)","title":"' . $link['title'] . '"`', $response, $linkId); + $data['product']['checkout_data']['options']['links'][$key]['id'] = $linkId[1]; + } + + return ['id' => $matches[1], 'checkout_data' => $data['product']['checkout_data']]; + } } diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Page/DownloadableCustomerProducts.xml b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Page/DownloadableCustomerProducts.xml new file mode 100644 index 0000000000000000000000000000000000000000..d278e5a14e2c05f6909e5a6b1d4452fda43791c2 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Page/DownloadableCustomerProducts.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" ?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<page mca="downloadable/customer/products" module="Magento_Downloadable"> + <blocks> + <mainBlock> + <class>Magento\Downloadable\Test\Block\Customer\Products\ListProducts</class> + <locator>.column.main</locator> + <strategy>css selector</strategy> + </mainBlock> + </blocks> +</page> diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/AddDownloadableProductToCartFromCustomerWishlistOnFrontendTest/test.csv b/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/AddDownloadableProductToCartFromCustomerWishlistOnFrontendTest/test.csv deleted file mode 100644 index 1f973a746f8f226ff57603bd0c96fbc633df7b44..0000000000000000000000000000000000000000 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/AddDownloadableProductToCartFromCustomerWishlistOnFrontendTest/test.csv +++ /dev/null @@ -1,2 +0,0 @@ -"products";"qty";"constraint" -"downloadableProductInjectable::with_two_separately_links";"2";"assertProductQtyInShoppingCart, assertProductsIsAbsentInWishlist" diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/Create/LinksPurchasedSeparatelyTest.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/Create/LinksPurchasedSeparatelyTest.php index bbc5127ffd858595b811ca24e084bdabf23eb599..64735e875bb915e6ef6c6b6acd1b7b020a133ac5 100755 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/Create/LinksPurchasedSeparatelyTest.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/Create/LinksPurchasedSeparatelyTest.php @@ -67,12 +67,12 @@ class LinksPurchasedSeparatelyTest extends Functional $productBlockForm->fill($this->product, null, $category); $createProductPageNew->getFormPageActions()->save(); - $createProductPageNew->getMessagesBlock()->assertSuccessMessage(); + $createProductPageNew->getMessagesBlock()->waitSuccessMessage(); $cachePage = Factory::getPageFactory()->getAdminCache(); $cachePage->open(); $cachePage->getActionsBlock()->flushMagentoCache(); - $cachePage->getMessagesBlock()->assertSuccessMessage(); + $cachePage->getMessagesBlock()->waitSuccessMessage(); $this->assertOnBackend(); $this->assertOnFrontend(); @@ -88,7 +88,7 @@ class LinksPurchasedSeparatelyTest extends Functional $productGridPage = Factory::getPageFactory()->getCatalogProductIndex(); $productGridPage->open(); $gridBlock = $productGridPage->getProductGrid(); - $this->assertTrue($gridBlock->isRowVisible(array('sku' => $this->product->getProductSku()))); + $this->assertTrue($gridBlock->isRowVisible(['sku' => $this->product->getSku()])); } /** diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/CreateDownloadableProductEntityTest/testCreateDownloadableProduct.csv b/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/CreateDownloadableProductEntityTest/testCreateDownloadableProduct.csv index 9e6d75508a79873e89a59f7f248e2f8125139bbf..b679a776ea283734d6f680eadb04b0b9911856e4 100755 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/CreateDownloadableProductEntityTest/testCreateDownloadableProduct.csv +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/CreateDownloadableProductEntityTest/testCreateDownloadableProduct.csv @@ -1,15 +1,15 @@ -"product/data/name";"product/data/sku";"product/data/price/value";"product/data/tax_class_id/dataSet";"product/data/quantity_and_stock_status/qty";"product/data/quantity_and_stock_status/is_in_stock";"product/data/is_virtual";"product/data/category";"product/data/description";"product/data/short_description";"product/data/stock_data/manage_stock";"product/data/stock_data/qty";"product/data/stock_data/use_config_min_qty";"product/data/stock_data/min_qty";"product/data/downloadable_sample/preset";"product/data/downloadable_links/preset";"product/data/custom_options/preset";"product/data/custom_options/import_products";"product/data/special_price";"product/data/group_price/preset";"product/data/tier_price/preset";"constraint" -"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"100";"Taxable Goods";"1";"In Stock";"Yes";"Default Category";"-";"-";"-";"-";"-";"-";"-";"default";"-";"-";"-";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductVisibleInCategory, assertProductPage, assertProductInStock" -"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"1";"Taxable Goods";"10";"In Stock";"Yes";"category %isolation%";"-";"-";"-";"-";"-";"-";"default";"default";"-";"-";"-";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductVisibleInCategory, assertDownloadableSamplesData, assertDownloadableLinksData" -"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"33";"Taxable Goods";"10";"In Stock";"Yes";"category %isolation%";"-";"-";"-";"-";"-";"-";"-";"default";"default";"-";"-";"-";"-";"assertProductSaveMessage, assertDownloadableProductForm, assertProductCustomOptionsOnProductPage, assertProductVisibleInCategory, assertProductPage, assertDownloadableLinksData" -"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"55";"Taxable Goods";"10";"In Stock";"Yes";"-";"-";"-";"-";"-";"-";"-";"with_three_samples";"with_three_links";"two_options";"-";"-";"-";"-";"assertProductSaveMessage, assertProductCustomOptionsOnProductPage, assertProductInGrid, assertDownloadableProductForm, assertProductVisibleInCategory, assertProductPage, assertDownloadableLinksData, assertProductInStock, assertProductSearchableBySku" -"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"100";"Taxable Goods";"50";"Out of Stock";"Yes";"Default Category";"-";"-";"-";"-";"-";"-";"-";"default";"-";"-";"-";"-";"-";"assertProductSaveMessage, assertProductOutOfStock, assertProductInGrid, assertDownloadableProductForm" -"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"9999";"Taxable Goods";"-";"-";"Yes";"Default Category";"-";"-";"Yes";"123";"No";"123";"-";"default";"-";"-";"-";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductOutOfStock" -"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"98";"None";"5";"In Stock";"Yes";"Default Category";"This is description for downloadable product";"-";"-";"-";"-";"-";"-";"default";"-";"-";"-";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage" -"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"57";"Taxable Goods";"10";"In Stock";"Yes";"category %isolation%";"-";"This is short description for downloadable product";"-";"-";"-";"-";"default";"with_three_links";"default";"catalogProductSimple::with_two_custom_option,catalogProductSimple::with_all_custom_option";"-";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage, assertProductCustomOptionsOnProductPage, assertDownloadableSamplesData, assertDownloadableLinksData" -"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"65";"Taxable Goods";"11";"In Stock";"Yes";"category %isolation%";"This is description for downloadable product";"This is short description for downloadable product";"-";"-";"-";"-";"default";"with_three_links";"default";"-";"-";"-";"-";"assertProductSaveMessage, assertProductPage, assertProductInGrid, assertDownloadableProductForm, assertProductCustomOptionsOnProductPage, assertDownloadableSamplesData, assertDownloadableLinksData" -"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"65";"Taxable Goods";"11";"In Stock";"Yes";"category %isolation%";"-";"-";"-";"-";"-";"-";"default";"with_three_links";"default";"-";"-";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage, assertDownloadableLinksData, assertProductCustomOptionsOnProductPage" -"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"100";"Taxable Goods";"-";"-";"Yes";"Default Category";"-";"-";"-";"-";"-";"-";"-";"default";"-";"-";"-";"-";"-";"assertProductSaveMessage, assertDownloadableProductForm, assertProductVisibleInCategory, assertProductPage" -"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"10";"Taxable Goods";"10";"In Stock";"Yes";"category %isolation%";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"5";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage, assertProductSpecialPriceOnProductPage" -"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"365";"Taxable Goods";"23";"In Stock";"Yes";"category %isolation%";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"default";"-";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage, assertProductGroupedPriceOnProductPage" -"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"250";"Taxable Goods";"65";"In Stock";"Yes";"category %isolation%";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"default";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage, assertProductTierPriceOnProductPage" +"product/data/name";"product/data/sku";"product/data/price/value";"product/data/tax_class_id/dataSet";"product/data/quantity_and_stock_status/qty";"product/data/quantity_and_stock_status/is_in_stock";"product/data/is_virtual";"product/data/category";"product/data/description";"product/data/short_description";"product/data/stock_data/manage_stock";"product/data/stock_data/qty";"product/data/stock_data/use_config_min_qty";"product/data/stock_data/min_qty";"product/data/downloadable_sample/preset";"product/data/downloadable_links/preset";"product/data/custom_options/preset";"product/data/custom_options/import_products";"product/data/special_price";"product/data/group_price/preset";"product/data/tier_price/preset";"product/data/url_key";"constraint" +"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"100";"Taxable Goods";"1";"In Stock";"Yes";"Default Category";"-";"-";"-";"-";"-";"-";"-";"default";"-";"-";"-";"-";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductVisibleInCategory, assertProductPage, assertProductInStock" +"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"1";"Taxable Goods";"10";"In Stock";"Yes";"category %isolation%";"-";"-";"-";"-";"-";"-";"default";"default";"-";"-";"-";"-";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductVisibleInCategory, assertDownloadableSamplesData, assertDownloadableLinksData" +"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"33";"Taxable Goods";"10";"In Stock";"Yes";"category %isolation%";"-";"-";"-";"-";"-";"-";"-";"default";"default";"-";"-";"-";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertDownloadableProductForm, assertProductCustomOptionsOnProductPage, assertProductVisibleInCategory, assertProductPage, assertDownloadableLinksData" +"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"55";"Taxable Goods";"10";"In Stock";"Yes";"-";"-";"-";"-";"-";"-";"-";"with_three_samples";"with_three_links";"two_options";"-";"-";"-";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductCustomOptionsOnProductPage, assertProductInGrid, assertDownloadableProductForm, assertProductVisibleInCategory, assertProductPage, assertDownloadableLinksData, assertProductInStock, assertProductSearchableBySku" +"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"100";"Taxable Goods";"50";"Out of Stock";"Yes";"Default Category";"-";"-";"-";"-";"-";"-";"-";"default";"-";"-";"-";"-";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductOutOfStock, assertProductInGrid, assertDownloadableProductForm" +"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"9999";"Taxable Goods";"-";"-";"Yes";"Default Category";"-";"-";"Yes";"123";"No";"123";"-";"default";"-";"-";"-";"-";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductOutOfStock" +"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"98";"None";"5";"In Stock";"Yes";"Default Category";"This is description for downloadable product";"-";"-";"-";"-";"-";"-";"default";"-";"-";"-";"-";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage" +"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"57";"Taxable Goods";"10";"In Stock";"Yes";"category %isolation%";"-";"This is short description for downloadable product";"-";"-";"-";"-";"default";"with_three_links";"default";"catalogProductSimple::with_two_custom_option,catalogProductSimple::with_all_custom_option";"-";"-";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage, assertProductCustomOptionsOnProductPage, assertDownloadableSamplesData, assertDownloadableLinksData" +"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"65";"Taxable Goods";"11";"In Stock";"Yes";"category %isolation%";"This is description for downloadable product";"This is short description for downloadable product";"-";"-";"-";"-";"default";"with_three_links";"default";"-";"-";"-";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductPage, assertProductInGrid, assertDownloadableProductForm, assertProductCustomOptionsOnProductPage, assertDownloadableSamplesData, assertDownloadableLinksData" +"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"65";"Taxable Goods";"11";"In Stock";"Yes";"category %isolation%";"-";"-";"-";"-";"-";"-";"default";"with_three_links";"default";"-";"-";"-";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage, assertDownloadableLinksData, assertProductCustomOptionsOnProductPage" +"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"100";"Taxable Goods";"-";"-";"Yes";"Default Category";"-";"-";"-";"-";"-";"-";"-";"default";"-";"-";"-";"-";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertDownloadableProductForm, assertProductVisibleInCategory, assertProductPage" +"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"10";"Taxable Goods";"10";"In Stock";"Yes";"category %isolation%";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"5";"-";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage, assertProductSpecialPriceOnProductPage" +"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"365";"Taxable Goods";"23";"In Stock";"Yes";"category %isolation%";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"default";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage, assertProductGroupedPriceOnProductPage" +"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"250";"Taxable Goods";"65";"In Stock";"Yes";"category %isolation%";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"default";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage, assertProductTierPriceOnProductPage" diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/UpdateDownloadableProductEntityTest/testUpdateDownloadableProduct.csv b/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/UpdateDownloadableProductEntityTest/testUpdateDownloadableProduct.csv index 6d2e795540de0222887704e6530657729598c601..be96bcd01890ac6b25cc503f9388da5245cedb17 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/UpdateDownloadableProductEntityTest/testUpdateDownloadableProduct.csv +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/UpdateDownloadableProductEntityTest/testUpdateDownloadableProduct.csv @@ -1,8 +1,8 @@ -"product/data/name";"product/data/sku";"product/data/price/value";"product/data/tax_class_id/dataSet";"product/data/quantity_and_stock_status/qty";"product/data/quantity_and_stock_status/is_in_stock";"product/data/is_virtual";"product/data/weight";"product/data/category";"product/data/description";"product/data/short_description";"product/data/inventory_manage_stock";"product/data/inventory_qty";"product/data/stock_data_use_config_min_qty";"product/data/stock_data_min_qty";"product/data/downloadable_sample/preset";"product/data/downloadable_links/preset";"product/data/custom_options/preset";"product/data/special_price";"isRequired";"constraint" -"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"55";"Taxable Goods";"10";"In Stock";"Yes";"-";"-";"-";"-";"-";"-";"-";"-";"with_three_samples";"with_three_links";"two_options";"-";"No";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage, assertDownloadableLinksData, assertProductInStock, assertProductCustomOptionsOnProductPage, assertProductSearchableBySku" -"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"100";"Taxable Goods";"50";"Out of Stock";"Yes";"-";"Default Category";"-";"-";"-";"-";"-";"-";"-";"default";"-";"-";"No";"assertProductSaveMessage, assertProductOutOfStock, assertProductInGrid, assertDownloadableProductForm" -"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"9999";"Taxable Goods";"123";"-";"Yes";"-";"Default Category";"-";"-";"Yes";"-";"No";"123";"-";"-";"-";"-";"No";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductOutOfStock" -"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"48";"None";"5";"In Stock";"Yes";"-";"Default Category";"This is description for downloadable product";"-";"-";"-";"-";"-";"-";"default";"-";"-";"No";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage" -"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"54";"Taxable Goods";"10";"In Stock";"Yes";"-";"category %isolation%";"-";"This is short description for downloadable product";"-";"-";"-";"-";"default";"with_three_links";"default";"-";"Yes";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage, assertProductCustomOptionsOnProductPage, assertDownloadableSamplesData, assertDownloadableLinksData, assertProductInCategory" -"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"57";"Taxable Goods";"10";"In Stock";"No";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"No";"assertProductSaveMessage, assertProductInGrid" -"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"43";"Taxable Goods";"10";"In Stock";"No";"10";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"40";"No";"assertProductSaveMessage, assertProductInGrid, assertProductSpecialPriceOnProductPage, assertProductPage" +"product/data/name";"product/data/sku";"product/data/price/value";"product/data/tax_class_id/dataSet";"product/data/quantity_and_stock_status/qty";"product/data/quantity_and_stock_status/is_in_stock";"product/data/is_virtual";"product/data/weight";"product/data/category";"product/data/description";"product/data/short_description";"product/data/inventory_manage_stock";"product/data/inventory_qty";"product/data/stock_data_use_config_min_qty";"product/data/stock_data_min_qty";"product/data/downloadable_sample/preset";"product/data/downloadable_links/preset";"product/data/custom_options/preset";"product/data/special_price";"isRequired";"product/data/url_key";"constraint" +"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"55";"Taxable Goods";"10";"In Stock";"Yes";"-";"-";"-";"-";"-";"-";"-";"-";"with_three_samples";"with_three_links";"two_options";"-";"No";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage, assertDownloadableLinksData, assertProductInStock, assertProductCustomOptionsOnProductPage, assertProductSearchableBySku" +"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"100";"Taxable Goods";"50";"Out of Stock";"Yes";"-";"Default Category";"-";"-";"-";"-";"-";"-";"-";"default";"-";"-";"No";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductOutOfStock, assertProductInGrid, assertDownloadableProductForm" +"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"9999";"Taxable Goods";"123";"-";"Yes";"-";"Default Category";"-";"-";"Yes";"-";"No";"123";"-";"-";"-";"-";"No";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductOutOfStock" +"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"48";"None";"5";"In Stock";"Yes";"-";"Default Category";"This is description for downloadable product";"-";"-";"-";"-";"-";"-";"default";"-";"-";"No";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage" +"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"54";"Taxable Goods";"10";"In Stock";"Yes";"-";"category %isolation%";"-";"This is short description for downloadable product";"-";"-";"-";"-";"default";"with_three_links";"default";"-";"Yes";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage, assertProductCustomOptionsOnProductPage, assertDownloadableSamplesData, assertDownloadableLinksData, assertProductInCategory" +"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"57";"Taxable Goods";"10";"In Stock";"No";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"No";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid" +"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"43";"Taxable Goods";"10";"In Stock";"No";"10";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"40";"No";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertProductSpecialPriceOnProductPage, assertProductPage" \ No newline at end of file diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/etc/page.xml b/dev/tests/functional/tests/app/Magento/Downloadable/Test/etc/page.xml new file mode 100644 index 0000000000000000000000000000000000000000..97ba75d1cf684c2e6449a7e96978e4f7290d6e33 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/etc/page.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" ?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<page module="Magento_Downloadable"> + <downloadableCustomerProducts> + <mca>downloadable/customer/products</mca> + <class>Magento\Downloadable\Test\Page\DownloadableCustomerProducts</class> + </downloadableCustomerProducts> +</page> diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/AddGroupedProductToCartFromCustomerWishlistOnFrontendTest/test.csv b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/AddGroupedProductToCartFromCustomerWishlistOnFrontendTest/test.csv deleted file mode 100644 index 304ff5bc9fe63a4c92aea52ce001d4728ed14aeb..0000000000000000000000000000000000000000 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/AddGroupedProductToCartFromCustomerWishlistOnFrontendTest/test.csv +++ /dev/null @@ -1,2 +0,0 @@ -"products";"qty";"constraint" -"groupedProductInjectable::three_simple_products";"-";"assertProductQtyInShoppingCart, assertProductsIsAbsentInWishlist" diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/CreateGroupedTest.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/CreateGroupedTest.php index b5f3d5542d1a994cebd50afd29e130c9731767a7..3ba4035e448071af2a00807876c8a394bac989ba 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/CreateGroupedTest.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/CreateGroupedTest.php @@ -66,7 +66,7 @@ class CreateGroupedTest extends Functional $productForm->fill($product); $createProductPage->getFormPageActions()->save(); //Verifying - $createProductPage->getMessagesBlock()->assertSuccessMessage(); + $createProductPage->getMessagesBlock()->waitSuccessMessage(); //Flush cache $cachePage = Factory::getPageFactory()->getAdminCache(); $cachePage->open(); @@ -86,7 +86,7 @@ class CreateGroupedTest extends Functional { //Search data $search = [ - 'sku' => $product->getProductSku(), + 'sku' => $product->getSku(), 'type' => 'Grouped Product' ]; //Page & Block diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Product/Downloads/Grid.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Product/Downloads/Grid.php new file mode 100644 index 0000000000000000000000000000000000000000..6193071c506956cee6ca65bf6e724df30a8df992 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Product/Downloads/Grid.php @@ -0,0 +1,49 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Reports\Test\Block\Adminhtml\Product\Downloads; + +/** + * Class Grid + * Downloads Report grid + */ +class Grid extends \Magento\Backend\Test\Block\Widget\Grid +{ + /** + * Filters array mapping + * + * @var array + */ + protected $filters = [ + 'name' => [ + 'selector' => 'input[name="name"]', + ], + 'link_title' => [ + 'selector' => 'input[name="link_title"]', + ], + 'sku' => [ + 'selector' => 'input[name="sku"]', + ], + ]; +} diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/AddDownloadableProductToCartFromCustomerWishlistOnFrontendTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Sales/TaxRule/Action.php similarity index 56% rename from dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/AddDownloadableProductToCartFromCustomerWishlistOnFrontendTest.php rename to dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Sales/TaxRule/Action.php index 65e4c5d94eadc7ed512012c9547856b2006c8ed6..5da3247ebd458aa1d3b94e68e01d3f6243e4aabb 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/AddDownloadableProductToCartFromCustomerWishlistOnFrontendTest.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Sales/TaxRule/Action.php @@ -22,30 +22,30 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Downloadable\Test\TestCase; +namespace Magento\Reports\Test\Block\Adminhtml\Sales\TaxRule; -use Magento\Wishlist\Test\TestCase\AddProductsToCartFromCustomerWishlistOnFrontendTest as AddProductsToCartFromWishlist; +use Magento\Backend\Test\Block\PageActions; /** - * Test Creation for Adding Downloadable product from Wishlist to Cart - * - * Test Flow: - * - * Preconditions: - * 1. Create customer and login to frontend - * 2. Downloadable product is created - * 3. Add downloadable product to customer's wishlist - * - * Steps: - * 1. Navigate to My Account -> My Wishlist - * 2. Fill qty and update wish list - * 3. Click "Add to Cart" - * 4. Perform asserts - * - * @group Wishlist_(CS) - * @ZephyrId MAGETWO-25268 + * Class Action + * Action block for Tax Report */ -class AddDownloadableProductToCartFromCustomerWishlistOnFrontendTest extends AddProductsToCartFromWishlist +class Action extends PageActions { - // + /** + * Show Report button + * + * @var string + */ + protected $showReportButton = '#filter_form_submit'; + + /** + * Show report button click + * + * @return void + */ + public function showReport() + { + $this->_rootElement->find($this->showReportButton)->click(); + } } diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/AddConfigurableProductToCartFromCustomerWishlistOnFrontendTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Sales/TaxRule/Filter.php similarity index 56% rename from dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/AddConfigurableProductToCartFromCustomerWishlistOnFrontendTest.php rename to dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Sales/TaxRule/Filter.php index 74578baac702e2c6e1f188c97bcc45a83fb0295c..8d625f98d43e18ff5e8e33d1e3957c28e9229f88 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/AddConfigurableProductToCartFromCustomerWishlistOnFrontendTest.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Sales/TaxRule/Filter.php @@ -22,30 +22,25 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ConfigurableProduct\Test\TestCase; +namespace Magento\Reports\Test\Block\Adminhtml\Sales\TaxRule; -use Magento\Wishlist\Test\TestCase\AddProductsToCartFromCustomerWishlistOnFrontendTest as AddProductsToCartFromWishlist; +use Mtf\ObjectManager; +use Magento\Reports\Test\Block\Adminhtml\AbstractFilter; /** - * Test Creation for Adding Configurable product from Wishlist to Cart - * - * Test Flow: - * - * Preconditions: - * 1. Create customer and login to frontend - * 2. Configurable product is created - * 3. Add configurable product to customer's wishlist - * - * Steps: - * 1. Navigate to My Account -> My Wishlist - * 2. Fill qty and update wish list - * 3. Click "Add to Cart" - * 4. Perform asserts - * - * @group Wishlist_(CS) - * @ZephyrId MAGETWO-25268 + * Class Filter + * Filter for Tax Rule Views Report */ -class AddConfigurableProductToCartFromCustomerWishlistOnFrontendTest extends AddProductsToCartFromWishlist +class Filter extends AbstractFilter { - // + /** + * Prepare data + * + * @param array $viewsReport + * @return array + */ + protected function prepareData(array $viewsReport) + { + return parent::prepareData(array_diff($viewsReport, ['-'])); + } } diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Sales/TaxRule/Filter.xml b/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Sales/TaxRule/Filter.xml new file mode 100644 index 0000000000000000000000000000000000000000..9f2534940848d3b06bfef3c43dc42c241bb475d7 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Sales/TaxRule/Filter.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" ?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<mapping strict="0"> + <fields> + <report_type> + <input>select</input> + </report_type> + <period_type> + <input>select</input> + </period_type> + <from> + <input>datepicker</input> + </from> + <to> + <input>datepicker</input> + </to> + <show_order_statuses> + <input>select</input> + </show_order_statuses> + <order_statuses> + <selector>[name="order_statuses[]"]</selector> + <input>multiselect</input> + </order_statuses> + <show_empty_rows> + <input>select</input> + </show_empty_rows> + </fields> +</mapping> diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/AddBundleProductToCartFromCustomerWishlistOnFrontendTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Sales/TaxRule/Grid.php similarity index 57% rename from dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/AddBundleProductToCartFromCustomerWishlistOnFrontendTest.php rename to dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Sales/TaxRule/Grid.php index 9ad154674eabcd0c1fd47a42c429d8292210eb17..0feb2da8cb3c6ff52d901125031c2cc5962eb1d0 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/AddBundleProductToCartFromCustomerWishlistOnFrontendTest.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Sales/TaxRule/Grid.php @@ -22,30 +22,13 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Bundle\Test\TestCase; - -use Magento\Wishlist\Test\TestCase\AddProductsToCartFromCustomerWishlistOnFrontendTest as AddProductsToCartFromWishlist; +namespace Magento\Reports\Test\Block\Adminhtml\Sales\TaxRule; /** - * Test Creation for Adding Bundle product from Wishlist to Cart - * - * Test Flow: - * - * Preconditions: - * 1. Create customer and login to frontend - * 2. Bundle product is created - * 3. Add bundle product to customer's wishlist - * - * Steps: - * 1. Navigate to My Account -> My Wishlist - * 2. Fill qty and update wish list - * 3. Click "Add to Cart" - * 4. Perform asserts - * - * @group Wishlist_(CS) - * @ZephyrId MAGETWO-25268 + * Class Grid + * Tax report grid */ -class AddBundleProductToCartFromCustomerWishlistOnFrontendTest extends AddProductsToCartFromWishlist +class Grid extends \Magento\Backend\Test\Block\Widget\Grid { // } diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertBestsellerReportResult.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertBestsellerReportResult.php index 4be59b9b37994d6332be13ae41e8316f9a0ca9e9..1bda5bb5e91a9890aa3accb40d7b730db250fb76 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertBestsellerReportResult.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertBestsellerReportResult.php @@ -59,7 +59,7 @@ class AssertBestsellerReportResult extends AbstractConstraint $productQty = []; foreach ($products as $key => $product) { /** @var CatalogProductSimple $product*/ - $productQty[$key] = $product->getCheckoutData()['qty']; + $productQty[$key] = $product->getCheckoutData()['options']['qty']; } \PHPUnit_Framework_Assert::assertEquals($productQty, $totalQuantity); } diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertDownloadsReportResult.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertDownloadsReportResult.php new file mode 100644 index 0000000000000000000000000000000000000000..03d10894e4c632f27b14bbbab19443d663af5f8c --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertDownloadsReportResult.php @@ -0,0 +1,81 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Reports\Test\Constraint; + +use Magento\Reports\Test\Page\Adminhtml\DownloadsReport; +use Magento\Sales\Test\Fixture\OrderInjectable; +use Mtf\Constraint\AbstractConstraint; + +/** + * Class AssertDownloadsReportResult + * Assert downloads product info in report grid + */ +class AssertDownloadsReportResult extends AbstractConstraint +{ + /** + * Constraint severeness + * + * @var string + */ + protected $severeness = 'low'; + + /** + * Assert product info in report: product name, link title, sku, downloads number (Reports > Products > Downloads) + * + * @param OrderInjectable $order + * @param DownloadsReport $downloadsReport + * @param int $downloads + * @return void + */ + public function processAssert(OrderInjectable $order, DownloadsReport $downloadsReport, $downloads) + { + $downloadsReport->open(); + foreach ($order->getEntityId()['products'] as $product) { + foreach ($product->getDownloadableLinks()['downloadable']['link'] as $link) { + $filter = [ + 'name' => $product->getName(), + 'link_title' => $link['title'], + 'sku' => $product->getSku(), + ]; + $downloadsReport->getGridBlock()->search($filter); + $filter[] = $downloads; + \PHPUnit_Framework_Assert::assertTrue( + $downloadsReport->getGridBlock()->isRowVisible($filter, false), + "Downloads report link {$link['title']} is not present in reports grid." + ); + } + } + } + + /** + * Returns a string representation of the object + * + * @return string + */ + public function toString() + { + return 'Downloads report is present in reports grid.'; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertNewAccountsReportTotalResult.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertNewAccountsReportTotalResult.php index 15d7e8470461b368d9551b1d8557704260481268..3e828e7a00d5bccad2292d605f166aa80ef01fb8 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertNewAccountsReportTotalResult.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertNewAccountsReportTotalResult.php @@ -50,7 +50,7 @@ class AssertNewAccountsReportTotalResult extends AbstractConstraint public function processAssert(CustomerAccounts $customerAccounts, $total) { $totalForm = $customerAccounts->getGridBlock()->getTotalResults(); - \PHPUnit_Framework_Assert::assertEquals($totalForm, $total); + \PHPUnit_Framework_Assert::assertEquals($total, $totalForm); } /** diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertOrderedProductResult.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertOrderedProductResult.php index 5fb436aa0abb769607ec060c7aa3dc648d6c43bb..e19cf575183a44e9f8f503e4cdb2ddb8c142191d 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertOrderedProductResult.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertOrderedProductResult.php @@ -60,7 +60,7 @@ class AssertOrderedProductResult extends AbstractConstraint foreach ($totalQuantity as $key => $value) { /** @var CatalogProductSimple $product */ $product = $products[$key]; - $productQty[$key] = $product->getCheckoutData()['qty']; + $productQty[$key] = $product->getCheckoutData()['options']['qty']; } \PHPUnit_Framework_Assert::assertEquals($totalQuantity, $productQty); } diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductReportByCustomerInGrid.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductReportByCustomerInGrid.php index a042e2db021280f5ae4940d97782078dde2f2595..64ee9a5e95041c7182385e13f717b9d887336984 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductReportByCustomerInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductReportByCustomerInGrid.php @@ -66,7 +66,7 @@ class AssertProductReportByCustomerInGrid extends AbstractConstraint CatalogProductSimple $product = null, $gridStatus = '' ) { - $filter = $assertProductReviewInGrid->prepareFilter($product, $review, $gridStatus); + $filter = $assertProductReviewInGrid->prepareFilter($product, $review->getData(), $gridStatus); $customerReportReview->open(); $customerReportReview->getGridBlock()->openReview($customer); diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductReviewIsAvailableForProduct.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductReviewIsAvailableForProduct.php index 848d5b621764f3bc1524a817a0d2de93a36b8640..0faf7574e775aeaf8fc556a0a2004bd0b6a0fac9 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductReviewIsAvailableForProduct.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductReviewIsAvailableForProduct.php @@ -62,7 +62,7 @@ class AssertProductReviewIsAvailableForProduct extends AbstractConstraint $product = $review->getDataFieldConfig('entity_id')['source']->getEntity(); $productReportReview->getGridBlock()->openReview($product->getName()); unset($assertProductReviewInGrid->filter['visible_in']); - $filter = $assertProductReviewInGrid->prepareFilter($product, $review, ''); + $filter = $assertProductReviewInGrid->prepareFilter($product, $review->getData(), ''); \PHPUnit_Framework_Assert::assertTrue( $reviewIndex->getReviewGrid()->isRowVisible($filter, false), 'Review for ' . $product->getName() . ' product is not visible in reports grid.' diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertTaxReportInGrid.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertTaxReportInGrid.php new file mode 100644 index 0000000000000000000000000000000000000000..f262bc597cf2605044aa72e8d8e4f950f8407f3a --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertTaxReportInGrid.php @@ -0,0 +1,82 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Reports\Test\Constraint; + +use Magento\Reports\Test\Page\Adminhtml\SalesTaxReport; +use Magento\Sales\Test\Fixture\OrderInjectable; +use Magento\Tax\Test\Fixture\TaxRule; +use Mtf\Constraint\AbstractConstraint; + +/** + * Class AssertTaxReportInGrid + * Check that sales info in report: Tax, Rate, Orders, Tax Amount on tax report page + */ +class AssertTaxReportInGrid extends AbstractConstraint +{ + /** + * Constraint severeness + * + * @var string + */ + protected $severeness = 'low'; + + /** + * Assert sales info in report: Tax, Rate, Orders, Tax Amount on tax report page + * + * @param SalesTaxReport $salesTaxReport + * @param OrderInjectable $order + * @param TaxRule $taxRule + * @param string $taxAmount + * @return void + */ + public function processAssert( + SalesTaxReport $salesTaxReport, + OrderInjectable $order, + TaxRule $taxRule, + $taxAmount + ) { + $filter = [ + 'tax' => $taxRule->getTaxRate()[0], + 'rate' => $taxRule->getDataFieldConfig('tax_rate')['source']->getFixture()[0]->getRate(), + 'orders' => count($order->getEntityId()['products']), + 'tax_amount' => $taxAmount + ]; + + \PHPUnit_Framework_Assert::assertTrue( + $salesTaxReport->getGridBlock()->isRowVisible($filter, false), + "Tax Report is not visible in grid on tax report page." + ); + } + + /** + * Returns a string representation of the object + * + * @return string + */ + public function toString() + { + return "Sales info in report: Tax, Rate, Orders, Tax Amount is correct in grid on tax report page."; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertTaxReportNotInGrid.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertTaxReportNotInGrid.php new file mode 100644 index 0000000000000000000000000000000000000000..4bea099f5e417267d8bd37e86aa4e0f47c488e88 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertTaxReportNotInGrid.php @@ -0,0 +1,82 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Reports\Test\Constraint; + +use Magento\Reports\Test\Page\Adminhtml\SalesTaxReport; +use Magento\Sales\Test\Fixture\OrderInjectable; +use Magento\Tax\Test\Fixture\TaxRule; +use Mtf\Constraint\AbstractConstraint; + +/** + * Class AssertTaxReportNotInGrid + * Check that Tax report is absent on tax report page + */ +class AssertTaxReportNotInGrid extends AbstractConstraint +{ + /** + * Constraint severeness + * + * @var string + */ + protected $severeness = 'low'; + + /** + * Assert Tax report is absent on tax report page + * + * @param SalesTaxReport $salesTaxReport + * @param OrderInjectable $order + * @param TaxRule $taxRule + * @param string $taxAmount + * @return void + */ + public function processAssert( + SalesTaxReport $salesTaxReport, + OrderInjectable $order, + TaxRule $taxRule, + $taxAmount + ) { + $filter = [ + 'tax' => $taxRule->getTaxRate()[0], + 'rate' => $taxRule->getDataFieldConfig('tax_rate')['source']->getFixture()[0]->getRate(), + 'orders' => count($order->getEntityId()['products']), + 'tax_amount' => $taxAmount + ]; + + \PHPUnit_Framework_Assert::assertFalse( + $salesTaxReport->getGridBlock()->isRowVisible($filter, false), + "Tax Report is visible in grid on tax report page." + ); + } + + /** + * Returns a string representation of the object + * + * @return string + */ + public function toString() + { + return "Sales info in report: Tax, Rate, Orders, Tax Amount is incorrect in grid on tax report page."; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Page/Adminhtml/DownloadsReport.xml b/dev/tests/functional/tests/app/Magento/Reports/Test/Page/Adminhtml/DownloadsReport.xml new file mode 100644 index 0000000000000000000000000000000000000000..caa658511df1bdebfe3daf10851eb5f4fc019bb2 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Page/Adminhtml/DownloadsReport.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" ?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<page mca="reports/report_product/downloads" module="Magento_Reports"> + <blocks> + <gridBlock> + <class>Magento\Reports\Test\Block\Adminhtml\Product\Downloads\Grid</class> + <locator>#downloadsGrid</locator> + <strategy>css selector</strategy> + </gridBlock> + </blocks> +</page> diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Page/Adminhtml/SalesTaxReport.xml b/dev/tests/functional/tests/app/Magento/Reports/Test/Page/Adminhtml/SalesTaxReport.xml new file mode 100644 index 0000000000000000000000000000000000000000..26ee97fc9e259c08d65062324afd3285977bea30 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Page/Adminhtml/SalesTaxReport.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" ?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<page mca="reports/report_sales/tax" module="Magento_Reports"> + <blocks> + <filterBlock> + <class>Magento\Reports\Test\Block\Adminhtml\Sales\TaxRule\Filter</class> + <locator>#filter_form</locator> + <strategy>css selector</strategy> + </filterBlock> + <actionBlock> + <class>Magento\Reports\Test\Block\Adminhtml\Sales\TaxRule\Action</class> + <locator>.page-main-actions</locator> + <strategy>css selector</strategy> + </actionBlock> + <gridBlock> + <class>Magento\Reports\Test\Block\Adminhtml\Sales\TaxRule\Grid</class> + <locator>.grid</locator> + <strategy>css selector</strategy> + </gridBlock> + </blocks> +</page> diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/BestsellerProductsReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/BestsellerProductsReportEntityTest.php new file mode 100644 index 0000000000000000000000000000000000000000..07d0094314248e40249408ceabad0f1053963451 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/BestsellerProductsReportEntityTest.php @@ -0,0 +1,89 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Reports\Test\TestCase; + +use Mtf\TestCase\Injectable; +use Magento\Sales\Test\Fixture\OrderInjectable; +use Magento\Reports\Test\Page\Adminhtml\Bestsellers; + +/** + * Test Creation for BestsellerProductsReportEntity + * + * Test Flow: + * Preconditions: + * 1. Create customer + * 2. Create product + * 3. Place order + * 4. Refresh statistic + * + * Steps: + * 1. Open Backend + * 2. Go to Reports > Products > Bestsellers + * 3. Select time range, report period + * 4. Click "Show report" + * 5. Perform all assertions + * + * @group Reports_(MX) + * @ZephyrId MAGETWO-28222 + */ +class BestsellerProductsReportEntityTest extends Injectable +{ + /** + * Bestsellers page + * + * @var Bestsellers + */ + protected $bestsellers; + + /** + * Inject pages + * + * @param Bestsellers $bestsellers + * @return void + */ + public function __inject(Bestsellers $bestsellers) + { + $this->bestsellers = $bestsellers; + } + + /** + * Bestseller Products Report + * + * @param OrderInjectable $order + * @param array $bestsellerReport + * @return void + */ + public function test(OrderInjectable $order, array $bestsellerReport) + { + // Preconditions + $order->persist(); + $this->bestsellers->open(); + $this->bestsellers->getMessagesBlock()->clickLinkInMessages('notice', 'here'); + + // Steps + $this->bestsellers->getFilterBlock()->viewsReport($bestsellerReport); + $this->bestsellers->getActionsBlock()->showReport(); + } +} diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/BestsellerProductsReportEntityTest/test.csv b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/BestsellerProductsReportEntityTest/test.csv new file mode 100644 index 0000000000000000000000000000000000000000..78dc2381483263924f1672265c7244179f073d32 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/BestsellerProductsReportEntityTest/test.csv @@ -0,0 +1,4 @@ +"order/dataSet";"bestsellerReport/period_type";"bestsellerReport/from";"bestsellerReport/to";"bestsellerReport/show_empty_rows";"date";"constraint" +"simple_big_qty";"Year";"m/d/Y -1 year";"m/d/Y";"No";"Y";"assertBestsellerReportResult" +"virtual_big_qty";"Month";"m/d/Y -1 month";"m/d/Y";"Yes";"n/Y";"assertBestsellerReportResult" +"simple_big_qty";"Day";"m/d/Y -1 day";"m/d/Y +1 day";"No";"M d, Y";"assertBestsellerReportResult" diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/DownloadProductsReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/DownloadProductsReportEntityTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3f3d10f02cf5e177a3b852ef5dddec0f06ea9939 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/DownloadProductsReportEntityTest.php @@ -0,0 +1,135 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Reports\Test\TestCase; + +use Magento\Customer\Test\Page\CustomerAccountIndex; +use Magento\Downloadable\Test\Page\DownloadableCustomerProducts; +use Mtf\TestCase\Injectable; +use Mtf\Client\Browser; +use Magento\Sales\Test\Fixture\OrderInjectable; + +/** + * Test Creation for DownloadProductsReportEntity + * + * Test Flow: + * + * Preconditions: + * 1. Create customer. + * 2. Create downloadable product. + * 3. Place order. + * 4. Create invoice. + * 5. Go to customer account > My Downloads and click download link. + * + * Steps: + * 1. Open Backend. + * 2. Go to Reports > Products > Downloads. + * 3. Perform all assertions. + * + * @group Reports_(MX) + * @ZephyrId MAGETWO-28823 + */ +class DownloadProductsReportEntityTest extends Injectable +{ + /** + * Browser Interface + * + * @var Browser + */ + protected $browser; + + /** + * Customer Account index page + * + * @var CustomerAccountIndex + */ + protected $customerAccount; + + /** + * Downloadable Customer Products page + * + * @var DownloadableCustomerProducts + */ + protected $customerProducts; + + /** + * Inject pages + * + * @param CustomerAccountIndex $customerAccount + * @param DownloadableCustomerProducts $customerProducts + * @return void + */ + public function __inject( + CustomerAccountIndex $customerAccount, + DownloadableCustomerProducts $customerProducts, + Browser $browser + ) { + $this->customerAccount = $customerAccount; + $this->customerProducts = $customerProducts; + $this->browser = $browser; + } + + /** + * Order downloadable product + * + * @param OrderInjectable $order + * @param string $downloads + * @return void + */ + public function test(OrderInjectable $order, $downloads) + { + // Preconditions + $order->persist(); + $invoice = $this->objectManager->create('Magento\Sales\Test\TestStep\CreateInvoiceStep', ['order' => $order]); + $invoice->run(); + $this->openDownloadableLink($order, (int)$downloads); + } + + /** + * Open Downloadable Link + * + * @param OrderInjectable $order + * @param int $downloads + * @return void + */ + protected function openDownloadableLink(OrderInjectable $order, $downloads) + { + $customerLogin = $this->objectManager->create( + 'Magento\Customer\Test\TestStep\LoginCustomerOnFrontendStep', + ['customer' => $order->getDataFieldConfig('customer_id')['source']->getCustomer()] + ); + $customerLogin->run(); + $this->customerAccount->getAccountMenuBlock()->openMenuItem('My Downloadable Products'); + foreach ($order->getEntityId()['products'] as $product) { + foreach ($product->getDownloadableLinks()['downloadable']['link'] as $link) { + for ($i = 0; $i < $downloads; $i++) { + $this->customerProducts->getMainBlock()->openLink($link['title']); + $this->browser->selectWindow(); + $this->browser->closeWindow(); + $this->browser->selectWindow(); + } + } + } + } +} diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/DownloadProductsReportEntityTest/test.csv b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/DownloadProductsReportEntityTest/test.csv new file mode 100644 index 0000000000000000000000000000000000000000..fcb06cbea2595346320f709795a2bc9c95f220ea --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/DownloadProductsReportEntityTest/test.csv @@ -0,0 +1,4 @@ +"order/dataSet";"downloads";"constraint" +"downloadable_product";"1";"assertDownloadsReportResult" +"two_downloadable_product";"2";"assertDownloadsReportResult" +"downloadable_product";"0";"assertDownloadsReportResult" diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesTaxReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesTaxReportEntityTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2b00e211cc4bb88204075b830e8ae0de914ae44a --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesTaxReportEntityTest.php @@ -0,0 +1,214 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Reports\Test\TestCase; + +use Mtf\TestCase\Injectable; +use Magento\Tax\Test\Fixture\TaxRule; +use Magento\Tax\Test\Page\Adminhtml\TaxRuleNew; +use Magento\Sales\Test\Fixture\OrderInjectable; +use Magento\Sales\Test\Page\Adminhtml\OrderView; +use Magento\Tax\Test\Page\Adminhtml\TaxRuleIndex; +use Magento\Sales\Test\Page\Adminhtml\OrderIndex; +use Magento\Reports\Test\Page\Adminhtml\Statistics; +use Magento\Sales\Test\Page\Adminhtml\OrderInvoiceNew; +use Magento\Reports\Test\Page\Adminhtml\SalesTaxReport; + +/** + * Test Creation for SalesTaxReportEntity + * + * Test Flow: + * + * Preconditions: + * 1. Product is created + * 2. Customer is created + * 3. Tax Rule is created + * 4. Order is placed + * 5. Refresh statistic + * + * Steps: + * 1. Login to backend + * 2. Go to Reports > Sales > Tax + * 3. Fill data from dataSet + * 4. Click "Show report" + * 5. Perform all assertions + * + * @group Reports_(MX) + * @ZephyrId MAGETWO-28515 + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ +class SalesTaxReportEntityTest extends Injectable +{ + /** + * Order index page + * + * @var OrderIndex + */ + protected $orderIndex; + + /** + * Order invoice new page + * + * @var OrderInvoiceNew + */ + protected $orderInvoiceNew; + + /** + * Sales tax report page + * + * @var SalesTaxReport + */ + protected $salesTaxReport; + + /** + * Order view page + * + * @var OrderView + */ + protected $orderView; + + /** + * Report statistic page + * + * @var Statistics + */ + protected $reportStatistic; + + /** + * Tax Rule grid page + * + * @var TaxRuleIndex + */ + protected $taxRuleIndexPage; + + /** + * Tax Rule new and edit page + * + * @var TaxRuleNew + */ + protected $taxRuleNewPage; + + /** + * Tax Rule fixture + * + * @var TaxRule + */ + protected $taxRule; + + /** + * Delete all tax rules + * + * @return void + */ + public function __prepare() + { + $deleteTaxRule = $this->objectManager->create('Magento\Tax\Test\TestStep\DeleteAllTaxRulesStep'); + $deleteTaxRule->run(); + } + + /** + * Injection data + * + * @param OrderIndex $orderIndex + * @param OrderInvoiceNew $orderInvoiceNew + * @param OrderView $orderView + * @param Statistics $reportStatistic + * @param SalesTaxReport $salesTaxReport + * @param TaxRuleIndex $taxRuleIndexPage + * @param TaxRuleNew $taxRuleNewPage + * @return void + */ + public function __inject( + OrderIndex $orderIndex, + OrderInvoiceNew $orderInvoiceNew, + OrderView $orderView, + Statistics $reportStatistic, + SalesTaxReport $salesTaxReport, + TaxRuleIndex $taxRuleIndexPage, + TaxRuleNew $taxRuleNewPage + ) { + $this->orderIndex = $orderIndex; + $this->orderInvoiceNew = $orderInvoiceNew; + $this->orderView = $orderView; + $this->reportStatistic = $reportStatistic; + $this->salesTaxReport = $salesTaxReport; + $this->taxRuleIndexPage = $taxRuleIndexPage; + $this->taxRuleNewPage = $taxRuleNewPage; + } + + /** + * Create tax report entity + * + * @param OrderInjectable $order + * @param TaxRule $taxRule + * @param array $report + * @param string $orderStatus + * @param string $invoice + * @return void + */ + public function test( + OrderInjectable $order, + TaxRule $taxRule, + array $report, + $orderStatus, + $invoice + ) { + // Precondition + $taxRule->persist(); + $this->taxRule = $taxRule; + $order->persist(); + $this->orderIndex->open(); + $this->orderIndex->getSalesOrderGrid()->searchAndOpen(['id' => $order->getId()]); + if ($orderStatus !== 'Pending') { + $createInvoice = $this->objectManager->create( + 'Magento\Sales\Test\TestStep\CreateInvoice', + ['order' => $order, 'data' => $invoice] + ); + $createInvoice->run(); + } + $this->reportStatistic->open(); + $this->reportStatistic->getGridBlock()->massaction( + [['report' => 'Tax']], + 'Refresh Statistics for the Last Day', + true + ); + + // Steps + $this->salesTaxReport->open(); + $this->salesTaxReport->getFilterBlock()->viewsReport($report); + $this->salesTaxReport->getActionBlock()->showReport(); + } + + /** + * Delete all tax rules after test + * + * @return void + */ + public function tearDown() + { + $deleteTaxRule = $this->objectManager->create('Magento\Tax\Test\TestStep\DeleteAllTaxRulesStep'); + $deleteTaxRule->run(); + } +} diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesTaxReportEntityTest/test.csv b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesTaxReportEntityTest/test.csv new file mode 100644 index 0000000000000000000000000000000000000000..733b7a871cd848eabe6b28f66fb232940b190b01 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesTaxReportEntityTest/test.csv @@ -0,0 +1,4 @@ +"taxRule/dataSet";"order/dataSet";"orderStatus";"report/report_type";"report/period_type";"report/from";"report/to";"report/show_order_statuses";"report/order_statuses";"report/show_empty_rows";"invoice/do_shipment";"taxAmount";"constraint";"issue" +"custom_rule";"default";"Pending";"Order Created Date";"Day";"m/d/Y";"m/d/Y";"Any";"-";"-";"No";"$46.20";"assertTaxReportNotInGrid";"" +"custom_rule";"default";"Processing";"Order Created Date";"Month";"m/d/Y";"m/d/Y";"Specified";"Processing";"-";"No";"$46.20";"assertTaxReportInGrid";"" +"custom_rule";"default";"Complete";"Order Updated Date";"Year";"m/d/Y";"m/d/Y";"Specified";"Complete";"Yes";"Yes";"$46.20";"assertTaxReportInGrid";"Bug: MAGETWO-28611" diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/etc/constraint.xml b/dev/tests/functional/tests/app/Magento/Reports/Test/etc/constraint.xml index 2b6f8a53df0c06fe1923a3c3a18a14c86df26522..176c7b60ecc4d173fb1f7c1be584bcb368cb42b8 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/etc/constraint.xml +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/etc/constraint.xml @@ -75,4 +75,13 @@ <assertCustomerOrderCountReportResult module="Magento_Reports"> <severeness>low</severeness> </assertCustomerOrderCountReportResult> + <assertTaxReportInGrid module="Magento_Reports"> + <severeness>low</severeness> + </assertTaxReportInGrid> + <assertTaxReportNotInGrid module="Magento_Reports"> + <severeness>low</severeness> + </assertTaxReportNotInGrid> + <assertDownloadsReportResult module="Magento_Reports"> + <severeness>low</severeness> + </assertDownloadsReportResult> </constraint> diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/etc/page.xml b/dev/tests/functional/tests/app/Magento/Reports/Test/etc/page.xml index 6f89be3386519703b3f10236280b77650d19ee8d..e100c4aaf969198b7f80ae6465e09d7403e29680 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/etc/page.xml +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/etc/page.xml @@ -89,4 +89,14 @@ <area>adminhtml</area> <class>Magento\Reports\Test\Page\Adminhtml\CustomerOrdersReport</class> </customerOrdersReport> + <salesTaxReport> + <mca>reports/report_sales/tax</mca> + <area>adminhtml</area> + <class>Magento\Reports\Test\Page\Adminhtml\SalesTaxReport</class> + </salesTaxReport> + <downloadsReport> + <mca>reports/report_product/downloads</mca> + <area>adminhtml</area> + <class>Magento\Reports\Test\Page\Adminhtml\DownloadsReport</class> + </downloadsReport> </page> diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityOnProductPageTest.php b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityOnProductPageTest.php index 8306fbd1a5ba6e031c978a2e02e2d313fa7ef66f..0210a25bcebee8259fff08bc224c2c4021317397 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityOnProductPageTest.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityOnProductPageTest.php @@ -162,12 +162,12 @@ class UpdateProductReviewEntityOnProductPageTest extends Injectable /** @var CatalogProductSimple $product */ $product = $this->reviewInitial->getDataFieldConfig('entity_id')['source']->getEntity(); $this->catalogProductIndex->getProductGrid()->searchAndOpen(['sku' => $product->getSku()]); - $this->catalogProductEdit->getForm()->openTab('product_reviews'); + $this->catalogProductEdit->getProductForm()->openTab('product_reviews'); $filter = [ 'title' => $this->reviewInitial->getTitle(), 'sku' => $product->getSku() ]; - $this->catalogProductEdit->getForm()->getTabElement('product_reviews')->getReviewsGrid() + $this->catalogProductEdit->getProductForm()->getTabElement('product_reviews')->getReviewsGrid() ->searchAndOpen($filter); $this->reviewEdit->getReviewForm()->fill($review); $this->reviewEdit->getPageActions()->save(); diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store.php b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store.php index bd8e0f574fbd8ee89f38432c72878e1e3b74ffc2..6cc27c442bc3d856179d8d4b0fc18cd27fc9d871 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store.php @@ -44,9 +44,10 @@ class Store extends InjectableFixture protected $defaultDataSet = [ 'group_id' => ['dataSet' => 'default'], - 'name' => 'Custom_Store_%isolation%', - 'code' => 'code_%isolation%', + 'name' => 'Default Store View', + 'code' => 'default', 'is_active' => 'Enabled', + 'store_id' => 1, ]; protected $store_id = [ diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Repository/Store.php b/dev/tests/functional/tests/app/Magento/Store/Test/Repository/Store.php index 3c76d6bf8121ac8123e5cd9f271c6f096e828e04..c440550a907361393a1f6adaab8b1c2acb78faa9 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Repository/Store.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Repository/Store.php @@ -42,6 +42,14 @@ class Store extends AbstractRepository public function __construct(array $defaultConfig = [], array $defaultData = []) { $this->_data['default'] = [ + 'group_id' => ['dataSet' => 'default'], + 'name' => 'Default Store View', + 'code' => 'base', + 'is_active' => 'Enabled', + 'store_id' => 1, + ]; + + $this->_data['custom'] = [ 'group_id' => ['dataSet' => 'default'], 'name' => 'Custom_Store_%isolation%', 'code' => 'code_%isolation%', diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreEntityTest/test.csv b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreEntityTest/test.csv index 51721d8136229e2da913e45498b27c03fcc5731f..aa364f376026f0f91deebcc0752229319590a382 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreEntityTest/test.csv +++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreEntityTest/test.csv @@ -1,3 +1,3 @@ "store/dataSet";"createBackup";"constraint" -"default";"Yes";"assertStoreSuccessDeleteAndBackupMessages, assertStoreNotInGrid, assertBackupInGrid, assertStoreNotOnFrontend" +"custom";"Yes";"assertStoreSuccessDeleteAndBackupMessages, assertStoreNotInGrid, assertBackupInGrid, assertStoreNotOnFrontend" "custom";"No";"assertStoreSuccessDeleteMessage, assertStoreNotInGrid, assertStoreNotOnFrontend" diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/StoreTest.php b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/StoreTest.php index a4fb5a0a3ec65e9bc73dc51da6b85bfba86f34e2..389e8abd8e33337023baf8dbde6b62329d223ab9 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/StoreTest.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/StoreTest.php @@ -54,7 +54,7 @@ class StoreTest extends Functional $newStorePage = Factory::getPageFactory()->getAdminSystemStoreNewStore(); $newStorePage->getStoreForm()->fill($storeFixture); $newStorePage->getFormPageActions()->save(); - $storeListPage->getMessagesBlock()->assertSuccessMessage(); + $storeListPage->getMessagesBlock()->waitSuccessMessage(); $this->assertContains( 'The store view has been saved', $storeListPage->getMessagesBlock()->getSuccessMessages() @@ -66,7 +66,7 @@ class StoreTest extends Functional $cachePage = Factory::getPageFactory()->getAdminCache(); $cachePage->open(); $cachePage->getActionsBlock()->flushCacheStorage(); - $cachePage->getMessagesBlock()->assertSuccessMessage(); + $cachePage->getMessagesBlock()->waitSuccessMessage(); $configPage = Factory::getPageFactory()->getAdminSystemConfig(); $configPage->open(); @@ -75,7 +75,7 @@ class StoreTest extends Functional $configGroup->open(); $configGroup->setValue('select-groups-locale-fields-code-value', 'German (Germany)'); $configPage->getPageActions()->save(); - $configPage->getMessagesBlock()->assertSuccessMessage(); + $configPage->getMessagesBlock()->waitSuccessMessage(); $homePage = Factory::getPageFactory()->getCmsIndexIndex(); $homePage->open(); diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateStoreEntityTest/test.csv b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateStoreEntityTest/test.csv index 87bfdcc36e2adfc620fa46fa8d267fb50ff11e78..618d1ed08a1639c467ae265fadf8a199348f890a 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateStoreEntityTest/test.csv +++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateStoreEntityTest/test.csv @@ -1,2 +1,2 @@ -"store/data/group_id/dataSet";"store/data/name";"store/data/code";"store/data/is_active";"constraint" -"default";"storename_updated%isolation%";"storecode_updated%isolation%";"Enabled";"assertStoreSuccessSaveMessage, assertStoreInGrid, assertStoreForm, assertStoreBackend, assertStoreFrontend" +"storeInitial/dataSet";"store/data/group_id/dataSet";"store/data/name";"store/data/code";"store/data/is_active";"constraint" +"custom";"default";"storename_updated%isolation%";"storecode_updated%isolation%";"Enabled";"assertStoreSuccessSaveMessage, assertStoreInGrid, assertStoreForm, assertStoreBackend, assertStoreFrontend" diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Block/Adminhtml/Rule/Grid.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Block/Adminhtml/Rule/Grid.php index 97833ff1097791758c941b422961ba854b099139..80f115c17cd953a17942746fd2a8385ee52276ac 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Block/Adminhtml/Rule/Grid.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Block/Adminhtml/Rule/Grid.php @@ -25,6 +25,7 @@ namespace Magento\Tax\Test\Block\Adminhtml\Rule; use Magento\Backend\Test\Block\Widget\Grid as GridInterface; +use Mtf\Client\Element\Locator; /** * Class Grid @@ -62,6 +63,33 @@ class Grid extends GridInterface ], ]; + /** + * First row selector + * + * @var string + */ + protected $firstRowSelector = '//tr[1]/td[@data-column="code"]'; + + /** + * Check whether first row is visible + * + * @return bool + */ + public function isFirstRowVisible() + { + return $this->_rootElement->find($this->firstRowSelector, Locator::SELECTOR_XPATH)->isVisible(); + } + + /** + * Open first item in grid + * + * @return void + */ + public function openFirstRow() + { + $this->_rootElement->find($this->firstRowSelector, Locator::SELECTOR_XPATH)->click(); + } + /** * Check if specific row exists in grid * @@ -72,7 +100,7 @@ class Grid extends GridInterface */ public function isRowVisible(array $filter, $isSearchable = false, $isStrict = true) { - $this->search(array('code' => $filter['code'])); + $this->search(['code' => $filter['code']]); return parent::isRowVisible($filter, $isSearchable); } } diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRuleEntityTest/testCreateTaxRule.csv b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRuleEntityTest/testCreateTaxRule.csv index 3b880e7f96e986298a49df1e54a34bce6c93466f..f9fda7a92c893c632855fc549b47bcdbc592e1de 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRuleEntityTest/testCreateTaxRule.csv +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRuleEntityTest/testCreateTaxRule.csv @@ -1,5 +1,5 @@ -"taxRule/data/code";"taxRule/data/tax_rate/dataSet/rate_0";"taxRule/data/tax_rate/dataSet/rate_1";"taxRule/data/tax_rate/dataSet/rate_2";"taxRule/data/tax_customer_class/dataSet/class_0";"taxRule/data/tax_customer_class/dataSet/class_1";"taxRule/data/tax_product_class/dataSet/class_0";"taxRule/data/tax_product_class/dataSet/class_1";"taxRule/data/priority";"taxRule/data/position";"constraint" -"TaxIdentifier%isolation%";"US-CA-*-Rate 1";"-";"-";"-";"-";"-";"-";"-";"-";"assertTaxRuleSuccessSaveMessage, assertTaxRuleInGrid, assertTaxRuleForm" -"TaxIdentifier%isolation%";"US-CA-*-Rate 1";"US-NY-*-Rate 1";"-";"customer_tax_class";"-";"product_tax_class";"-";1;1;"assertTaxRuleSuccessSaveMessage, assertTaxRuleInGrid, assertTaxRuleForm" -"TaxIdentifier%isolation%";"default";"US-NY-*-Rate 1";"US-CA-*-Rate 1";"Retail Customer";"customer_tax_class";"Taxable Goods";"-";"-";1;"assertTaxRuleSuccessSaveMessage, assertTaxRuleInGrid, assertTaxRuleForm" -"TaxIdentifier%isolation%";"withZipRange";"US-CA-*-Rate 1";"-";"Retail Customer";"customer_tax_class";"Taxable Goods";"product_tax_class";1;"-";"assertTaxRuleSuccessSaveMessage, assertTaxRuleInGrid, assertTaxRuleForm" +"taxRule/data/code";"taxRule/data/tax_rate/dataSet/rate_0";"taxRule/data/tax_rate/dataSet/rate_1";"taxRule/data/tax_rate/dataSet/rate_2";"taxRule/data/tax_customer_class/dataSet/class_0";"taxRule/data/tax_customer_class/dataSet/class_1";"taxRule/data/tax_product_class/dataSet/class_0";"taxRule/data/tax_product_class/dataSet/class_1";"taxRule/data/priority";"taxRule/data/position";"constraint";"issue" +"TaxIdentifier%isolation%";"US-CA-*-Rate 1";"-";"-";"-";"-";"-";"-";"-";"-";"assertTaxRuleSuccessSaveMessage, assertTaxRuleInGrid, assertTaxRuleForm";"" +"TaxIdentifier%isolation%";"US-CA-*-Rate 1";"US-NY-*-Rate 1";"-";"customer_tax_class";"-";"product_tax_class";"-";1;1;"assertTaxRuleSuccessSaveMessage, assertTaxRuleInGrid, assertTaxRuleForm";"" +"TaxIdentifier%isolation%";"default";"US-NY-*-Rate 1";"US-CA-*-Rate 1";"Retail Customer";"customer_tax_class";"Taxable Goods";"-";"-";1;"assertTaxRuleSuccessSaveMessage, assertTaxRuleInGrid, assertTaxRuleForm";"MAGETWO-28186" +"TaxIdentifier%isolation%";"withZipRange";"US-CA-*-Rate 1";"-";"Retail Customer";"customer_tax_class";"Taxable Goods";"product_tax_class";1;"-";"assertTaxRuleSuccessSaveMessage, assertTaxRuleInGrid, assertTaxRuleForm";"" diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxRuleTest.php b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxRuleTest.php index c1d1dfd028e102b8d1226ed4f3ea155fade53c10..4690b89159fa026f04c65091a63f4a3a7777675c 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxRuleTest.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxRuleTest.php @@ -57,7 +57,7 @@ class TaxRuleTest extends Functional $newTaxRulePage->getTaxRuleForm()->fill($fixture); $newTaxRulePage->getFormPageActions()->saveAndContinue(); //Verifying - $newTaxRulePage->getMessagesBlock()->assertSuccessMessage(); + $newTaxRulePage->getMessagesBlock()->waitSuccessMessage(); $this->_assertOnGrid($fixture); } diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRuleEntityTest/testUpdateTaxRule.csv b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRuleEntityTest/testUpdateTaxRule.csv index a2cf2048159962fdbd02a69353a98786f6b634e5..0e71541a4aa8547ba790342734a5e80700de2be0 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRuleEntityTest/testUpdateTaxRule.csv +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRuleEntityTest/testUpdateTaxRule.csv @@ -1,5 +1,5 @@ -"initialTaxRule/dataSet";"address/data/country_id";"address/data/region_id";"address/data/postcode";"shipping/carrier";"shipping/method";"shipping/price";"taxRule/data/code";"taxRule/data/tax_rate/dataSet/rate_0";"taxRule/data/tax_customer_class/dataSet/class_0";"taxRule/data/tax_product_class/dataSet/class_0";"taxRule/data/tax_product_class/dataSet/class_1";"taxRule/data/priority";"taxRule/data/position";"constraint" -"tax_rule_default";"-";"-";"-";"-";"-";"-";"New Tax Rule name%isolation%";"default";"customer_tax_class";"product_tax_class";"product_tax_class";"2";"2";"assertTaxRuleSuccessSaveMessage, assertTaxRuleInGrid, assertTaxRuleForm" -"tax_rule_with_custom_tax_classes";"-";"-";"-";"-";"-";"-";"-";"withZipRange";"Retail Customer";"product_tax_class";"Taxable Goods";"-";"-";"assertTaxRuleSuccessSaveMessage, assertTaxRuleInGrid, assertTaxRuleForm" -"tax_rule_with_custom_tax_classes";"United States";"Utah";84001;"Flat Rate";"Fixed";5;"-";"us_ut_fixed_zip_rate_20";"-";"product_tax_class";"-";"-";"-";"assertTaxRuleSuccessSaveMessage, assertTaxRuleInGrid, assertTaxRuleForm, assertTaxRuleIsApplied" -"tax_rule_with_custom_tax_classes";"United States";"Idaho";83201;"Flat Rate";"Fixed";5;"-";"withFixedZip";"-";"product_tax_class";"-";"-";"-";"assertTaxRuleSuccessSaveMessage, assertTaxRuleInGrid, assertTaxRuleForm, assertTaxRuleIsNotApplied" \ No newline at end of file +"initialTaxRule/dataSet";"address/data/country_id";"address/data/region_id";"address/data/postcode";"shipping/carrier";"shipping/method";"shipping/price";"taxRule/data/code";"taxRule/data/tax_rate/dataSet/rate_0";"taxRule/data/tax_customer_class/dataSet/class_0";"taxRule/data/tax_product_class/dataSet/class_0";"taxRule/data/tax_product_class/dataSet/class_1";"taxRule/data/priority";"taxRule/data/position";"constraint";"issue" +"tax_rule_default";"-";"-";"-";"-";"-";"-";"New Tax Rule name%isolation%";"default";"customer_tax_class";"product_tax_class";"product_tax_class";"2";"2";"assertTaxRuleSuccessSaveMessage, assertTaxRuleInGrid, assertTaxRuleForm";"Bug: MAGETWO-28186" +"tax_rule_with_custom_tax_classes";"-";"-";"-";"-";"-";"-";"-";"withZipRange";"Retail Customer";"product_tax_class";"Taxable Goods";"-";"-";"assertTaxRuleSuccessSaveMessage, assertTaxRuleInGrid, assertTaxRuleForm";"" +"tax_rule_with_custom_tax_classes";"United States";"Utah";84001;"Flat Rate";"Fixed";5;"-";"us_ut_fixed_zip_rate_20";"-";"product_tax_class";"-";"-";"-";"assertTaxRuleSuccessSaveMessage, assertTaxRuleInGrid, assertTaxRuleForm, assertTaxRuleIsApplied";"" +"tax_rule_with_custom_tax_classes";"United States";"Idaho";83201;"Flat Rate";"Fixed";5;"-";"withFixedZip";"-";"product_tax_class";"-";"-";"-";"assertTaxRuleSuccessSaveMessage, assertTaxRuleInGrid, assertTaxRuleForm, assertTaxRuleIsNotApplied";"" \ No newline at end of file diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestStep/DeleteAllTaxRulesStep.php b/dev/tests/functional/tests/app/Magento/Tax/Test/TestStep/DeleteAllTaxRulesStep.php new file mode 100644 index 0000000000000000000000000000000000000000..74cd91887ac71efefc24534c3ac3d7987a70f704 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestStep/DeleteAllTaxRulesStep.php @@ -0,0 +1,77 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Tax\Test\TestStep; + +use Mtf\TestStep\TestStepInterface; +use Magento\Tax\Test\Page\Adminhtml\TaxRuleNew; +use Magento\Tax\Test\Page\Adminhtml\TaxRuleIndex; + +/** + * Class DeleteAllTaxRulesStep + * Delete all Tax Rule on backend + */ +class DeleteAllTaxRulesStep implements TestStepInterface +{ + /** + * Tax Rule grid page + * + * @var TaxRuleIndex + */ + protected $taxRuleIndexPage; + + /** + * Tax Rule new and edit page + * + * @var TaxRuleNew + */ + protected $taxRuleNewPage; + + /** + * @construct + * @param TaxRuleIndex $taxRuleIndexPage + * @param TaxRuleNew $taxRuleNewPage + */ + public function __construct( + TaxRuleIndex $taxRuleIndexPage, + TaxRuleNew $taxRuleNewPage + ) { + $this->taxRuleIndexPage = $taxRuleIndexPage; + $this->taxRuleNewPage = $taxRuleNewPage; + } + + /** + * Delete Tax Rule on backend + * + * @return array + */ + public function run() + { + $this->taxRuleIndexPage->open(); + while ($this->taxRuleIndexPage->getTaxRuleGrid()->isFirstRowVisible()) { + $this->taxRuleIndexPage->getTaxRuleGrid()->openFirstRow(); + $this->taxRuleNewPage->getFormPageActions()->delete(); + } + } +} diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteInGrid.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteInGrid.php index 657a78cf308a150038ed2cd67e36439ebb62241d..6f2b70dd229c897d5f55195438de2d695f9e132d 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteInGrid.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteInGrid.php @@ -53,7 +53,7 @@ class AssertUrlRewriteInGrid extends AbstractConstraint $urlRewriteIndex->open(); $filter = ['request_path' => $urlRewrite->getRequestPath()]; \PHPUnit_Framework_Assert::assertTrue( - $urlRewriteIndex->getUrlRewriteGrid()->isRowVisible($filter), + $urlRewriteIndex->getUrlRedirectGrid()->isRowVisible($filter), 'URL Rewrite with request path \'' . $urlRewrite->getRequestPath() . '\' is absent in grid.' ); } diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteNotInGrid.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteNotInGrid.php index a82eb45919244013655199340b6488555c14b10f..8a105b3cd1b709e75aca239ed85be6e0798d2177 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteNotInGrid.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteNotInGrid.php @@ -53,7 +53,7 @@ class AssertUrlRewriteNotInGrid extends AbstractConstraint $urlRewriteIndex->open(); $filter = ['request_path' => $productRedirect->getRequestPath()]; \PHPUnit_Framework_Assert::assertFalse( - $urlRewriteIndex->getUrlRewriteGrid()->isRowVisible($filter), + $urlRewriteIndex->getUrlRedirectGrid()->isRowVisible($filter), 'URL Rewrite with request path \'' . $productRedirect->getRequestPath() . '\' is present in grid.' ); } diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.php index 0d4c8dd0911028667ea9ea4e765f6e61a93cde2a..dfa48c422a77fcfa7acdf10bf10108107401a187 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.php @@ -51,6 +51,12 @@ class UrlRewrite extends InjectableFixture 'backend_type' => 'virtual', ]; + protected $id_path = [ + 'attribute_code' => 'id_path', + 'backend_type' => 'virtual', + 'source' => 'Magento\UrlRewrite\Test\Fixture\UrlRewrite\IdPath', + ]; + protected $store_id = [ 'attribute_code' => 'store_id', 'backend_type' => 'varchar', @@ -95,6 +101,11 @@ class UrlRewrite extends InjectableFixture return $this->getData('id'); } + public function getIdPath() + { + return $this->getData('id_path'); + } + public function getStoreId() { return $this->getData('store_id'); diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite/IdPath.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite/IdPath.php new file mode 100644 index 0000000000000000000000000000000000000000..9c0905a2456f30df5f765b4caca29bff7cd18d94 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite/IdPath.php @@ -0,0 +1,124 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\UrlRewrite\Test\Fixture\UrlRewrite; + +use Mtf\Fixture\FixtureFactory; +use Mtf\Fixture\FixtureInterface; + +/** + * Class IdPath + * Prepare ID Path + */ +class IdPath implements FixtureInterface +{ + /** + * Resource data + * + * @var string + */ + protected $data; + + /** + * Return entity + * + * @var FixtureInterface + */ + protected $entity = null; + + /** + * Data set configuration settings + * + * @var array + */ + protected $params; + + /** + * @param FixtureFactory $fixtureFactory + * @param array $params + * @param array $data [optional] + */ + public function __construct(FixtureFactory $fixtureFactory, array $params, array $data = []) + { + $this->params = $params; + if (!isset($data['entity']) || $data['entity'] === '-') { + $this->data = array_shift($data); + return; + } + preg_match('`%(.*?)%`', $data['entity'], $dataSet); + $entityConfig = isset($dataSet[1]) ? explode('::', $dataSet[1]) : []; + if (count($entityConfig) > 1) { + /** @var FixtureInterface $fixture */ + $this->entity = $fixtureFactory->createByCode($entityConfig[0], ['dataSet' => $entityConfig[1]]); + $this->entity->persist(); + $id = $this->entity->hasData('id') ? $this->entity->getId() : $this->entity->getPageId(); + $this->data = preg_replace('`(%.*?%)`', $id, $data['entity']); + } else { + $this->data = strval($data['entity']); + } + } + + /** + * Persist custom selections products + * + * @return void + */ + public function persist() + { + // + } + + /** + * Return prepared data + * + * @param string|null $key + * @return string + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function getData($key = null) + { + return $this->data; + } + + /** + * Return data set configuration settings + * + * @return array + */ + public function getDataConfig() + { + return $this->params; + } + + /** + * Return entity + * + * @return FixtureInterface|null + */ + public function getEntity() + { + return $this->entity; + } +} diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewriteProduct.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewriteProduct.php index cdb1686d6f4dbe2a6632607bdcebd63ac38b0fa6..8957c0c0a582b174f9e3edfde4d37673cb992eba 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewriteProduct.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewriteProduct.php @@ -88,7 +88,7 @@ class UrlRewriteProduct extends DataFixture */ public function getProductSku() { - return $this->product->getProductSku(); + return $this->product->getSku(); } /** diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCategoryUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCategoryUrlRewriteEntityTest.php index a1f6f3f54185a7baa4db4f7ed8b8ec2c664f464a..bc4565ec8079104ccda64d4dd12bbc6b7fddb2ef 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCategoryUrlRewriteEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCategoryUrlRewriteEntityTest.php @@ -93,7 +93,7 @@ class DeleteCategoryUrlRewriteEntityTest extends Injectable } else { $filter = ['id_path' => $urlRewrite->getIdPath()]; } - $this->urlRewriteIndex->getUrlRewriteGrid()->searchAndOpen($filter); + $this->urlRewriteIndex->getUrlRedirectGrid()->searchAndOpen($filter); $this->urlRewriteEdit->getPageMainActions()->delete(); } } diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteProductUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteProductUrlRewriteEntityTest.php index eeb9c3c4cb789f7dfb2783c0208f796d904886fe..1951b270cf97c2d1f2d0596448d803ff9bf1565e 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteProductUrlRewriteEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteProductUrlRewriteEntityTest.php @@ -92,7 +92,7 @@ class DeleteProductUrlRewriteEntityTest extends Injectable // Steps $this->urlRewriteIndex->open(); $filter = ['request_path' => $productRedirect->getRequestPath()]; - $this->urlRewriteIndex->getUrlRewriteGrid()->searchAndOpen($filter); + $this->urlRewriteIndex->getUrlRedirectGrid()->searchAndOpen($filter); $this->urlRewriteEdit->getPageMainActions()->delete(); } } diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCategoryUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCategoryUrlRewriteEntityTest.php index 12fe1baed064457f944eb99fc019de65111653c2..ddcba54e68eaa208577c31d255aac2b5d8005327 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCategoryUrlRewriteEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCategoryUrlRewriteEntityTest.php @@ -106,11 +106,10 @@ class UpdateCategoryUrlRewriteEntityTest extends Injectable */ public function test(UrlRewrite $categoryRedirect, UrlRewrite $urlRewrite) { - $this->markTestIncomplete('MAGETWO-26967'); //Steps $this->urlRewriteIndex->open(); $filter = ['request_path' => $categoryRedirect->getRequestPath()]; - $this->urlRewriteIndex->getUrlRewriteGrid()->searchAndOpen($filter); + $this->urlRewriteIndex->getUrlRedirectGrid()->searchAndOpen($filter); $this->urlRewriteEdit->getFormBlock()->fill($urlRewrite); $this->urlRewriteEdit->getPageMainActions()->save(); } diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateProductUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateProductUrlRewriteEntityTest.php index d8f55f5882278e208fea9ae6ee23e76996cdff48..4053cb1c002220fcebe0a3e59787bde5560730ed 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateProductUrlRewriteEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateProductUrlRewriteEntityTest.php @@ -104,7 +104,7 @@ class UpdateProductUrlRewriteEntityTest extends Injectable //Steps $this->urlRewriteIndex->open(); $filter = ['request_path' => $productRedirect->getRequestPath()]; - $this->urlRewriteIndex->getUrlRewriteGrid()->searchAndOpen($filter); + $this->urlRewriteIndex->getUrlRedirectGrid()->searchAndOpen($filter); $this->urlRewriteEdit->getFormBlock()->fill($urlRewrite); $this->urlRewriteEdit->getPageMainActions()->save(); } diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User.php b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User.php index 1b3ce331a498da0e76c1b1a1f6939aba548e7f06..a8c13c97a9a7a16405f71ad33ab15c03589cb6e6 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User.php @@ -54,7 +54,8 @@ class User extends InjectableFixture 'lastname' => 'LastName%isolation%', 'email' => 'email%isolation%@example.com', 'password' => '123123q', - 'password_confirmation' => '123123q' + 'password_confirmation' => '123123q', + 'is_active' => 'Active' ]; protected $user_id = [ diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User/RoleId.php b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User/RoleId.php index 45705e1562a4707cd38b7a26346bda848a5ddc7d..454207e6d96efb997e7e7a1de0955d0c33ebbdd5 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User/RoleId.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User/RoleId.php @@ -62,7 +62,7 @@ class RoleId implements FixtureInterface { $this->params = $params; if (isset($data['dataSet']) && $data['dataSet'] !== '-') { - $this->role = $fixtureFactory->createByCode('adminUserRole', ['dataSet' => $data['dataSet']]); + $this->role = $fixtureFactory->createByCode('adminUserRole', ['dataSet' => $data['dataSet']]); if (!$this->role->hasData('role_id')) { $this->role->persist(); } diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Handler/AdminUserRole/Curl.php b/dev/tests/functional/tests/app/Magento/User/Test/Handler/AdminUserRole/Curl.php index e5479d2d5d54168308e01e7a26359df63f59da35..076dd848ab73286f17037530fd1770992deabbc9 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Handler/AdminUserRole/Curl.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Handler/AdminUserRole/Curl.php @@ -52,7 +52,7 @@ class Curl extends AbstractCurl implements AdminUserRoleInterface $data = $fixture->getData(); $data['all'] = ($data['resource_access'] == 'All') ? 1 : 0; if (isset($data['roles_resources'])) { - foreach ($data['roles_resources'] as $resource) { + foreach ((array)$data['roles_resources'] as $resource) { $data['resource'][] = $resource; } } diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Handler/User/Curl.php b/dev/tests/functional/tests/app/Magento/User/Test/Handler/User/Curl.php index f83b32cd87f01493c8009d1c5615b0576c41a351..3868350a95b503d1de55e32d6a4a5d7f0a677d11 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Handler/User/Curl.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Handler/User/Curl.php @@ -52,6 +52,7 @@ class Curl extends AbstractCurl implements UserInterface if ($fixture->hasData('role_id')) { $data['roles[]'] = $fixture->getDataFieldConfig('role_id')['source']->getRole()->getRoleId(); } + $data['is_active'] = (isset($data['is_active']) && ($data['is_active'] === 'Active')) ? 1 : 0; $url = $_ENV['app_backend_url'] . 'admin/user/save/active_tab/main_section/'; $curl = new BackendDecorator(new CurlTransport(), new Config); $curl->addOption(CURLOPT_HEADER, 1); diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserEntityTest.php b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserEntityTest.php index 74f2144d179e8bd205bf0dead0c26bcba2d751e4..fea0f88a6ec73225c7cd07e40eb6606911213247 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserEntityTest.php @@ -42,7 +42,7 @@ use Mtf\TestCase\Injectable; * 6. Perform assertions * * @group ACL_(MX) - * @ZephyrId MAGETWO-23413 + * @ZephyrId MAGETWO-25699 */ class CreateAdminUserEntityTest extends Injectable { diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserEntityTest/test.csv b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserEntityTest/test.csv index 178ac7b96f4cad7f72a233024be83840e08e847d..7872c32a2612cc09ed97fe6fefffccee481ca4ca 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserEntityTest/test.csv +++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserEntityTest/test.csv @@ -1,7 +1,7 @@ -"user/data/username";"user/data/firstname";"user/data/lastname";"user/data/email";"user/data/password";"user/data/password_confirmation";"user/data/is_active";"user/data/role_id/dataSet";"isDuplicated";"constraint";"user/data/current_password" -"AdminUser%isolation%";"FirstName%isolation%";"LastName%isolation%";"email%isolation%@example.com";"123123q";"123123q";"Active";"Administrators";"-";"assertUserSuccessSaveMessage, assertUserInGrid, assertUserSuccessLogOut, assertUserSuccessLogin"; "123123q" -"AdminUser%isolation%";"FirstName%isolation%";"LastName%isolation%";"email%isolation%@example.com";"123123q";"123123q";"Inactive";"Administrators";"-";"assertUserSuccessSaveMessage, assertUserInGrid, assertUserSuccessLogOut, assertUserWrongCredentialsMessage"; "123123q" -"-";"FirstName%isolation%";"LastName%isolation%";"email%isolation%@example.com";"123123q";"123123q";"Active";"Administrators";"username";"assertUserDuplicateMessage"; "123123q" -"AdminUser%isolation%";"FirstName%isolation%";"LastName%isolation%";"-";"123123q";"123123q";"Active";"Administrators";"email";"assertUserDuplicateMessage"; "123123q" -"AdminUser%isolation%";"FirstName%isolation%";"LastName%isolation%";"email%isolation%@example.com";"123123q";"123123q";"Active";"-";"-";"assertUserSuccessSaveMessage, assertUserInGrid, assertUserSuccessLogOut, assertUserWrongCredentialsMessage"; "123123q" -"AdminUser%isolation%";"FirstName%isolation%";"LastName%isolation%";"email%isolation%@example.cim";"123123q";"123123q";"Active";"-";"-";"assertUserInvalidEmailMessage"; "123123q" +"user/data/username";"user/data/firstname";"user/data/lastname";"user/data/email";"user/data/password";"user/data/password_confirmation";"user/data/is_active";"user/data/role_id/dataSet";"isDuplicated";"constraint";"user/data/current_password";"issue" +"AdminUser%isolation%";"FirstName%isolation%";"LastName%isolation%";"email%isolation%@example.com";"123123q";"123123q";"Active";"Administrators";"-";"assertUserSuccessSaveMessage, assertUserInGrid, assertUserSuccessLogOut, assertUserSuccessLogin"; "123123q";"" +"AdminUser%isolation%";"FirstName%isolation%";"LastName%isolation%";"email%isolation%@example.com";"123123q";"123123q";"Inactive";"Administrators";"-";"assertUserSuccessSaveMessage, assertUserInGrid, assertUserSuccessLogOut, assertUserWrongCredentialsMessage"; "123123q";"" +"-";"FirstName%isolation%";"LastName%isolation%";"email%isolation%@example.com";"123123q";"123123q";"Active";"Administrators";"username";"assertUserDuplicateMessage"; "123123q";"" +"AdminUser%isolation%";"FirstName%isolation%";"LastName%isolation%";"-";"123123q";"123123q";"Active";"Administrators";"email";"assertUserDuplicateMessage"; "123123q";"" +"AdminUser%isolation%";"FirstName%isolation%";"LastName%isolation%";"email%isolation%@example.com";"123123q";"123123q";"Active";"-";"-";"assertUserSuccessSaveMessage, assertUserInGrid, assertUserSuccessLogOut, assertUserWrongCredentialsMessage"; "123123q";"" +"AdminUser%isolation%";"FirstName%isolation%";"LastName%isolation%";"email%isolation%@example.cim";"123123q";"123123q";"Active";"-";"-";"assertUserInvalidEmailMessage"; "123123q";"Bug: MAGETWO-28875" diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UserLoginAfterChangingPermissionsTest.php b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UserLoginAfterChangingPermissionsTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5681cd35255f718f576b3e6fdc449dc5790d961f --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UserLoginAfterChangingPermissionsTest.php @@ -0,0 +1,165 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\User\Test\TestCase; + +use Magento\User\Test\Fixture\AdminUserRole; +use Magento\User\Test\Fixture\User; +use Magento\User\Test\Page\Adminhtml\UserEdit; +use Magento\User\Test\Page\Adminhtml\UserIndex; +use Magento\User\Test\Page\Adminhtml\UserRoleEditRole; +use Magento\User\Test\Page\Adminhtml\UserRoleIndex; +use Mtf\Fixture\FixtureFactory; +use Mtf\TestCase\Injectable; +use Magento\Backend\Test\Page\Adminhtml\Dashboard; + +/** + * Test that user can login from the first attempt just after his permissions were changed. + * + * Test Flow: + * 1. Log in as default admin user + * 2. Go to System>Permissions>User Roles + * 3. Press "+" button to start create New Role + * 4. Fill in all data according to data set + * 5. Save role + * 6. Go to System-Permissions-All Users + * 7. Press "+" button to start create new admin user + * 8. Fill in all data according to data set + * 9. Save user + * 10. Go to System>Permissions>User Roles + * 11. Open created role, and change permissions to 'all' + * 12. Log out + * 13. Log in using new admin user (before the bug was fixed, it was impossible to log in from the first attempt) + * 14. Perform assertions + * + * @group ACL_(MX) + * @ZephyrId MAGETWO-28828 + */ +class UserLoginAfterChangingPermissionsTest extends Injectable +{ + /** + * User edit page + * + * @var UserRoleIndex + */ + protected $userRoleIndex; + + /** + * Role edit page + * + * @var UserRoleEditRole + */ + protected $userRoleEditRole; + + /** + * User grid page + * + * @var UserIndex + */ + protected $userIndexPage; + + /** + * User new/edit page + * + * @var UserEdit + */ + protected $userEditPage; + + /** + * Dashboard panel + * + * @var Dashboard + */ + protected $dashboard; + + /** + * Factory for Fixtures + * + * @var FixtureFactory + */ + protected $fixtureFactory; + + /** + * Preconditions for test + * + * @param FixtureFactory $fixtureFactory + */ + public function __prepare(FixtureFactory $fixtureFactory) + { + $this->fixtureFactory = $fixtureFactory; + } + + /** + * Setup necessary data for test + * + * @param UserIndex $userIndex + * @param UserEdit $userEdit + * @param UserRoleIndex $userRoleIndex + * @param UserRoleEditRole $userRoleEditRole + * @param Dashboard $dashboard + * @return void + */ + public function __inject( + UserIndex $userIndex, + UserEdit $userEdit, + UserRoleIndex $userRoleIndex, + UserRoleEditRole $userRoleEditRole, + Dashboard $dashboard + ) { + $this->userIndexPage = $userIndex; + $this->userEditPage = $userEdit; + $this->userRoleIndex = $userRoleIndex; + $this->userRoleEditRole = $userRoleEditRole; + $this->dashboard = $dashboard; + } + + /** + * @param AdminUserRole $role + * @param AdminUserRole $updatedRole + * @param User $user + * @return void + */ + public function testLoginAfterChangingPermissions( + AdminUserRole $role, + AdminUserRole $updatedRole, + User $user + ) { + /** Create role and a new user with this role */ + $role->persist(); + /** @var User $user */ + $user = $this->fixtureFactory->create( + 'Magento\User\Test\Fixture\User', + ['data' => array_merge($user->getData(), ['role_id' => ['role' => $role]])] + ); + $user->persist(); + + /** Change the scope of resources available for the role created earlier */ + $filter = ['rolename' => $role->getRoleName()]; + $this->userRoleIndex->open(); + $this->userRoleIndex->getRoleGrid()->searchAndOpen($filter); + $this->userRoleEditRole->getRoleFormTabs()->fill($updatedRole); + $this->userRoleEditRole->getPageActions()->save(); + $this->dashboard->getAdminPanelHeader()->logOut(); + } +} diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UserLoginAfterChangingPermissionsTest/testLoginAfterChangingPermissions.csv b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UserLoginAfterChangingPermissionsTest/testLoginAfterChangingPermissions.csv new file mode 100644 index 0000000000000000000000000000000000000000..5e9b09b42cc472c2026df73458d665cf7a24036d --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UserLoginAfterChangingPermissionsTest/testLoginAfterChangingPermissions.csv @@ -0,0 +1,2 @@ +"user/dataSet";"role/data/rolename";"role/data/resource_access";"role/data/roles_resources";"updatedRole/data/rolename";"updatedRole/data/resource_access";"constraint" +"";AdminRole%isolation%;Custom;Sales;UpdatedAdminRole%isolation%;All;"assertUserSuccessLogin" diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist.php index d9cde22eebd8587e482746dafc7efebb9fbd0507..cd36571276d9f2250b1b0ead10fe0717b69e52be 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist.php @@ -60,6 +60,13 @@ class Wishlist extends Block */ protected $updateButton = '.action.update'; + /** + * Empty block css selector + * + * @var string + */ + protected $empty = '.message.info.empty'; + /** * Click button "Share Wish List" * @@ -102,4 +109,14 @@ class Wishlist extends Block { $this->_rootElement->find($this->updateButton)->click(); } + + /** + * Check empty block visible + * + * @return bool + */ + public function isEmptyBlockVisible() + { + return $this->_rootElement->find($this->empty)->isVisible(); + } } diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist/Items.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist/Items.php index 483c564b7e7453b1c2ea753ba756c6fba79b8781..2a07337e5973fa3f92699059bbeb9723dd6f0a89 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist/Items.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist/Items.php @@ -27,6 +27,7 @@ namespace Magento\Wishlist\Test\Block\Customer\Wishlist; use Mtf\Block\Block; use Mtf\Client\Element; use Mtf\Client\Element\Locator; +use Mtf\Fixture\FixtureInterface; use Magento\Wishlist\Test\Block\Customer\Wishlist\Items\Product; /** @@ -42,18 +43,38 @@ class Items extends Block */ protected $itemBlock = '//li[.//a[contains(.,"%s")]]'; + /** + * Selector for 'Remove item' button + * + * @var string + */ + protected $remove = '[data-role="remove"]'; + /** * Get item product block * - * @param string $productName + * @param FixtureInterface $product * @return Product */ - public function getItemProductByName($productName) + public function getItemProduct(FixtureInterface $product) { - $productBlock = sprintf($this->itemBlock, $productName); + $productBlock = sprintf($this->itemBlock, $product->getName()); return $this->blockFactory->create( 'Magento\Wishlist\Test\Block\Customer\Wishlist\Items\Product', ['element' => $this->_rootElement->find($productBlock, Locator::SELECTOR_XPATH)] ); } + + /** + * Remove all products from wish list + * + * @return void + */ + public function removeAllProducts() + { + while ($this->_rootElement->find($this->remove)->isVisible()) { + $this->_rootElement->find($this->remove)->click(); + $this->reinitRootElement(); + } + } } diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist/Items/Product.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist/Items/Product.php index 5570926831017e23b68e5de52bf4e4338754501f..8c0ff30f8efda0169a543ecf5164cd9e6654095a 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist/Items/Product.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist/Items/Product.php @@ -39,6 +39,13 @@ class Product extends Form */ protected $addToCart = '.action.tocart'; + /** + * Selector for 'Remove item' button + * + * @var string + */ + protected $remove = '[data-role="remove"]'; + /** * Fill item product details * @@ -60,4 +67,14 @@ class Product extends Form { $this->_rootElement->find($this->addToCart)->click(); } + + /** + * Remove product from wish list + * + * @return void + */ + public function remove() + { + $this->_rootElement->find($this->remove)->click(); + } } diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductsIsAbsentInWishlist.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductsIsAbsentInWishlist.php index c7e997387afe4275ae0c3285f950db173f29e10e..d4ee13218427dfebe3415b44ed07fb1de968b461 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductsIsAbsentInWishlist.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductsIsAbsentInWishlist.php @@ -74,10 +74,9 @@ class AssertProductsIsAbsentInWishlist extends AbstractConstraint $itemBlock = $wishlistIndex->getWishlistBlock()->getProductItemsBlock(); foreach ($products as $itemProduct) { - $productName = $itemProduct->getName(); \PHPUnit_Framework_Assert::assertFalse( - $itemBlock->getItemProductByName($productName)->isVisible(), - 'Product \'' . $productName . '\' is present in Wishlist on Frontend.' + $itemBlock->getItemProduct($itemProduct)->isVisible(), + 'Product \'' . $itemProduct->getName() . '\' is present in Wishlist on Frontend.' ); } } diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertWishlistIsEmpty.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertWishlistIsEmpty.php index 70a9e86d12fb5012fdc7ad008e506e2b28263d90..681d1ed9210efb1dcde44b6b521d574a98fd7b90 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertWishlistIsEmpty.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertWishlistIsEmpty.php @@ -24,14 +24,13 @@ namespace Magento\Wishlist\Test\Constraint; -use Mtf\Fixture\InjectableFixture; use Magento\Cms\Test\Page\CmsIndex; use Mtf\Constraint\AbstractConstraint; use Magento\Wishlist\Test\Page\WishlistIndex; /** * Class AssertWishlistIsEmpty - * Check that there are no Products in Wishlist + * Assert wish list is empty on 'My Account' page */ class AssertWishlistIsEmpty extends AbstractConstraint { @@ -43,22 +42,19 @@ class AssertWishlistIsEmpty extends AbstractConstraint protected $severeness = 'low'; /** - * Check that there are no Products in Wishlist + * Assert wish list is empty * - * @param InjectableFixture[] $products * @param CmsIndex $cmsIndex * @param WishlistIndex $wishlistIndex * @return void */ - public function processAssert(array $products, CmsIndex $cmsIndex, WishlistIndex $wishlistIndex) + public function processAssert(CmsIndex $cmsIndex, WishlistIndex $wishlistIndex) { $cmsIndex->getLinksBlock()->openLink("My Wish List"); - foreach ($products as $itemProduct) { - \PHPUnit_Framework_Assert::assertFalse( - $wishlistIndex->getItemsBlock()->getItemProductByName($itemProduct->getName())->isVisible(), - '"' . $itemProduct->getName() . '" product is present in Wishlist.' - ); - } + \PHPUnit_Framework_Assert::assertTrue( + $wishlistIndex->getWishlistBlock()->isEmptyBlockVisible(), + 'Wish list is not empty.' + ); } /** @@ -68,6 +64,6 @@ class AssertWishlistIsEmpty extends AbstractConstraint */ public function toString() { - return 'Wishlist is empty.'; + return 'Wish list is empty.'; } } diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Page/WishlistIndex.xml b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Page/WishlistIndex.xml index 9404f7bcfe1da51b573f3b6c25354124e5a37089..8a67c020d66251a5b4bdc4df4e91b80a430711f8 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Page/WishlistIndex.xml +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Page/WishlistIndex.xml @@ -35,5 +35,10 @@ <locator>#wishlist-view-form</locator> <strategy>css selector</strategy> </wishlistBlock> + <itemsBlock> + <class>Magento\Wishlist\Test\Block\Customer\Wishlist\Items</class> + <locator>.products-grid.wishlist</locator> + <strategy>css selector</strategy> + </itemsBlock> </blocks> </page> diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AbstractWishlistOnFrontend.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AbstractWishlistOnFrontend.php new file mode 100644 index 0000000000000000000000000000000000000000..65e05ac75bcadf46a1933ae1497b35475132a43e --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AbstractWishlistOnFrontend.php @@ -0,0 +1,155 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Wishlist\Test\TestCase; + +use Mtf\ObjectManager; +use Mtf\Client\Browser; +use Mtf\TestCase\Injectable; +use Mtf\Fixture\FixtureFactory; +use Magento\Cms\Test\Page\CmsIndex; +use Magento\Wishlist\Test\Page\WishlistIndex; +use Magento\Customer\Test\Fixture\CustomerInjectable; +use Magento\Catalog\Test\Page\Product\CatalogProductView; + +/** + * Class AbstractWishlistOnFrontend + * Abstract class for wish list on frontend tests + */ +abstract class AbstractWishlistOnFrontend extends Injectable +{ + /** + * Object Manager + * + * @var ObjectManager + */ + protected $objectManager; + + /** + * Cms index page + * + * @var CmsIndex + */ + protected $cmsIndex; + + /** + * Product view page + * + * @var CatalogProductView + */ + protected $catalogProductView; + + /** + * Fixture factory + * + * @var FixtureFactory + */ + protected $fixtureFactory; + + /** + * Browser + * + * @var Browser + */ + protected $browser; + + /** + * Wishlist index page + * + * @var WishlistIndex + */ + protected $wishlistIndex; + + /** + * Injection data + * + * @param CmsIndex $cmsIndex + * @param CatalogProductView $catalogProductView + * @param FixtureFactory $fixtureFactory + * @param Browser $browser + * @param WishlistIndex $wishlistIndex + * @param ObjectManager $objectManager + * @return void + */ + public function __inject( + CmsIndex $cmsIndex, + CatalogProductView $catalogProductView, + FixtureFactory $fixtureFactory, + Browser $browser, + WishlistIndex $wishlistIndex, + ObjectManager $objectManager + ) { + $this->cmsIndex = $cmsIndex; + $this->catalogProductView = $catalogProductView; + $this->fixtureFactory = $fixtureFactory; + $this->browser = $browser; + $this->wishlistIndex = $wishlistIndex; + $this->objectManager = $objectManager; + } + + /** + * Login customer + * + * @param CustomerInjectable $customer + * @return void + */ + protected function loginCustomer(CustomerInjectable $customer) + { + $loginCustomerOnFrontendStep = $this->objectManager->create( + 'Magento\Customer\Test\TestStep\LoginCustomerOnFrontendStep', + ['customer' => $customer] + ); + $loginCustomerOnFrontendStep->run(); + } + + /** + * Create products + * + * @param string $products + * @return array + */ + protected function createProducts($products) + { + $createProductsStep = $this->objectManager->create( + 'Magento\Catalog\Test\TestStep\CreateProductsStep', + ['products' => $products] + ); + + return $createProductsStep->run()['products']; + } + + /** + * Add products to wish list + * + * @param array $products + * @return void + */ + protected function addToWishlist(array $products) + { + foreach ($products as $product) { + $this->browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html'); + $this->catalogProductView->getViewBlock()->addToWishlist(); + } + } +} diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductsToCartFromCustomerWishlistOnFrontendTest.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductsToCartFromCustomerWishlistOnFrontendTest.php index cd9bcf388f725b3b2d3da37dd83304adbf996f75..7398ee2c6d7dfbb5e766c3d180a0e523f2a7d454 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductsToCartFromCustomerWishlistOnFrontendTest.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductsToCartFromCustomerWishlistOnFrontendTest.php @@ -25,14 +25,8 @@ namespace Magento\Wishlist\Test\TestCase; use Mtf\ObjectManager; -use Mtf\Client\Browser; -use Mtf\TestCase\Injectable; -use Mtf\Fixture\FixtureFactory; -use Magento\Cms\Test\Page\CmsIndex; use Magento\Checkout\Test\Fixture\Cart; -use Magento\Wishlist\Test\Page\WishlistIndex; use Magento\Customer\Test\Fixture\CustomerInjectable; -use Magento\Catalog\Test\Page\Product\CatalogProductView; /** * Test Creation for Adding products from Wishlist to Cart @@ -53,77 +47,8 @@ use Magento\Catalog\Test\Page\Product\CatalogProductView; * @group Wishlist_(CS) * @ZephyrId MAGETWO-25268 */ -class AddProductsToCartFromCustomerWishlistOnFrontendTest extends Injectable +class AddProductsToCartFromCustomerWishlistOnFrontendTest extends AbstractWishlistOnFrontend { - /** - * Object Manager - * - * @var ObjectManager - */ - protected $objectManager; - - /** - * Cms index page - * - * @var CmsIndex - */ - protected $cmsIndex; - - /** - * Product view page - * - * @var CatalogProductView - */ - protected $catalogProductView; - - /** - * Fixture factory - * - * @var FixtureFactory - */ - protected $fixtureFactory; - - /** - * Browser - * - * @var Browser - */ - protected $browser; - - /** - * Wishlist index page - * - * @var WishlistIndex - */ - protected $wishlistIndex; - - /** - * Injection data - * - * @param CmsIndex $cmsIndex - * @param CatalogProductView $catalogProductView - * @param FixtureFactory $fixtureFactory - * @param Browser $browser - * @param WishlistIndex $wishlistIndex - * @param ObjectManager $objectManager - * @return void - */ - public function __inject( - CmsIndex $cmsIndex, - CatalogProductView $catalogProductView, - FixtureFactory $fixtureFactory, - Browser $browser, - WishlistIndex $wishlistIndex, - ObjectManager $objectManager - ) { - $this->cmsIndex = $cmsIndex; - $this->catalogProductView = $catalogProductView; - $this->fixtureFactory = $fixtureFactory; - $this->browser = $browser; - $this->wishlistIndex = $wishlistIndex; - $this->objectManager = $objectManager; - } - /** * Run suggest searching result test * @@ -149,51 +74,6 @@ class AddProductsToCartFromCustomerWishlistOnFrontendTest extends Injectable return ['products' => $products, 'customer' => $customer, 'cart' => $cart]; } - /** - * Login customer - * - * @param CustomerInjectable $customer - * @return void - */ - protected function loginCustomer(CustomerInjectable $customer) - { - $loginCustomerOnFrontendStep = $this->objectManager->create( - 'Magento\Customer\Test\TestStep\LoginCustomerOnFrontendStep', - ['customer' => $customer] - ); - $loginCustomerOnFrontendStep->run(); - } - - /** - * Create products - * - * @param string $products - * @return array - */ - protected function createProducts($products) - { - $createProductsStep = $this->objectManager->create( - 'Magento\Catalog\Test\TestStep\CreateProductsStep', - ['products' => $products] - ); - - return $createProductsStep->run()['products']; - } - - /** - * Add products to wish list - * - * @param array $products - * @return void - */ - protected function addToWishlist(array $products) - { - foreach ($products as $product) { - $this->browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html'); - $this->catalogProductView->getViewBlock()->addToWishlist(); - } - } - /** * Add products from wish list to cart * @@ -206,11 +86,10 @@ class AddProductsToCartFromCustomerWishlistOnFrontendTest extends Injectable foreach ($products as $product) { $this->cmsIndex->getLinksBlock()->openLink("My Wish List"); if ($qty != '-') { - $this->wishlistIndex->getItemsBlock()->getItemProductByName($product->getName()) - ->fillProduct(['qty' => $qty]); + $this->wishlistIndex->getItemsBlock()->getItemProduct($product)->fillProduct(['qty' => $qty]); $this->wishlistIndex->getWishlistBlock()->clickUpdateWishlist(); } - $this->wishlistIndex->getItemsBlock()->getItemProductByName($product->getName())->clickAddToCart(); + $this->wishlistIndex->getItemsBlock()->getItemProduct($product)->clickAddToCart(); if (strpos($this->browser->getUrl(), 'checkout/cart/') === false) { $this->catalogProductView->getViewBlock()->addToCart($product); } diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductsToCartFromCustomerWishlistOnFrontendTest/test.csv b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductsToCartFromCustomerWishlistOnFrontendTest/test.csv index 3a96f1fbf2b62b1d4047ea93051995aac2c34d7a..b40743fd36389ded31b8fe19cc263cec7ff3a18d 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductsToCartFromCustomerWishlistOnFrontendTest/test.csv +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductsToCartFromCustomerWishlistOnFrontendTest/test.csv @@ -2,3 +2,8 @@ "catalogProductSimple::100_dollar_product";"2";"assertProductQtyInShoppingCart, assertProductsIsAbsentInWishlist" "catalogProductVirtual::50_dollar_product";"1";"assertProductQtyInShoppingCart, assertProductsIsAbsentInWishlist" "catalogProductSimple::default,catalogProductVirtual::50_dollar_product,catalogProductSimple::default,catalogProductVirtual::50_dollar_product";"-";"assertProductQtyInShoppingCart, assertWishlistIsEmpty" +"groupedProductInjectable::three_simple_products";"-";"assertProductQtyInShoppingCart, assertProductsIsAbsentInWishlist" +"downloadableProductInjectable::with_two_separately_links";"2";"assertProductQtyInShoppingCart, assertProductsIsAbsentInWishlist" +"configurableProductInjectable::default";"3";"assertProductQtyInShoppingCart, assertProductsIsAbsentInWishlist" +"bundleProduct::bundle_dynamic_product";"2";"assertProductQtyInShoppingCart, assertProductsIsAbsentInWishlist" +"bundleProduct::bundle_fixed_product";"2";"assertProductQtyInShoppingCart, assertProductsIsAbsentInWishlist" diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/DeleteProductsFromWishlistOnFrontendTest.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/DeleteProductsFromWishlistOnFrontendTest.php new file mode 100644 index 0000000000000000000000000000000000000000..82731761118ad0a2a911ccb0d3ef89591311dec1 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/DeleteProductsFromWishlistOnFrontendTest.php @@ -0,0 +1,96 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Wishlist\Test\TestCase; + +use Magento\Customer\Test\Fixture\CustomerInjectable; + +/** + * Test Creation for DeleteProductsFromWishlist + * + * Test Flow: + * + * Preconditions: + * 1. Customer registered + * 2. Products are created + * + * Steps: + * 1. Login as customer + * 2. Add products to Wishlist + * 3. Navigate to My Account -> My Wishlist + * 4. Click "Remove item" + * 5. Perform all assertions + * + * @group Wishlist_(CS) + * @ZephyrId MAGETWO-28874 + */ +class DeleteProductsFromWishlistOnFrontendTest extends AbstractWishlistOnFrontend +{ + /** + * Delete products form default wish list + * + * @param CustomerInjectable $customer + * @param string $products + * @param string $removedProductsIndex [optional] + * @return array + */ + public function test(CustomerInjectable $customer, $products, $removedProductsIndex = null) + { + // Preconditions + $customer->persist(); + $this->loginCustomer($customer); + $products = $this->createProducts($products); + $this->addToWishlist($products); + + // Steps + $this->cmsIndex->getLinksBlock()->openLink("My Wish List"); + $removeProducts = $this->removeProducts($products, $removedProductsIndex); + + return ['products' => $removeProducts, 'customer' => $customer]; + } + + /** + * Remove products from wish list + * + * @param array $products + * @param string $removedProductsIndex + * @return array + */ + protected function removeProducts(array $products, $removedProductsIndex) + { + $removeProducts = []; + if ($removedProductsIndex) { + $removedProductsIndex = explode(',', $removedProductsIndex); + foreach ($removedProductsIndex as $index) { + $this->wishlistIndex->getItemsBlock()->getItemProduct($products[--$index])->remove(); + $removeProducts[] = $products[$index]; + } + } else { + $this->wishlistIndex->getItemsBlock()->removeAllProducts(); + $removeProducts = $products; + } + + return $removeProducts; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/DeleteProductsFromWishlistOnFrontendTest/test.csv b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/DeleteProductsFromWishlistOnFrontendTest/test.csv new file mode 100644 index 0000000000000000000000000000000000000000..a07c9bb3ae23d013bf79425b16727441fc0700ff --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/DeleteProductsFromWishlistOnFrontendTest/test.csv @@ -0,0 +1,9 @@ +"products";"removedProductsIndex";"constraint" +"catalogProductSimple::100_dollar_product,catalogProductVirtual::50_dollar_product";"1";"assertProductsIsAbsentInWishlist" +"catalogProductVirtual::50_dollar_product";"1";"assertWishlistIsEmpty" +"catalogProductSimple::default,catalogProductVirtual::50_dollar_product,catalogProductSimple::default,catalogProductVirtual::50_dollar_product";"";"assertWishlistIsEmpty" +"bundleProduct::bundle_dynamic_product";"1";"assertWishlistIsEmpty" +"bundleProduct::bundle_fixed_product";"1";"assertWishlistIsEmpty" +"configurableProductInjectable::default";"1";"assertWishlistIsEmpty" +"downloadableProductInjectable::with_two_separately_links";"1";"assertWishlistIsEmpty" +"groupedProductInjectable::three_simple_products";"1";"assertWishlistIsEmpty" diff --git a/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php b/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php index 1d3538e9684aeda0385ca0069ed1223dd7da5a23..3ae21e32bfddcaff17355e29a19468efce043540 100755 --- a/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php @@ -29,6 +29,7 @@ use Magento\Customer\Service\V1; use Magento\Framework\Exception\InputException; use Magento\Framework\Exception\NoSuchEntityException; use Magento\Framework\Service\V1\Data\SearchCriteria; +use Magento\Framework\Exception\State\ExpiredException; use Magento\TestFramework\Helper\Bootstrap; /** @@ -407,15 +408,11 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase $password = 'new_password'; $this->setResetPasswordData($resetToken, 'Y-m-d'); - $this->_customerAccountService->resetPassword(1, $resetToken, $password); - //TODO assert + $this->assertTrue($this->_customerAccountService->resetPassword(1, $resetToken, $password)); } - - /** * @magentoDataFixture Magento/Customer/_files/customer.php - * @expectedException \Magento\Framework\Exception\State\ExpiredException */ public function testResetPasswordTokenExpired() { @@ -423,7 +420,12 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase $password = 'new_password'; $this->setResetPasswordData($resetToken, '1970-01-01'); - $this->_customerAccountService->resetPassword(1, $resetToken, $password); + try { + $this->_customerAccountService->resetPassword(1, $resetToken, $password); + $this->fail('Expected exception not thrown.'); + } catch (ExpiredException $e) { + $this->assertEquals('Reset password token expired.', $e->getMessage()); + } } /** diff --git a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Service/V1/Product/Option/WriteServiceTest.php b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Service/V1/Product/Option/WriteServiceTest.php index feaaac019cd48db9b9315f2c139ebe3ad7e8488d..f7b8fa6fd8ef619a0924267c1600aad4d1d70c87 100644 --- a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Service/V1/Product/Option/WriteServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Service/V1/Product/Option/WriteServiceTest.php @@ -61,6 +61,11 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase */ protected $optionBuilder; + /** + * @var \Magento\ConfigurableProduct\Service\V1\Data\Option\ValueBuilder + */ + protected $optionValueBuilder; + /** * @var \Magento\ConfigurableProduct\Service\V1\Product\Option\WriteService */ @@ -164,8 +169,12 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase ] ); - $this->optionBuilder = $this->objectManager - ->getObject('Magento\ConfigurableProduct\Service\V1\Data\OptionBuilder'); + $this->optionBuilder = $this->objectManager->getObject( + 'Magento\ConfigurableProduct\Service\V1\Data\OptionBuilder' + ); + $this->optionValueBuilder = $this->objectManager->getObject( + 'Magento\ConfigurableProduct\Service\V1\Data\Option\ValueBuilder' + ); } /** @@ -518,9 +527,9 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase } /** - * @expectedException \Magento\Webapi\Exception + * @expectedException \Magento\Framework\Exception\InputException */ - public function testRemoveWebApiException() + public function testRemoveInputException() { $productSku = 'productSku'; @@ -543,19 +552,20 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase */ private function getOption() { + $optionValueData = [ + 'index' => 1, + 'price' => 12, + 'percent' => true + ]; + $optionValue = $this->optionValueBuilder->populateWithArray($optionValueData)->create(); $data = [ Option::ID => 1, Option::ATTRIBUTE_ID => 2, Option::LABEL => 'Test Label', Option::POSITION => 1, + Option::TYPE => 'select', Option::USE_DEFAULT => true, - Option::VALUES => [ - [ - 'index' => 1, - 'price' => 12, - 'percent' => true - ] - ] + Option::VALUES => [$optionValue] ]; return $this->optionBuilder->populateWithArray($data)->create(); diff --git a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php index 3064eb42201377b1072412156df6d65cc8c334f5..71be3818d05e075c0eabb54dd0cd152160c1d149 100755 --- a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php @@ -907,7 +907,7 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase $customerService = $this->_createService(); - $customerService->resetPassword(self::ID, $resetToken, $password); + $this->assertTrue($customerService->resetPassword(self::ID, $resetToken, $password)); } public function testResetPasswordShortPassword() diff --git a/dev/tests/unit/testsuite/Magento/Integration/Oauth/OauthTest.php b/dev/tests/unit/testsuite/Magento/Integration/Oauth/OauthTest.php index 6464cf29a306ee37e63bb25629ddc7b32f10ef80..bc0e716f2a42b9ea4a3bd78b24741ccbc499def0 100644 --- a/dev/tests/unit/testsuite/Magento/Integration/Oauth/OauthTest.php +++ b/dev/tests/unit/testsuite/Magento/Integration/Oauth/OauthTest.php @@ -299,12 +299,11 @@ class OauthTest extends \PHPUnit_Framework_TestCase /** * \Magento\Framework\Oauth\OauthInterface::ERR_TIMESTAMP_REFUSED * - * @expectedException \Magento\Framework\Oauth\OauthInputException + * @expectedException \Magento\Framework\Oauth\Exception * @dataProvider dataProviderForGetRequestTokenNonceTimestampRefusedTest */ public function testGetRequestTokenOauthTimestampRefused($timestamp) { - $this->markTestIncomplete('MAGETWO-19388'); $this->_setupConsumer(); $this->_makeValidExpirationPeriod(); @@ -316,7 +315,11 @@ class OauthTest extends \PHPUnit_Framework_TestCase public function dataProviderForGetRequestTokenNonceTimestampRefusedTest() { - return array(array(0), array(time() + \Magento\Integration\Model\Oauth\Nonce\Generator::TIME_DEVIATION * 2)); + return array( + array(0), + //Adding one day deviation + array(time() + \Magento\Integration\Model\Oauth\Nonce\Generator::TIME_DEVIATION + 86400) + ); } protected function _setupNonce($isUsed = false, $timestamp = 0) diff --git a/dev/tests/unit/testsuite/Magento/Paypal/Model/ObserverTest.php b/dev/tests/unit/testsuite/Magento/Paypal/Model/ObserverTest.php index 4ebab2db2d6d5a3b1df5db695fbf2e21dd068576..8e7d2561c52af5e0067d3831b2d1ec0512742b9b 100644 --- a/dev/tests/unit/testsuite/Magento/Paypal/Model/ObserverTest.php +++ b/dev/tests/unit/testsuite/Magento/Paypal/Model/ObserverTest.php @@ -93,6 +93,7 @@ class ObserverTest extends \PHPUnit_Framework_TestCase array('createBlock') )->disableOriginalConstructor()->getMock(); $blocks = [ + 'Magento\Paypal\Block\Express\ShortcutContainer' => 'Magento\Paypal\Block\Express\Shortcut', 'Magento\Paypal\Block\Express\Shortcut' => 'Magento\Paypal\Block\Express\Shortcut', 'Magento\Paypal\Block\PayflowExpress\Shortcut' => 'Magento\Paypal\Block\Express\Shortcut', 'Magento\Paypal\Block\Bml\Shortcut' => 'Magento\Paypal\Block\Bml\Shortcut', @@ -127,10 +128,6 @@ class ObserverTest extends \PHPUnit_Framework_TestCase } $this->_event->setContainer($shortcutButtonsMock); $this->_model->addPaypalShortcuts($this->_observer); - - foreach ($blockInstances as $instance) { - $this->assertEquals(\Magento\Paypal\Model\Observer::SHORTCUT_TEMPLATE, $instance->getTemplate()); - } } public function testAddBillingAgreementToSessionNoData() diff --git a/lib/internal/Magento/Framework/AppInterface.php b/lib/internal/Magento/Framework/AppInterface.php index 99077829922bbed78229d39cd55af0941e9ecd73..d77e3162d14636b9c2e4004afd8a5ad7fbf158aa 100644 --- a/lib/internal/Magento/Framework/AppInterface.php +++ b/lib/internal/Magento/Framework/AppInterface.php @@ -35,7 +35,7 @@ interface AppInterface /** * Magento version */ - const VERSION = '0.1.0-alpha97'; + const VERSION = '0.1.0-alpha98'; /** * Launch application diff --git a/lib/internal/Magento/Framework/composer.json b/lib/internal/Magento/Framework/composer.json index 4d1fc04ca6b043851489ce92ed951e38c4956ff1..3474d1778fd7b7ac4ea31680a7b242f5c9d78577 100644 --- a/lib/internal/Magento/Framework/composer.json +++ b/lib/internal/Magento/Framework/composer.json @@ -2,7 +2,7 @@ "name": "magento/framework", "description": "N/A", "type": "magento2-library", - "version": "0.1.0-alpha97", + "version": "0.1.0-alpha98", "require": { "php": "~5.4.11|~5.5.0", "ext-spl": "*",