Skip to content

Commit 086ccd5

Browse files
authored
Merge pull request #6459 from magento-lynx/MC-39548
[lynx] MC-39045: Test for Compatibility with the New PHP Versions [2.3]
2 parents fd2eb48 + a35ee54 commit 086ccd5

File tree

10 files changed

+181
-40
lines changed

10 files changed

+181
-40
lines changed

app/code/Magento/Braintree/Test/Mftf/Data/BraintreeData.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,12 @@
134134
<entity name="PaymentAndShippingInfo" type="data">
135135
<data key="cardNumber">5105105105105100</data>
136136
<data key="month">12</data>
137-
<data key="year">20</data>
137+
<data key="year">30</data>
138138
<data key="cvv">113</data>
139139
</entity>
140140
<entity name="StoredPaymentMethods">
141141
<data key="cardNumberEnding">5100</data>
142-
<data key="cardExpire">12/2020</data>
142+
<data key="cardExpire">12/2030</data>
143143
</entity>
144144
<entity name="VisaDefaultCard" type="data">
145145
<data key="cardNumber">4111111111111111</data>

app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductStatusStoreViewScopeTest.xml

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,19 @@
2323
<before>
2424
<actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/>
2525

26+
<actionGroup ref="deleteAllProductsUsingProductGrid" stepKey="deleteAllProducts"/>
27+
2628
<!--Create Website -->
2729
<actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createAdditionalWebsite">
28-
<argument name="newWebsiteName" value="Second Website"/>
29-
<argument name="websiteCode" value="second_website"/>
30+
<argument name="newWebsiteName" value="{{customWebsite.name}}"/>
31+
<argument name="websiteCode" value="{{customWebsite.code}}"/>
3032
</actionGroup>
3133

3234
<!--Create Store -->
3335
<actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createNewStore">
34-
<argument name="website" value="Second Website"/>
35-
<argument name="storeGroupName" value="Second Store"/>
36-
<argument name="storeGroupCode" value="second_store"/>
36+
<argument name="website" value="{{customWebsite.name}}"/>
37+
<argument name="storeGroupName" value="{{customStoreGroup.name}}"/>
38+
<argument name="storeGroupCode" value="{{customStoreGroup.code}}"/>
3739
</actionGroup>
3840

3941
<!--Create Store view -->
@@ -42,7 +44,7 @@
4244
<click selector="{{AdminStoresMainActionsSection.createStoreViewButton}}" stepKey="createStoreViewButton"/>
4345
<waitForPageLoad stepKey="waitForProductPageLoad"/>
4446
<waitForElementVisible selector="//legend[contains(., 'Store View Information')]" stepKey="waitForNewStorePageToOpen"/>
45-
<selectOption userInput="Second Store" selector="{{AdminNewStoreSection.storeGrpDropdown}}" stepKey="selectStoreGroup"/>
47+
<selectOption userInput="{{customStoreGroup.name}}" selector="{{AdminNewStoreSection.storeGrpDropdown}}" stepKey="selectStoreGroup"/>
4648
<fillField userInput="Second Store View" selector="{{AdminNewStoreSection.storeNameTextField}}" stepKey="fillStoreViewName"/>
4749
<fillField userInput="second_store_view" selector="{{AdminNewStoreSection.storeCodeTextField}}" stepKey="fillStoreViewCode"/>
4850
<selectOption selector="{{AdminNewStoreSection.statusDropdown}}" userInput="1" stepKey="enableStoreViewStatus"/>
@@ -57,21 +59,25 @@
5759
<!--Create a Simple Product 1 -->
5860
<actionGroup ref="createSimpleProductAndAddToWebsite" stepKey="createSimpleProduct1">
5961
<argument name="product" value="simpleProductForMassUpdate"/>
60-
<argument name="website" value="Second Website"/>
62+
<argument name="website" value="{{customWebsite.name}}"/>
6163
</actionGroup>
6264

