File tree Expand file tree Collapse file tree 5 files changed +17
-19
lines changed
Block/Adminhtml/Product/Attribute
Block/Adminhtml/Product/Edit/Tab/Super/Config Expand file tree Collapse file tree 5 files changed +17
-19
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"require" : {
3
- "magento/mtf" : " 1.0.0-rc19 " ,
3
+ "magento/mtf" : " 1.0.0-rc20 " ,
4
4
"php" : " ~5.5.0|~5.6.0" ,
5
5
"phpunit/phpunit" : " 4.1.0" ,
6
6
"phpunit/phpunit-selenium" : " >=1.2" ,
Original file line number Diff line number Diff line change 6
6
7
7
namespace Magento \Catalog \Test \Block \Adminhtml \Product \Attribute ;
8
8
9
- use Magento \Backend \Test \Block \Widget \Tab ;
10
9
use Magento \Backend \Test \Block \Widget \FormTabs ;
10
+ use Magento \Backend \Test \Block \Widget \Tab ;
11
+ use Magento \Mtf \Block \BlockFactory ;
12
+ use Magento \Mtf \Block \Mapper ;
11
13
use Magento \Mtf \Client \BrowserInterface ;
12
- use Magento \Mtf \Client \Element \SimpleElement ;
13
14
use Magento \Mtf \Client \Element ;
15
+ use Magento \Mtf \Client \Element \SimpleElement ;
14
16
use Magento \Mtf \Client \Locator ;
15
17
use Magento \Mtf \Fixture \FixtureInterface ;
16
- use Magento \Mtf \Block \BlockFactory ;
17
- use Magento \Mtf \Block \Mapper ;
18
18
use Magento \Mtf \Util \XmlConverter ;
19
19
20
20
/**
@@ -64,14 +64,6 @@ public function __construct(
64
64
$ this ->browser ->switchToFrame (new Locator ($ this ->iFrame ));
65
65
}
66
66
67
- /**
68
- * @destructor
69
- */
70
- public function __destruct ()
71
- {
72
- $ this ->browser ->switchToFrame ();
73
- }
74
-
75
67
/**
76
68
* Fill the attribute form.
77
69
*
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ protected function verifySku()
150
150
$ fixtureProductSku = $ this ->product ->getSku ();
151
151
$ formProductSku = $ this ->productView ->getProductSku ();
152
152
153
- if ($ fixtureProductSku == $ formProductSku ) {
153
+ if ($ fixtureProductSku === null || $ fixtureProductSku == $ formProductSku ) {
154
154
return null ;
155
155
}
156
156
return "Displayed product sku on product page(front-end) not equals passed from fixture. "
Original file line number Diff line number Diff line change 6
6
7
7
namespace Magento \ConfigurableProduct \Test \Block \Adminhtml \Product \Edit \Tab \Super \Config ;
8
8
9
- use Magento \Mtf \Client \Locator ;
10
9
use Magento \Backend \Test \Block \Widget \Form ;
11
- use Magento \Mtf \Client \Element \SimpleElement ;
12
10
use Magento \ConfigurableProduct \Test \Block \Adminhtml \Product \Edit \Tab \Super \Config \Attribute \AttributeSelector ;
11
+ use Magento \Mtf \Client \Element \SimpleElement ;
12
+ use Magento \Mtf \Client \Locator ;
13
+ use Magento \Mtf \ObjectManager ;
13
14
14
15
/**
15
16
* Attribute block in Variation section.
@@ -158,13 +159,17 @@ public function fillAttributes(array $attributes)
158
159
*/
159
160
protected function createNewVariationSet (array $ attribute )
160
161
{
161
- $ this ->_rootElement ->find ($ this ->createNewVariationSet )->click ();
162
+ $ attributeFixture = ObjectManager::getInstance ()->create (
163
+ 'Magento\Catalog\Test\Fixture\CatalogProductAttribute ' ,
164
+ ['data ' => $ attribute ]
165
+ );
162
166
167
+ $ this ->_rootElement ->find ($ this ->createNewVariationSet )->click ();
163
168
$ newAttribute = $ this ->getEditAttributeForm ();
164
- $ newAttribute ->getTabElement ( ' properties ' )-> fillFormTab ( $ attribute );
169
+ $ newAttribute ->fill ( $ attributeFixture );
165
170
$ newAttribute ->_rootElement ->find ($ this ->saveAttribute )->click ();
166
171
167
- $ this ->browser ->selectWindow ();
172
+ $ this ->browser ->switchToFrame ();
168
173
}
169
174
170
175
/**
Original file line number Diff line number Diff line change 120
120
<data name =" product/data/price/value" xsi : type =" string" >100</data >
121
121
<data name =" product/data/category_ids/new_category" xsi : type =" string" >no</data >
122
122
<data name =" product/data/category_ids/presets" xsi : type =" string" >default_subcategory</data >
123
+ <data name =" product/data/url_key" xsi : type =" string" >configurable-product-%isolation%</data >
123
124
<data name =" product/data/affected_attribute_set" xsi : type =" string" >custom_attribute_set_%isolation%</data >
124
125
<data name =" tag" xsi : type =" string" >test_type:acceptance_test</data >
125
126
<constraint name =" Magento\Catalog\Test\Constraint\AssertProductSaveMessage" />
You can’t perform that action at this time.
0 commit comments