Skip to content

Commit 12955b1

Browse files
author
Korshenko, Olexii(okorshenko)
committed
Merge pull request #667 from magento-qmt/develop
[Mavericks] Created Web Api handlers and extended functional tests
2 parents 0925d89 + c63b306 commit 12955b1

File tree

85 files changed

+2447
-391
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+2447
-391
lines changed

dev/tests/functional/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
3-
"magento/mtf": "1.0.0-rc33",
3+
"magento/mtf": "1.0.0-rc35",
44
"php": "~5.5.0|~5.6.0|~7.0.0",
55
"phpunit/phpunit": "4.1.0",
66
"phpunit/phpunit-selenium": ">=1.2"

dev/tests/functional/etc/events.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,9 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="events.xsd">
9+
<preset name="base">
10+
<observer class="Magento\Mtf\System\Observer\WebapiResponse">
11+
<tag name="webapi_failed"/>
12+
</observer>
13+
</preset>
914
</config>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
/**
3+
* Copyright © 2015 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Mtf\System\Observer;
8+
9+
use Magento\Mtf\System\Event\Event;
10+
11+
/**
12+
* Observer for obtaining response of web api handler.
13+
*/
14+
class WebapiResponse extends AbstractObserver
15+
{
16+
/**
17+
* File name of response source.
18+
*/
19+
const FILE_NAME = 'webapi_response.log';
20+
21+
/**
22+
* Collect response source artifact to storage.
23+
*
24+
* @param Event $event
25+
* @return void
26+
*/
27+
public function process(Event $event)
28+
{
29+
$directory = $this->createDestinationDirectory('webapi-response');
30+
$this->logger->log(json_encode($event->getSubjects()[0]), $directory . '/' . $event->getIdentifier() . '.json');
31+
}
32+
}

dev/tests/functional/tests/app/Magento/Authorizenet/Test/TestCase/OnePageCheckoutTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/variations.xsd">
99
<testCase name="Magento\Checkout\Test\TestCase\OnePageCheckoutTest">
10-
<variation name="OnePageCheckoutTestVariation17" summary="Check Out as a Guest with Authorize.Net and Offline Shipping method" ticketId="MAGETWO-12832">
10+
<variation name="OnePageCheckoutAuthorizenetTestVariation1" summary="Check Out as a Guest with Authorize.Net and Offline Shipping method" ticketId="MAGETWO-12832">
1111
<data name="products" xsi:type="string">catalogProductSimple::product_10_dollar, configurableProduct::with_one_option, bundleProduct::bundle_fixed_100_dollar_product</data>
1212
<data name="taxRule" xsi:type="string">us_ca_ny_rule</data>
1313
<data name="customer/dataset" xsi:type="string">default</data>

dev/tests/functional/tests/app/Magento/Backend/Test/Block/Cache/Additional.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Additional extends Block
1919
*
2020
* @var string
2121
*/
22-
protected $flushButton = './/div/button[normalize-space(.)= "%s"]';
22+
protected $flushButton = './/button[normalize-space(.)= "%s"]';
2323

