Skip to content

Commit 20ddee6

Browse files
committed
Merge remote-tracking branch 'origin/MC-20073' into 2.3-develop-pr94
2 parents 0ac7062 + b711df7 commit 20ddee6

File tree

23 files changed

+817
-21
lines changed

23 files changed

+817
-21
lines changed

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoryActionGroup.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@
358358
<argument name="value" type="string"/>
359359
</arguments>
360360

361-
<click selector="{{AdminCategorySEOSection.SectionHeader}}" stepKey="openSeoSection"/>
361+
<conditionalClick selector="{{AdminCategorySEOSection.SectionHeader}}" dependentSelector="{{AdminCategorySEOSection.sectionBody}}" visible="false" stepKey="openSeoSection"/>
362362
<fillField selector="{{AdminCategorySEOSection.UrlKeyInput}}" userInput="{{value}}" stepKey="enterURLKey"/>
363363
<click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveCategory"/>
364364
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="assertSuccessMessage"/>
@@ -372,7 +372,7 @@
372372
<argument name="value" type="string"/>
373373
</arguments>
374374

375-
<click selector="{{AdminCategorySEOSection.SectionHeader}}" stepKey="openSeoSection"/>
375+
<conditionalClick selector="{{AdminCategorySEOSection.SectionHeader}}" dependentSelector="{{AdminCategorySEOSection.sectionBody}}" visible="false" stepKey="openSeoSection"/>
376376
<uncheckOption selector="{{AdminCategorySEOSection.UrlKeyDefaultValueCheckbox}}" stepKey="uncheckDefaultValue"/>
377377
<fillField selector="{{AdminCategorySEOSection.UrlKeyInput}}" userInput="{{value}}" stepKey="enterURLKey"/>
378378
<click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveCategory"/>
@@ -422,7 +422,7 @@
422422

423423
<fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="{{categoryName}}" stepKey="enterCategoryName"/>
424424
<scrollTo selector="{{AdminCategorySEOSection.SectionHeader}}" stepKey="scrollToSearchEngineOptimization"/>
425-
<click selector="{{AdminCategorySEOSection.SectionHeader}}" stepKey="openSEO"/>
425+
<conditionalClick selector="{{AdminCategorySEOSection.SectionHeader}}" dependentSelector="{{AdminCategorySEOSection.sectionBody}}" visible="false" stepKey="openSEO"/>
426426
<waitForPageLoad stepKey="waitForPageToLoad"/>
427427
<fillField selector="{{AdminCategorySEOSection.UrlKeyInput}}" userInput="{{categoryUrlKey}}" stepKey="enterURLKey"/>
428428
<scrollToTopOfPage stepKey="scrollToTheTopOfPage"/>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="StorefrontProductPageSelectDropDownOptionValueActionGroup">
12+
<annotations>
13+
<description>Selects the provided Product Option Value under the provided DropDown Product Option Title on a Storefront Product page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="attributeLabel" type="string" defaultValue="{{ProductAttributeFrontendLabel.label}}"/>
17+
<argument name="optionLabel" type="string" defaultValue="{{productAttributeOption1.label}}"/>
18+
</arguments>
19+
20+
<selectOption selector="{{StorefrontProductInfoMainSection.productOptionSelect(attributeLabel)}}" userInput="{{optionLabel}}" stepKey="fillDropDownAttributeOption"/>
21+
</actionGroup>
22+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="StorefrontProductPageSelectRadioButtonOptionValueActionGroup">
12+
<annotations>
13+
<description>Selects the provided Product Option Value under the provided Radio Button Product Option Title on a Storefront Product page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="attributeLabel" type="string" defaultValue="{{ProductAttributeFrontendLabel.label}}"/>
17+
<argument name="optionLabel" type="string" defaultValue="{{productAttributeOption1.label}}"/>
18+
</arguments>
19+
20+
<checkOption selector="{{StorefrontProductInfoMainSection.productAttributeOptionsRadioButtonByName(attributeLabel, optionLabel)}}" stepKey="fillRadioButtonAttributeOption"/>
21+
</actionGroup>
22+
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Section/AdminCategorySEOSection.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminCategorySEOSection">
12-
<element name="SectionHeader" type="button" selector="div[data-index='search_engine_optimization']" timeout="30"/>
12+
<element name="SectionHeader" type="button" selector="div[data-index='search_engine_optimization'] .fieldset-wrapper-title" timeout="30"/>
13+
<element name="sectionBody" type="text" selector="div[data-index='search_engine_optimization'] .admin__fieldset-wrapper-content"/>
1314
<element name="UrlKeyInput" type="input" selector="input[name='url_key']"/>
1415
<element name="UrlKeyDefaultValueCheckbox" type="button" selector="input[name='use_default[url_key]']"/>
1516
<element name="UrlKeyRedirectCheckbox" type="button" selector="[data-index='url_key_create_redirect'] input[type='checkbox']"/>

