Skip to content

Commit 1ea9173

Browse files
committed
Merge pull request #451 from magento-qmt/develop
[Mavericks] Move all test data to repositories
2 parents 375077a + 3a7ec70 commit 1ea9173

File tree

452 files changed

+7385
-12257
lines changed

Some content is hidden

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

452 files changed

+7385
-12257
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-rc27",
3+
"magento/mtf": "1.0.0-rc28",
44
"php": "~5.5.0|~5.6.0",
55
"phpunit/phpunit": "4.1.0",
66
"phpunit/phpunit-selenium": ">=1.2",

dev/tests/functional/lib/Magento/Mtf/Fixture/DataSource.php

Lines changed: 0 additions & 62 deletions
This file was deleted.

dev/tests/functional/phpunit.xml.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
</listeners>
3030

3131
<php>
32-
<env name="app_frontend_url" value="http://localhost/index.php/" />
33-
<env name="app_backend_url" value="http://localhost/index.php/backend/" />
32+
<env name="app_frontend_url" value="http://localhost/" />
33+
<env name="app_backend_url" value="http://localhost/backend/" />
3434
<env name="testsuite_rule" value="basic" />
3535
<env name="testsuite_rule_path" value="Magento/Mtf/TestSuite/InjectableTests" />
3636
<env name="log_directory" value="var/log" />

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@
1111
<data name="description" xsi:type="string">MAGETWO-12832 - Check Out as a Guest with Authorize.Net and Offline Shipping method</data>
1212
<data name="products" xsi:type="string">catalogProductSimple::product_10_dollar, configurableProduct::with_one_option, bundleProduct::bundle_fixed_100_dollar_product</data>
1313
<data name="taxRule" xsi:type="string">us_ca_ny_rule</data>
14-
<data name="customer/dataSet" xsi:type="string">default</data>
15-
<data name="billingAddress/dataSet" xsi:type="string">US_address_1</data>
14+
<data name="customer/dataset" xsi:type="string">default</data>
15+
<data name="billingAddress/dataset" xsi:type="string">US_address_1</data>
1616
<data name="checkoutMethod" xsi:type="string">guest</data>
1717
<data name="shipping/shipping_service" xsi:type="string">Flat Rate</data>
1818
<data name="shipping/shipping_method" xsi:type="string">Fixed</data>
1919
<data name="prices" xsi:type="array">
2020
<item name="grandTotal" xsi:type="string">156.81</item>
2121
</data>
2222
<data name="payment/method" xsi:type="string">authorizenet</data>
23-
<data name="creditCard/dataSet" xsi:type="string">visa_default</data>
23+
<data name="creditCard/dataset" xsi:type="string">visa_default</data>
2424
<data name="configData" xsi:type="string">authorizenet</data>
2525
<data name="tag" xsi:type="string">test_type:3rd_party_test</data>
2626
<constraint name="Magento\Checkout\Test\Constraint\AssertOrderSuccessPlacedMessage"/>

dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Grid.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ abstract class Grid extends Block
186186
*
187187
* @var string
188188
*/
189-
protected $rowPattern = '//tr[%s]';
189+
protected $rowPattern = '//tbody/tr[%s]';
190190