6365
<!--Create a Simple Product 2 -->
6466
<actionGroup ref="createSimpleProductAndAddToWebsite" stepKey="createSimpleProduct2">
6567
<argument name="product" value="simpleProductForMassUpdate2"/>
66-
<argument name="website" value="Second Website"/>
68+
<argument name="website" value="{{customWebsite.name}}"/>
6769
</actionGroup>
6870
</before>
6971
<after>
72+
<actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearFilters"/>
73+
7074
<!--Delete website -->
7175
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteSecondWebsite">
72-
<argument name="websiteName" value="Second Website"/>
76+
<argument name="websiteName" value="{{customWebsite.name}}"/>
7377
</actionGroup>
78+
7479
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/>
80+
<waitForPageLoad stepKey="waitForProductGridPageLoad"/>
7581

7682
<!--Delete Products -->
7783
<actionGroup ref="DeleteProductActionGroup" stepKey="deleteProduct1">
@@ -80,6 +86,7 @@
8086
<actionGroup ref="DeleteProductActionGroup" stepKey="deleteProduct2">
8187
<argument name="productName" value="simpleProductForMassUpdate2.name"/>
8288
</actionGroup>
89+
8390
<actionGroup ref="logout" stepKey="amOnLogoutPage"/>
8491
</after>
8592

@@ -105,6 +112,10 @@
105112
<click selector="{{AdminProductGridSection.bulkActionOption('Disable')}}" stepKey="clickDisabled"/>
106113
<waitForPageLoad stepKey="waitForBulkUpdatePage"/>
107114

115+
<actionGroup ref="AdminFilterStoreViewActionGroup" stepKey="filterStoreViewAgain" >
116+
<argument name="customStore" value="'Second Store View'" />
117+
</actionGroup>
118+
108119
<!-- Verify Product Statuses -->
109120
<see selector="{{AdminProductGridSection.productGridContentsOnRow('1')}}" userInput="Enabled" stepKey="checkIfProduct1IsEnabled"/>
110121
<see selector="{{AdminProductGridSection.productGridContentsOnRow('2')}}" userInput="Disabled" stepKey="checkIfProduct2IsDisabled"/>
@@ -157,7 +168,7 @@
157168
</actionGroup>
158169
<actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResultDefault2"/>
159170
<see userInput="We can't find any items matching these search criteria." selector="{{StorefrontCatalogSearchAdvancedResultMainSection.message}}" stepKey="seeInDefault2"/>
160-
</test>
171+
</test>
161172
<test name="AdminMassUpdateProductStatusStoreViewScopeMysqlTest">
162173
<annotations>
163174
<features value="Catalog"/>
@@ -173,17 +184,19 @@
173184
<before>
174185
<actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/>
175186

187+
<actionGroup ref="deleteAllProductsUsingProductGrid" stepKey="deleteAllProducts"/>
188+
176189
<!--Create Website -->
177190
<actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createAdditionalWebsite">
178-
<argument name="newWebsiteName" value="Second Website"/>
179-
<argument name="websiteCode" value="second_website"/>
191+
<argument name="newWebsiteName" value="{{customWebsite.name}}"/>
192+
<argument name="websiteCode" value="{{customWebsite.code}}"/>
180193
</actionGroup>
181194

182195
<!--Create Store -->
183196
<actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createNewStore">
184-
<argument name="website" value="Second Website"/>
185-
<argument name="storeGroupName" value="Second Store"/>
186-
<argument name="storeGroupCode" value="second_store"/>
197+
<argument name="website" value="{{customWebsite.name}}"/>
198+
<argument name="storeGroupName" value="{{customStoreGroup.name}}"/>
199+
<argument name="storeGroupCode" value="{{customStoreGroup.code}}"/>
187200
</actionGroup>
188201