app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductInfoMainSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
<element name="productAttributeOptionsPrice" type="text" selector="//label[contains(.,'{{var1}}')]//span[@data-price-amount='{{var2}}']" parameterized="true"/>
6262
<element name="productAttributeOptionsDropDown" type="text" selector="//label[contains(.,'{{var1}}')]/../div[@class='control']//select//option[@price='{{var2}}']" parameterized="true"/>
6363
<element name="productAttributeOptionsRadioButtons" type="text" selector="//label[contains(.,'{{var1}}')]/../div[@class='control']//span[@data-price-amount='{{var2}}']" parameterized="true"/>
64+
<element name="productAttributeOptionsRadioButtonByName" type="checkbox" selector="//*[@id='product-options-wrapper']//div[contains(@class,'fieldset')]//label[contains(.,'{{attributeName}}')]/../div[contains(@class,'control')]//label[contains(@class,'label') and contains(.,'{{optionName}}')]/preceding-sibling::input[@type='radio']" parameterized="true"/>
6465
<element name="productAttributeOptionsCheckbox" type="text" selector="//label[contains(.,'{{var1}}')]/../div[@class='control']//span[@data-price-amount='{{var2}}']" parameterized="true"/>
6566
<element name="productAttributeOptionsMultiselect" type="text" selector="//label[contains(.,'{{var1}}')]/../div[@class='control']//select//option[@price='{{var2}}']" parameterized="true"/>
6667
<element name="productAttributeOptionsData" type="text" selector="//span[contains(.,'{{var1}}')]/../span[@class='price-notice']//span[@data-price-amount='{{var2}}']" parameterized="true"/>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
<severity value="CRITICAL"/>
1818
<group value="catalog"/>
1919
<group value="mtf_migrated"/>
20+
<skip>
21+
<issueId value="MC-30167"/>
22+
</skip>
2023
</annotations>
2124

