Skip to content

Commit f612499

Browse files
committed
MC-39911: [MFTF] AdminFPTIncludingAndExcludingTaxVisibleOnNegotiableQuotePageTest fails because of bad design
1 parent cece001 commit f612499

9 files changed

+22
-15
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<fillField selector="{{AdminProductAttributeGridSection.attributeCodeFilter}}" userInput="{{codeFilter}}" stepKey="fillAttributeCodeFilterField"/>
2323
<click selector="{{AdminProductAttributeGridSection.Search}}" stepKey="applyGridFilter"/>
2424
<helper class="\Magento\Catalog\Test\Mftf\Helper\CatalogHelper" method="deleteAllProductAttributesOneByOne" stepKey="deleteAllProductAttributesOneByOne">
25-
<argument name="firstNotEmptyRow">{{AdminDataGridTableSection.firstNotEmptyRow2}}</argument>
25+
<argument name="notEmptyRow">{{AdminDataGridTableSection.firstNotEmptyRow2}}</argument>
2626
<argument name="modalAcceptButton">{{AdminConfirmationModalSection.ok}}</argument>
2727
<argument name="deleteButton">{{AdminMainActionsSection.delete}}</argument>
2828
<argument name="successMessageContainer">{{AdminMessagesSection.success}}</argument>