189202
<!--Create Store view -->
@@ -192,7 +205,7 @@
192205
<click selector="{{AdminStoresMainActionsSection.createStoreViewButton}}" stepKey="createStoreViewButton"/>
193206
<waitForPageLoad stepKey="waitForProductPageLoad"/>
194207
<waitForElementVisible selector="//legend[contains(., 'Store View Information')]" stepKey="waitForNewStorePageToOpen"/>
195-
<selectOption userInput="Second Store" selector="{{AdminNewStoreSection.storeGrpDropdown}}" stepKey="selectStoreGroup"/>
208+
<selectOption userInput="{{customStoreGroup.name}}" selector="{{AdminNewStoreSection.storeGrpDropdown}}" stepKey="selectStoreGroup"/>
196209
<fillField userInput="Second Store View" selector="{{AdminNewStoreSection.storeNameTextField}}" stepKey="fillStoreViewName"/>
197210
<fillField userInput="second_store_view" selector="{{AdminNewStoreSection.storeCodeTextField}}" stepKey="fillStoreViewCode"/>
198211
<selectOption selector="{{AdminNewStoreSection.statusDropdown}}" userInput="1" stepKey="enableStoreViewStatus"/>
@@ -207,19 +220,21 @@
207220
<!--Create a Simple Product 1 -->
208221
<actionGroup ref="createSimpleProductAndAddToWebsite" stepKey="createSimpleProduct1">
209222
<argument name="product" value="simpleProductForMassUpdate"/>
210-
<argument name="website" value="Second Website"/>
223+
<argument name="website" value="{{customWebsite.name}}"/>
211224
</actionGroup>
212225

213226
<!--Create a Simple Product 2 -->
214227
<actionGroup ref="createSimpleProductAndAddToWebsite" stepKey="createSimpleProduct2">
215228
<argument name="product" value="simpleProductForMassUpdate2"/>
216-
<argument name="website" value="Second Website"/>
229+
<argument name="website" value="{{customWebsite.name}}"/>
217230
</actionGroup>
218231
</before>
219232
<after>
233+
<actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearFilters"/>
234+
220235
<!--Delete website -->
221236
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteSecondWebsite">
222-
<argument name="websiteName" value="Second Website"/>
237+
<argument name="websiteName" value="{{customWebsite.name}}"/>
223238
</actionGroup>
224239
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/>
225240

@@ -255,6 +270,10 @@
255270
<click selector="{{AdminProductGridSection.bulkActionOption('Disable')}}" stepKey="clickDisabled"/>
256271
<waitForPageLoad stepKey="waitForBulkUpdatePage"/>
257272

273+
<actionGroup ref="AdminFilterStoreViewActionGroup" stepKey="filterStoreViewAgain" >
274+
<argument name="customStore" value="'Second Store View'" />
275+
</actionGroup>
276+
258277
<!-- Verify Product Statuses -->
259278
<see selector="{{AdminProductGridSection.productGridContentsOnRow('1')}}" userInput="Enabled" stepKey="checkIfProduct1IsEnabled"/>
260279
<see selector="{{AdminProductGridSection.productGridContentsOnRow('2')}}" userInput="Disabled" stepKey="checkIfProduct2IsDisabled"/>
@@ -299,4 +318,4 @@
299318
<actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResultDefault2"/>
300319
<see userInput="We can't find any items matching these search criteria." selector="{{StorefrontCatalogSearchAdvancedResultMainSection.message}}" stepKey="seeInDefault2"/>
301320
</test>
302-
</tests>
321+
</tests>

app/code/Magento/Checkout/Test/Mftf/ActionGroup/AssertStorefronElementVisibleActionGroup.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
<argument name="selector" type="string"/>
1717
<argument name="userInput" type="string"/>
1818
</arguments>
19-
19+
20+
<waitForElementVisible selector="{{selector}}" time="60" stepKey="waitForElementVisible"/>
2021
<see selector="{{selector}}" userInput="{{userInput}}" stepKey="assertElement"/>
2122
</actionGroup>
2223
</actionGroups>