2225
<before>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminCatalogPriceRuleDeleteAllActionGroup">
11+
<annotations>
12+
<description>Open Catalog Price Rule grid and delete all rules one by one. Need to avoid interference with other tests that test catalog price rules.</description>
13+
</annotations>
14+
<amOnPage url="{{AdminCatalogPriceRuleGridPage.url}}" stepKey="goToAdminCatalogPriceRuleGridPage"/>
15+
<!-- It sometimes is loading too long for default 10s -->
16+
<waitForPageLoad time="60" stepKey="waitForPageFullyLoaded"/>
17+
<conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clearExistingFilters"/>
18+
<executeInSelenium
19+
function="
20+
function ($webdriver) use ($I) {
21+
$rows = $webdriver->findElements(\Facebook\WebDriver\WebDriverBy::cssSelector('table.data-grid tbody tr[data-role=row]:not(.data-grid-tr-no-data):nth-of-type(1)'));
22+
while(!empty($rows)) {
23+
$rows[0]->click();
24+
$I->waitForPageLoad(30);
25+
$I->click('#delete');
26+
$I->waitForPageLoad(30);
27+
$I->waitForElementVisible('aside.confirm .modal-footer button.action-accept', 10);
28+
$I->waitForPageLoad(60);
29+
$I->click('aside.confirm .modal-footer button.action-accept');
30+
$I->waitForPageLoad(60);
31+
$I->waitForLoadingMaskToDisappear();
32+
$I->waitForElementVisible('#messages div.message-success', 10);
33+
$I->see('You deleted the rule.', '#messages div.message-success');
34+
$rows = $webdriver->findElements(\Facebook\WebDriver\WebDriverBy::cssSelector('table.data-grid tbody tr[data-role=row]:not(.data-grid-tr-no-data):nth-of-type(1)'));
35+
}
36+
}"
37+
stepKey="deleteAllCatalogPriceRulesOneByOne"/>
38+
<waitForElementVisible selector="{{AdminDataGridTableSection.dataGridEmpty}}" stepKey="waitDataGridEmptyMessageAppears"/>
39+
<see selector="{{AdminDataGridTableSection.dataGridEmpty}}" userInput="We couldn't find any records." stepKey="assertDataGridEmptyMessage"/>
40+
</actionGroup>
41+
</actionGroups>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminCatalogPriceRuleFillActionsActionGroup">
11+
<annotations>
12+
<description>Fill Catalog Price Rule actions fields: Apply, Discount Amount, Discard subsequent rules.</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="apply" type="string" defaultValue="{{_defaultCatalogRule.simple_action}}"/>
16+
<argument name="discountAmount" type="string" defaultValue="{{_defaultCatalogRule.discount_amount}}"/>
17+
<argument name="discardSubsequentRules" type="string" defaultValue="Yes"/>
18+
</arguments>
19+
20+
<conditionalClick selector="{{AdminNewCatalogPriceRule.actionsTabTitle}}" dependentSelector="{{AdminNewCatalogPriceRule.actionsTabBody}}" visible="false" stepKey="openActionSectionIfNeeded"/>
21+
<scrollTo selector="{{AdminNewCatalogPriceRule.actionsTabTitle}}" stepKey="scrollToActionsFieldset"/>
22+
<waitForElementVisible selector="{{AdminNewCatalogPriceRuleActions.apply}}" stepKey="waitActionsFieldsetFullyOpened"/>
23+
<selectOption selector="{{AdminNewCatalogPriceRuleActions.apply}}" userInput="{{apply}}" stepKey="fillDiscountType"/>
24+
<fillField selector="{{AdminNewCatalogPriceRuleActions.discountAmount}}" userInput="{{discountAmount}}" stepKey="fillDiscountAmount"/>
25+
<selectOption selector="{{AdminNewCatalogPriceRuleActions.disregardRules}}" userInput="{{discardSubsequentRules}}" stepKey="fillDiscardSubsequentRules"/>
26+
</actionGroup>
27+
</actionGroups>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminCatalogPriceRuleFillMainInfoActionGroup">
11+
<annotations>
12+
<description>Fill Catalog Price Rule main info fields: Name, Description, Active (1/0), Priority.</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="name" type="string" defaultValue="{{_defaultCatalogRule.name}}"/>
16+
<argument name="description" type="string" defaultValue="{{_defaultCatalogRule.description}}"/>
17+
<argument name="active" type="string" defaultValue="1"/>
18+
<argument name="websites" type="string" defaultValue="'Main Website'"/>
19+
<argument name="groups" type="string" defaultValue="'NOT LOGGED IN','General','Wholesale','Retailer'"/>
20+
<argument name="fromDate" type="string" defaultValue=""/>
21+
<argument name="toDate" type="string" defaultValue=""/>
22+
<argument name="priority" type="string" defaultValue=""/>
23+
</arguments>
24+
25+
<fillField selector="{{AdminNewCatalogPriceRule.ruleName}}" userInput="{{name}}" stepKey="fillName"/>
26+
<fillField selector="{{AdminNewCatalogPriceRule.description}}" userInput="{{description}}" stepKey="fillDescription"/>
27+
<conditionalClick selector="{{AdminNewCatalogPriceRule.isActive}}" dependentSelector="{{AdminNewCatalogPriceRule.activeByStatus(active)}}" visible="false" stepKey="fillActive"/>
28+
<selectOption selector="{{AdminNewCatalogPriceRule.websites}}" parameterArray="[{{websites}}]" stepKey="selectSpecifiedWebsites"/>
29+
<selectOption selector="{{AdminNewCatalogPriceRule.customerGroups}}" parameterArray="[{{groups}}]" stepKey="selectSpecifiedCustomerGroups"/>
30+
<fillField selector="{{AdminNewCatalogPriceRule.fromDate}}" userInput="{{fromDate}}" stepKey="fillFromDate"/>
31+
<fillField selector="{{AdminNewCatalogPriceRule.toDate}}" userInput="{{toDate}}" stepKey="fillToDate"/>
32+
<fillField selector="{{AdminNewCatalogPriceRule.priority}}" userInput="{{priority}}" stepKey="fillPriority"/>
33+
</actionGroup>
34+
</actionGroups>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminCatalogPriceRuleSaveAndApplyActionGroup">
11+
<annotations>
12+
<description>Clicks Save and Apply on a Admin Catalog Price Rule creation/edit page. Validates that the Success Message is present. Validates that applied rules success message is present.</description>
13+
</annotations>
14+
15+
<scrollToTopOfPage stepKey="scrollToTop"/>
16+
<click selector="{{AdminNewCatalogPriceRule.saveAndApply}}" stepKey="saveAndApplyRule"/>
17+
<waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessageAppears"/>
18+
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the rule." stepKey="checkSuccessSaveMessage"/>
19+
<see selector="{{AdminMessagesSection.success}}" userInput="Updated rules applied." stepKey="checkSuccessAppliedMessage"/>
20+
</actionGroup>
21+
</actionGroups>

0 commit comments

Comments
 (0)