191191
/**
192192
* Get backend abstract block

dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/GlobalSearch.xml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd">
9-
<fixture name="globalSearch" module="Magento_Backend" class="Magento\Backend\Test\Fixture\GlobalSearch">
10-
<dataset name="default">
11-
<field name="query" xsi:type="string">catalogProductSimple::default::name</field>
12-
</dataset>
13-
<field name="query" source="Magento\Backend\Test\Fixture\GlobalSearch\Query"/>
14-
</fixture>
9+
<fixture name="globalSearch"
10+
module="Magento_Backend"
11+
class="Magento\Backend\Test\Fixture\GlobalSearch">
12+
<field name="query" source="Magento\Backend\Test\Fixture\GlobalSearch\Query" />
13+
</fixture>
1514
</config>

dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/GlobalSearch/Query.php

Lines changed: 9 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -6,40 +6,23 @@
66

77
namespace Magento\Backend\Test\Fixture\GlobalSearch;
88

9+
use Magento\Mtf\Fixture\DataSource;
910
use Magento\Mtf\Fixture\FixtureFactory;
10-
use Magento\Mtf\Fixture\FixtureInterface;
1111
use Magento\Mtf\Fixture\InjectableFixture;
1212

1313
/**
14-
* Class Query
15-
* Global Search query data provider
14+
* Global Search query data provider.
1615
*/
17-
class Query implements FixtureInterface
16+
class Query extends DataSource
1817
{
1918
/**
20-
* Prepared dataSet data
21-
*
22-
* @var array
23-
*/
24-
protected $data;
25-
26-
/**
27-
* Data set configuration settings
28-
*
29-
* @var array
30-
*/
31-
protected $params;
32-
33-
/**
34-
* Data source entity
19+
* Data source entity.
3520
*
3621
* @var InjectableFixture
3722
*/
3823
protected $entity = null;
3924

4025
/**
41-
* Constructor
42-
*
4326
* @constructor
4427
* @param FixtureFactory $fixtureFactory
4528
* @param string $data
@@ -54,17 +37,17 @@ public function __construct(FixtureFactory $fixtureFactory, $data, array $params
5437
$this->data = $explodedData[0];
5538
break;
5639
case 3:
57-
list($fixture, $dataSet, $field) = $explodedData;
58-
$entity = $fixtureFactory->createByCode($fixture, ['dataSet' => $dataSet]);
40+
list($fixture, $dataset, $field) = $explodedData;
41+
$entity = $fixtureFactory->createByCode($fixture, ['dataset' => $dataset]);
5942
if (!$entity->hasData('id')) {
6043
$entity->persist();
6144
}
6245
$this->data = $entity->getData($field);
6346
$this->entity = $entity;
6447
break;
6548
case 4:
66-
list($fixture, $dataSet, $source, $field) = $explodedData;
67-
$entity = $fixtureFactory->createByCode($fixture, ['dataSet' => $dataSet]);
49+
list($fixture, $dataset, $source, $field) = $explodedData;
50+
$entity = $fixtureFactory->createByCode($fixture, ['dataset' => $dataset]);
6851
if (!$entity->hasData('id')) {
6952
$entity->persist();
7053
}
@@ -76,45 +59,12 @@ public function __construct(FixtureFactory $fixtureFactory, $data, array $params
7659
}
7760

7861
/**
79-
* Persist order products
80-
*
81-
* @return void
82-
*/
83-
public function persist()
84-
{
85-
//
86-
}
87-
88-
/**
89-
* Return prepared data set
90-
*
91-
* @param string $key [optional]
92-
* @return mixed
93-
*
94-
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
95-
*/
96-
public function getData($key = null)
97-
{
98-
return $this->data;
99-
}
100-
101-
/**
102-
* Get entity for global search
62+
* Get entity for global search.
10363
*
10464
* @return InjectableFixture
10565
*/
10666
public function getEntity()
10767
{
10868
return $this->entity;
10969
}
110-
111-
/**
112-
* Return data set configuration settings
113-
*
114-
* @return string
115-
*/
116-
public function getDataConfig()
117-
{
118-
return $this->params;
119-
}
12070
}

dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Source/Date.php

Lines changed: 4 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,18 @@
66

77
namespace Magento\Backend\Test\Fixture\Source;
88

9-
use Magento\Mtf\Fixture\FixtureInterface;
9+
use Magento\Mtf\Fixture\DataSource;
1010

1111
/**
12-
* Class Date
12+
* Class Date.
1313
*
1414
* Data keys:
1515
* - pattern (Format a local time/date with delta, e.g. 'm-d-Y -3 days' = current day - 3 days)
1616
*/
17-
class Date implements FixtureInterface
17+
class Date extends DataSource
1818
{
1919
/**
20-
* Date for fill on form
21-
*
22-
* @var string
23-
*/
24-
protected $data;
25-
26-
/**
20+
* @constructor
2721
* @param array $params
2822
* @param array $data
2923
* @throws \Exception
@@ -48,37 +42,4 @@ public function __construct(array $params, array $data = [])
4842
$this->data = $date;
4943
}
5044
}
51-
52-
/**
53-
* Persists prepared data into application
54-
*
55-
* @return void
56-
*/
57-
public function persist()
58-
{
59-
//
60-
}
61-
62-
/**
63-
* Return prepared data set
64-
*
65-
* @param $key [optional]
66-
* @return mixed
67-
*
68-
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
69-
*/
70-
public function getData($key = null)
71-
{
72-
return $this->data;
73-
}
74-
75-
/**
76-
* Return data set configuration settings
77-
*
78-
* @return string
79-
*/
80-
public function getDataConfig()
81-
{
82-
return $this->params;
83-
}
8445
}

dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/GlobalSearchEntityTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* Steps:
2020
* 1. Login to backend
2121
* 2. Click on Search button on the top of page
22-
* 3. Fill in data according dataSet
22+
* 3. Fill in data according dataset
2323
* 4. Perform assertions
2424
*
2525
* @group Search_Core_(MX)
@@ -58,7 +58,7 @@ public function __inject(Dashboard $dashboard)
5858
*/
5959
public function test(GlobalSearch $search)
6060
{
61-
//Steps:
61+
// Steps:
6262
$this->dashboard->open();
6363
$this->dashboard->getAdminPanelHeader()->search($search->getQuery());
6464
}

dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleInCategory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class AssertBundleInCategory extends AssertProductInCategory
2727
protected function assertPrice(FixtureInterface $bundle, CatalogCategoryView $catalogCategoryView)
2828
{
2929
/** @var BundleProduct $bundle */
30-
$priceData = $bundle->getDataFieldConfig('price')['source']->getPreset();
30+
$priceData = $bundle->getDataFieldConfig('price')['source']->getPriceData();
3131
//Price from/to verification
3232
$priceBlock = $catalogCategoryView->getListProductBlock()->getProductItem($bundle)->getPriceBlock();
3333

dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleItemsOnProductPage.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@
1212
use Magento\Mtf\Constraint\AbstractAssertForm;
1313

1414
/**
15-
* Class AssertBundleItemsOnProductPage
16-
* Assert that displayed product bundle items data on product page equals passed from fixture preset
15+
* Assert that displayed product bundle items data on product page equals passed from fixture
1716
*/
1817
class AssertBundleItemsOnProductPage extends AbstractAssertForm
1918
{
2019
/**
21-
* Assert that displayed product bundle items data on product page equals passed from fixture preset
20+
* Assert that displayed product bundle items data on product page equals passed from fixture.
2221
*
2322
* @param CatalogProductView $catalogProductView
2423
* @param BundleProduct $product
@@ -48,7 +47,7 @@ public function processAssert(
4847
}
4948

5049
/**
51-
* Prepare bundle options
50+
* Prepare bundle options.
5251
*
5352
* @param BundleProduct $product
5453
* @return array
@@ -89,12 +88,12 @@ protected function prepareBundleOptions(BundleProduct $product)
8988
}
9089

9190
/**
92-
* Return Text if displayed on frontend equals with fixture
91+
* Return Text if displayed on frontend equals with fixture.
9392
*
9493
* @return string
9594
*/
9695
public function toString()
9796
{
98-
return 'Bundle options data on product page equals to passed from fixture preset.';
97+
return 'Bundle options data on product page equals to passed from fixture dataset.';
9998
}
10099
}

dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundlePriceType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ protected function assertPrice(
112112
'Bundle item ' . ($index + 1) . ' options on frontend don\'t equal to fixture.'
113113
);
114114
}
115-
$sumOptionsPrice = $product->getDataFieldConfig('price')['source']->getPreset()['cart_price'];
115+
$sumOptionsPrice = $product->getDataFieldConfig('price')['source']->getPriceData()['cart_price'];
116116

117117
$subTotal = number_format($cartItem->getPrice(), 2);
118118
\PHPUnit_Framework_Assert::assertEquals(

dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundlePriceView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function processAssert(
4545
*/
4646
protected function assertPrice(BundleProduct $product, CatalogProductView $catalogProductView)
4747
{
48-
$priceData = $product->getDataFieldConfig('price')['source']->getPreset();
48+
$priceData = $product->getDataFieldConfig('price')['source']->getPriceData();
4949
$priceView = $product->getPriceView();
5050
$priceBlock = $catalogProductView->getViewBlock()->getPriceBlock();
5151

0 commit comments

Comments
 (0)