2424
/**
2525
* Flush cache in 'Additional Cache Management'.

dev/tests/functional/tests/app/Magento/Backend/Test/Page/Adminhtml/AdminCache.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
<page name="AdminCache" area="Adminhtml" mca="admin/cache/" module="Magento_Backend">
1010
<block name="messagesBlock" class="Magento\Backend\Test\Block\Messages" locator="#messages .messages" strategy="css selector"/>
1111
<block name="actionsBlock" class="Magento\Backend\Test\Block\Cache" locator="div.page-actions" strategy="css selector"/>
12-
<block name="additionalBlock" class="Magento\Backend\Test\Block\Cache\Additional" locator="div.fieldset.additional-cache-management" strategy="css selector"/>
12+
<block name="additionalBlock" class="Magento\Backend\Test\Block\Cache\Additional" locator="div.additional-cache-management" strategy="css selector"/>
1313
</page>
1414
</config>

dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct.xml

Lines changed: 11 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,50 +7,23 @@
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/Magento/Mtf/Repository/etc/repository.xsd">
99
<repository class="Magento\Bundle\Test\Repository\BundleProduct">
10-
<dataset name="BundleDynamic_sku_1073507449">
11-
<field name="sku" xsi:type="string">BundleDynamic_sku_10735074493</field>
12-
<field name="name" xsi:type="string">BundleDynamic 1073507449</field>
10+
<dataset name="default">
11+
<field name="name" xsi:type="string">Bundle dynamic product %isolation%</field>
12+
<field name="url_key" xsi:type="string">bundle-dynamic-product-%isolation%</field>
13+
<field name="sku" xsi:type="string">sku_bundle_dynamic_product_%isolation%</field>
14+
<field name="sku_type" xsi:type="string">Dynamic</field>
15+
<field name="price_type" xsi:type="string">Dynamic</field>
1316
<field name="price" xsi:type="array">
14-
<item name="price_from" xsi:type="string">1</item>
15-
<item name="price_to" xsi:type="string">2</item>
16-
</field>
17-
<field name="short_description" xsi:type="string" />
18-
<field name="description" xsi:type="string"/>
19-
<field name="tax_class_id" xsi:type="array">
20-
<item name="dataset" xsi:type="string">taxable_goods</item>
17+
<item name="dataset" xsi:type="string">bundle_dynamic_with_category</item>
2118
</field>
22-
<field name="sku_type" xsi:type="string">0</field>
23-
<field name="price_type" xsi:type="string">0</field>
24-
<field name="weight_type" xsi:type="string">0</field>
25-
<field name="status" xsi:type="string">Product online</field>
26-
<field name="shipment_type" xsi:type="string">1</field>
27-
<field name="url_key" xsi:type="string">bundle-dynamic-product-%isolation%</field>
28-
<field name="mtf_dataset_name" xsi:type="string">BundleDynamic_sku_1073507449</field>
2919
<field name="website_ids" xsi:type="array">
3020
<item name="0" xsi:type="string">Main Website</item>
3121
</field>
32-
</dataset>
33-
34-
<dataset name="BundleDynamic_sku_215249172">
35-
<field name="sku" xsi:type="string">BundleDynamic_sku_215249172</field>
36-
<field name="name" xsi:type="string">BundleDynamic 215249172</field>
37-
<field name="price" xsi:type="array">
38-
<item name="price_from" xsi:type="string">3</item>
39-
<item name="price_to" xsi:type="string">4</item>
40-
</field>
41-
<field name="short_description" xsi:type="string" />
42-
<field name="description" xsi:type="string" />
43-
<field name="tax_class_id" xsi:type="array">
44-
<item name="dataset" xsi:type="string">taxable_goods</item>
22+
<field name="bundle_selections" xsi:type="array">
23+
<item name="dataset" xsi:type="string">default_dynamic</item>
4524
</field>
46-
<field name="sku_type" xsi:type="string">0</field>
47-
<field name="weight_type" xsi:type="string">0</field>
48-
<field name="price_type" xsi:type="string">0</field>
49-
<field name="shipment_type" xsi:type="string">1</field>
50-
<field name="url_key" xsi:type="string">bundle-dynamic-product-%isolation%</field>
51-
<field name="mtf_dataset_name" xsi:type="string">BundleDynamic_sku_215249172</field>
52-
<field name="website_ids" xsi:type="array">
53-
<item name="0" xsi:type="string">Main Website</item>
25+
<field name="checkout_data" xsi:type="array">
26+
<item name="dataset" xsi:type="string">bundle_default</item>
5427
</field>
5528
</dataset>
5629

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
/**
4+
* Copyright © 2015 Magento. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../vendor/magento/mtf/etc/variations.xsd">
9+
<testCase name="Magento\Catalog\Test\TestCase\Product\DeleteProductEntityTest">
10+
<variation name="DeleteProductEntityTestVariation4">
11+
<data name="products" xsi:type="string">bundleProduct::bundle_dynamic_product</data>
12+
<data name="isRequired" xsi:type="string">Yes</data>
13+
<constraint name="Magento\Catalog\Test\Constraint\AssertProductSuccessDeleteMessage" />
14+
<constraint name="Magento\Catalog\Test\Constraint\AssertProductNotInGrid" />
15+
<constraint name="Magento\Catalog\Test\Constraint\AssertProductIsNotDisplayingOnFrontend" />
16+
</variation>
17+
<variation name="DeleteProductEntityTestVariation5">
18+
<data name="products" xsi:type="string">bundleProduct::bundle_fixed_product</data>
19+
<data name="isRequired" xsi:type="string">No</data>
20+
<constraint name="Magento\Catalog\Test\Constraint\AssertProductSuccessDeleteMessage" />
21+
<constraint name="Magento\Catalog\Test\Constraint\AssertProductNotInGrid" />
22+
<constraint name="Magento\Catalog\Test\Constraint\AssertProductIsNotDisplayingOnFrontend" />
23+
</variation>
24+
</testCase>
25+
</config>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
/**
4+
* Copyright © 2015 Magento. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/variations.xsd">
9+
<testCase name="Magento\Checkout\Test\TestCase\DeleteProductFromMiniShoppingCartTest" summary="Delete Bundle Product from Mini Shopping Cart" ticketId="MAGETWO-29104">
10+
<variation name="DeleteBundleProductFromMiniShoppingCartTestVariation">
11+
<data name="products" xsi:type="string">bundleProduct::default</data>
12+
<data name="deletedProductIndex" xsi:type="string">0</data>
13+
<constraint name="Magento\Checkout\Test\Constraint\AssertCartIsEmpty" />
14+
</variation>
15+
</testCase>
16+
</config>

dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Price.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Price extends \Magento\Catalog\Test\Block\AbstractPriceBlock
2727
'selector' => '.special-price .price',
2828
],
2929
'old_price' => [
30-
'selector' => '.old-price .price-wrapper',
30+
'selector' => '.old-price .price-wrapper ',
3131
],
3232
'price_from' => [
3333
'selector' => '.price-from .price',

0 commit comments

Comments
 (0)