app/code/Magento/Checkout/Test/Mftf/ActionGroup/AssertStorefrontCheckoutCartItemsActionGroup.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
<argument name="subtotal" type="string"/>
2020
<argument name="qty" type="string"/>
2121
</arguments>
22-
22+
23+
<waitForElementVisible selector="{{CheckoutCartProductSection.productName}}" time="60" stepKey="waitForProductNameVisible"/>
2324
<see selector="{{CheckoutCartProductSection.productName}}" userInput="{{productName}}" stepKey="seeProductNameInCheckoutSummary"/>
2425
<see selector="{{CheckoutCartProductSection.checkoutCartProductPrice}}" userInput="{{productPrice}}" stepKey="seeProductPriceInCart"/>
2526
<see selector="{{CheckoutCartProductSection.checkoutCartSubtotal}}" userInput="{{subtotal}}" stepKey="seeSubtotalPrice"/>

app/code/Magento/Checkout/Test/Mftf/ActionGroup/AssertStorefrontShoppingCartSummaryWithShippingActionGroup.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
<argument name="shipping" type="string"/>
1717
</arguments>
1818

19-
<waitForElementVisible selector="{{CheckoutCartSummarySection.shipping}}" time="60" after="assertSubtotal" stepKey="waitForShippingElementToBeVisible"/>
20-
<waitForText userInput="{{shipping}}" selector="{{CheckoutCartSummarySection.shipping}}" time="30" after="waitForShippingElementToBeVisible" stepKey="assertShipping"/>
19+
<waitForElementVisible selector="{{CheckoutCartSummarySection.shipping}}" after="assertSubtotal" stepKey="waitForShippingElementToBeVisible"/>
20+
<reloadPage stepKey="reloadPage" after="waitForShippingElementToBeVisible" />
21+
<waitForPageLoad after="reloadPage" stepKey="WaitForPageLoaded" />
22+
<waitForText userInput="{{shipping}}" selector="{{CheckoutCartSummarySection.shipping}}" time="30" after="WaitForPageLoaded" stepKey="assertShipping"/>
2123
</actionGroup>
2224
</actionGroups>

app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontFreeShippingRecalculationAfterCouponCodeAddedTest.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,17 @@
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
1010
<test name="StoreFrontFreeShippingRecalculationAfterCouponCodeAddedTest">
1111
<annotations>
12-
<title value="Checkout Free Shipping Recalculation after Coupon Code Added"/>
12+
<title value="DEPRECATED. Checkout Free Shipping Recalculation after Coupon Code Added"/>
1313
<stories value="Checkout Free Shipping Recalculation after Coupon Code Added"/>
1414
<description value="User should be able to do checkout free shipping recalculation after adding coupon code"/>
1515
<features value="Checkout"/>
1616
<severity value="MAJOR"/>
1717
<testCaseId value="MAGETWO-96537"/>
1818
<useCaseId value="MAGETWO-96431"/>
1919
<group value="Checkout"/>
20+
<skip>
21+
<issueId value="DEPRECATED">Use StoreFrontFreeShippingRecalculationAfterCouponCodeAppliedTest instead</issueId>
22+
</skip>
2023
</annotations>
2124

2225
<before>
@@ -84,7 +87,7 @@
8487
<see userInput="Your coupon was successfully applied." stepKey="seeSuccessMessage"/>
8588
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder1"/>
8689
<waitForPageLoad stepKey="waitForError"/>
87-
<see stepKey="seeShippingMethodError" userInput="The shipping method is missing. Select the shipping method and try again."/>
90+
<seeElementInDOM selector="{{CheckoutHeaderSection.errorMessageContainsText('The shipping method is missing. Select the shipping method and try again.')}}" stepKey="seeShippingMethodError"/>
8891
<amOnPage stepKey="navigateToShippingPage" url="{{CheckoutShippingPage.url}}"/>
8992
<waitForPageLoad stepKey="waitForShippingPageLoad"/>
9093
<click stepKey="chooseFlatRateShipping" selector="{{CheckoutShippingMethodsSection.shippingMethodRowByName('Flat Rate')}}"/>

0 commit comments

Comments
 (0)