app/code/Magento/Catalog/Test/Mftf/Helper/CatalogHelper.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class CatalogHelper extends Helper
2828
* @retrun void
2929
*/
3030
public function deleteAllProductAttributesOneByOne(
31-
string $firstNotEmptyRow,
31+
string $notEmptyRow,
3232
string $modalAcceptButton,
3333
string $deleteButton,
3434
string $successMessageContainer,
@@ -39,20 +39,18 @@ public function deleteAllProductAttributesOneByOne(
3939
$magentoWebDriver = $this->getModule('\Magento\FunctionalTestingFramework\Module\MagentoWebDriver');
4040
/** @var FacebookWebDriver $webDriver */
4141
$webDriver = $magentoWebDriver->webDriver;
42-
$rows = $webDriver->findElements(WebDriverBy::cssSelector($firstNotEmptyRow));
43-
while (!empty($rows)) {
44-
$rows[0]->click();
42+
$gridRows = $webDriver->findElements(WebDriverBy::cssSelector($notEmptyRow));
43+
while (!empty($gridRows)) {
44+
$gridRows[0]->click();
4545
$magentoWebDriver->waitForPageLoad(30);
4646
$magentoWebDriver->click($deleteButton);
4747
$magentoWebDriver->waitForPageLoad(30);
4848
$magentoWebDriver->waitForElementVisible($modalAcceptButton, 10);
49-
$magentoWebDriver->waitForPageLoad(60);
5049
$magentoWebDriver->click($modalAcceptButton);
5150
$magentoWebDriver->waitForPageLoad(60);
52-
$magentoWebDriver->waitForLoadingMaskToDisappear();
5351
$magentoWebDriver->waitForElementVisible($successMessageContainer, 10);
5452
$magentoWebDriver->see($successMessage, $successMessageContainer);
55-
$rows = $webDriver->findElements(WebDriverBy::cssSelector($firstNotEmptyRow));
53+
$gridRows = $webDriver->findElements(WebDriverBy::cssSelector($notEmptyRow));
5654
}
5755
} catch (\Exception $e) {
5856
$this->fail($e->getMessage());

app/code/Magento/Weee/Test/Mftf/Data/FixedProductAttributeData.xml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,16 @@
88

99
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11-
<entity name="productFPTAttribute" type="ProductAttribute">
11+
<entity name="productFPTAttribute" type="ProductAttribute" deprecated="Use FPTProductAttribute instead">
12+
<data key="attribute_code" unique="suffix">attribute</data>
13+
<data key="is_unique">true</data>
14+
<data key="frontend_input">weee</data>
15+
<data key="is_used_in_grid">true</data>
16+
<data key="is_visible_in_grid">true</data>
17+
<data key="is_filterable_in_grid">true</data>
18+
<requiredEntity type="FrontendLabel">ProductAttributeFrontendLabel</requiredEntity>
19+
</entity>
20+
<entity name="FPTProductAttribute" type="ProductAttribute">
1221
<data key="attribute_code" unique="suffix">weee_attribute</data>
1322
<data key="is_unique">true</data>
1423
<data key="frontend_input">weee</data>

app/code/Magento/Weee/Test/Mftf/Test/AdminFixedTaxValSavedForSpecificWebsiteTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<before>
2323
<!-- Create product attribute and add it to default attribute set />-->
2424
<comment userInput="Create product attribute and add it to default attribute set" stepKey="createAttrAndAddToDefaultAttrSet"/>
25-
<createData entity="productFPTAttribute" stepKey="createProductFPTAttribute"/>
25+
<createData entity="FPTProductAttribute" stepKey="createProductFPTAttribute"/>
2626
<createData entity="AddToDefaultSet" stepKey="addToDefaultAttributeSet">
2727
<requiredEntity createDataKey="createProductFPTAttribute"/>
2828
</createData>

app/code/Magento/Weee/Test/Mftf/Test/AdminRemoveProductWeeeAttributeOptionTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<group value="weee"/>
1919
</annotations>
2020
<before>
21-
<createData entity="productFPTAttribute" stepKey="createProductFPTAttribute"/>
21+
<createData entity="FPTProductAttribute" stepKey="createProductFPTAttribute"/>
2222
<createData entity="AddToDefaultSet" stepKey="addFPTToAttributeSet">
2323
<requiredEntity createDataKey="createProductFPTAttribute"/>
2424
</createData>

app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForCustomerPhysicalQuoteTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<!-- Tax Rule is created based on default tax rates (Stores>Tax Rule) US-CA-*-Rate 1 = 8.2500 US-NY-*-Rate 1 = 8.3750 -->
2828
<createData entity="SimpleTaxRule" stepKey="createTaxRule"/>
2929
<!-- Fixed Product Tax attribute is created and added to default attribute set -->
30-
<createData entity="productFPTAttribute" stepKey="createProductFPTAttribute"/>
30+
<createData entity="FPTProductAttribute" stepKey="createProductFPTAttribute"/>
3131
<createData entity="AddToDefaultSet" stepKey="addFPTToAttributeSet">
3232
<requiredEntity createDataKey="createProductFPTAttribute"/>
3333
</createData>

app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForCustomerVirtualQuoteTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<!-- Tax Rule is created based on default tax rates (Stores>Tax Rule) US-CA-*-Rate 1 = 8.2500 US-NY-*-Rate 1 = 8.3750 -->
2828
<createData entity="SimpleTaxRule" stepKey="createTaxRule"/>
2929
<!-- Fixed Product Tax attribute is created and added to default attribute set -->
30-
<createData entity="productFPTAttribute" stepKey="createProductFPTAttribute"/>
30+
<createData entity="FPTProductAttribute" stepKey="createProductFPTAttribute"/>
3131
<createData entity="AddToDefaultSet" stepKey="addFPTToAttributeSet">
3232
<requiredEntity createDataKey="createProductFPTAttribute"/>
3333
</createData>

app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForGuestPhysicalQuoteTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<!-- Tax Rule is created based on default tax rates (Stores>Tax Rule) US-CA-*-Rate 1 = 8.2500 US-NY-*-Rate 1 = 8.3750 -->
2828
<createData entity="SimpleTaxRule" stepKey="createTaxRule"/>
2929
<!-- Fixed Product Tax attribute is created and added to default attribute set -->
30-
<createData entity="productFPTAttribute" stepKey="createProductFPTAttribute"/>
30+
<createData entity="FPTProductAttribute" stepKey="createProductFPTAttribute"/>
3131
<createData entity="AddToDefaultSet" stepKey="addFPTToAttributeSet">
3232
<requiredEntity createDataKey="createProductFPTAttribute"/>
3333
</createData>

app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForGuestVirtualQuoteTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<!-- Tax Rule is created based on default tax rates (Stores>Tax Rule) US-CA-*-Rate 1 = 8.2500 US-NY-*-Rate 1 = 8.3750 -->
2828
<createData entity="SimpleTaxRule" stepKey="createTaxRule"/>
2929
<!-- Fixed Product Tax attribute is created and added to default attribute set -->
30-
<createData entity="productFPTAttribute" stepKey="createProductFPTAttribute"/>
30+
<createData entity="FPTProductAttribute" stepKey="createProductFPTAttribute"/>
3131
<createData entity="AddToDefaultSet" stepKey="addFPTToAttributeSet">
3232
<requiredEntity createDataKey="createProductFPTAttribute"/>
3333
</createData>

0 commit comments

Comments
 (0)