File tree Expand file tree Collapse file tree 7 files changed +69
-51
lines changed
dev/tests/functional/tests/app/Magento
Checkout/Test/Block/Onepage Expand file tree Collapse file tree 7 files changed +69
-51
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,13 @@ class Shipping extends Form
36
36
*/
37
37
private $ addressModalBlock = '//*[@id="opc-new-shipping-address"]/../.. ' ;
38
38
39
+ /**
40
+ * Selected Shipping Address block CSS Selector
41
+ *
42
+ * @var string
43
+ */
44
+ private $ selectedShippingAddressBlock = '.shipping-address-item.selected-item ' ;
45
+
39
46
/**
40
47
* Click on "New Address" button.
41
48
*
@@ -69,4 +76,14 @@ public function getRequiredFields()
69
76
{
70
77
return $ this ->_rootElement ->getElements ("div .field._required " );
71
78
}
79
+
80
+ /**
81
+ * Get content of selected Shipping Address Block.
82
+ *
83
+ * @return string
84
+ */
85
+ public function getSelectedShippingAddressContent ()
86
+ {
87
+ return $ this ->_rootElement ->find ($ this ->selectedShippingAddressBlock )->getText ();
88
+ }
72
89
}
Original file line number Diff line number Diff line change @@ -65,4 +65,20 @@ public function getErrorMessages()
65
65
66
66
return $ result ;
67
67
}
68
+
69
+ /**
70
+ * Fixture mapping.
71
+ *
72
+ * @param array|null $fields
73
+ * @param string|null $parent
74
+ * @return array
75
+ */
76
+ protected function dataMapping (array $ fields = null , $ parent = null )
77
+ {
78
+ if (isset ($ fields ['custom_attribute ' ])) {
79
+ $ this ->placeholders = ['attribute_code ' => $ fields ['custom_attribute ' ]['code ' ]];
80
+ $ this ->applyPlaceholders ();
81
+ }
82
+ return parent ::dataMapping ($ fields , $ parent );
83
+ }
68
84
}
Original file line number Diff line number Diff line change 22
22
</country_id >
23
23
<telephone />
24
24
<postcode />
25
+ <custom_attribute >
26
+ <selector >[name="custom_attributes[%attribute_code%]"]</selector >
27
+ </custom_attribute >
25
28
</fields >
26
29
</mapping >
Original file line number Diff line number Diff line change @@ -61,4 +61,20 @@ public function saveAddress()
61
61
{
62
62
$ this ->_rootElement ->find ($ this ->saveAddress )->click ();
63
63
}
64
+
65
+ /**
66
+ * Fixture mapping.
67
+ *
68
+ * @param array|null $fields
69
+ * @param string|null $parent
70
+ * @return array
71
+ */
72
+ protected function dataMapping (array $ fields = null , $ parent = null )
73
+ {
74
+ if (isset ($ fields ['custom_attribute ' ])) {
75
+ $ this ->placeholders = ['attribute_code ' => $ fields ['custom_attribute ' ]['code ' ]];
76
+ $ this ->applyPlaceholders ();
77
+ }
78
+ return parent ::dataMapping ($ fields , $ parent );
79
+ }
64
80
}
Original file line number Diff line number Diff line change 26
26
<postcode >
27
27
<selector >#zip</selector >
28
28
</postcode >
29
+ <!--
30
+ <custom_attribute>
31
+ <selector>[id="%attribute_code%"]</selector>
32
+ </custom_attribute>
33
+ -->
29
34
</fields >
30
35
</mapping >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+ <!--
3
+ /**
4
+ * Copyright © 2016 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/pages.xsd" >
9
+ <page name =" CustomerAddressEdit" mca =" customer/address/edit" module =" Magento_Customer" >
10
+ <block name =" editForm" class =" Magento\Customer\Test\Block\Address\Edit" locator =" #form-validate" strategy =" css selector" />
11
+ </page >
12
+ </config >
You can’t perform that action at this time.
0 commit comments