-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '2.4-develop' into fix-missing-vatid-at-multishipping-re…
…gistration-page
- Loading branch information
Showing
129 changed files
with
1,204 additions
and
319 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...atalog/Test/Mftf/ActionGroup/AdminDeleteAllProductAttributesFilteredByCodeActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AdminDeleteAllProductAttributesFilteredByCodeActionGroup"> | ||
<annotations> | ||
<description>Open product attributes grid filter it by attribute code and delete all found attributes one by one.</description> | ||
</annotations> | ||
<arguments> | ||
<argument name="codeFilter" type="string" defaultValue="fake-code"/> | ||
</arguments> | ||
|
||
<amOnPage url="{{AdminProductAttributeGridPage.url}}" stepKey="navigateToProductAttributeGrid"/> | ||
<!-- It sometimes is loading too long for default 10s --> | ||
<waitForPageLoad time="60" stepKey="waitForPageFullyLoaded"/> | ||
<click selector="{{AdminProductAttributeGridSection.ResetFilter}}" stepKey="clearExistingFilters"/> | ||
<fillField selector="{{AdminProductAttributeGridSection.FilterByAttributeCode}}" userInput="{{codeFilter}}" stepKey="fillAttributeCodeFilterField"/> | ||
<click selector="{{AdminProductAttributeGridSection.Search}}" stepKey="applyGridFilter"/> | ||
<helper class="\Magento\Catalog\Test\Mftf\Helper\CatalogHelper" method="deleteAllProductAttributesOneByOne" stepKey="deleteAllProductAttributesOneByOne"> | ||
<argument name="notEmptyRow">{{AdminDataGridTableSection.firstNotEmptyRow2}}</argument> | ||
<argument name="modalAcceptButton">{{AdminConfirmationModalSection.ok}}</argument> | ||
<argument name="deleteButton">{{AdminMainActionsSection.delete}}</argument> | ||
<argument name="successMessageContainer">{{AdminMessagesSection.success}}</argument> | ||
<argument name="successMessage">You deleted the product attribute.</argument> | ||
</helper> | ||
<waitForElementVisible selector="{{AdminDataGridTableSection.dataGridEmpty}}" stepKey="waitDataGridEmptyMessageAppears"/> | ||
<see selector="{{AdminDataGridTableSection.dataGridEmpty}}" userInput="We couldn't find any records." stepKey="assertDataGridEmptyMessage"/> | ||
<click selector="{{AdminProductAttributeGridSection.ResetFilter}}" stepKey="clearExistingFiltersAgain"/> | ||
</actionGroup> | ||
</actionGroups> |
59 changes: 59 additions & 0 deletions
59
app/code/Magento/Catalog/Test/Mftf/Helper/CatalogHelper.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\Catalog\Test\Mftf\Helper; | ||
|
||
use Facebook\WebDriver\Remote\RemoteWebDriver as FacebookWebDriver; | ||
use Facebook\WebDriver\WebDriverBy; | ||
use Magento\FunctionalTestingFramework\Helper\Helper; | ||
use Magento\FunctionalTestingFramework\Module\MagentoWebDriver; | ||
|
||
/** | ||
* Class for MFTF helpers for Catalog module. | ||
*/ | ||
class CatalogHelper extends Helper | ||
{ | ||
/** | ||
* Delete all product attributes one by one. | ||
* | ||
* @param string $notEmptyRow | ||
* @param string $modalAcceptButton | ||
* @param string $deleteButton | ||
* @param string $successMessageContainer | ||
* @param string $successMessage | ||
* @retrun void | ||
*/ | ||
public function deleteAllProductAttributesOneByOne( | ||
string $notEmptyRow, | ||
string $modalAcceptButton, | ||
string $deleteButton, | ||
string $successMessageContainer, | ||
string $successMessage | ||
): void { | ||
try { | ||
/** @var MagentoWebDriver $webDriver */ | ||
$magentoWebDriver = $this->getModule('\Magento\FunctionalTestingFramework\Module\MagentoWebDriver'); | ||
/** @var FacebookWebDriver $webDriver */ | ||
$webDriver = $magentoWebDriver->webDriver; | ||
$gridRows = $webDriver->findElements(WebDriverBy::cssSelector($notEmptyRow)); | ||
while (!empty($gridRows)) { | ||
$gridRows[0]->click(); | ||
$magentoWebDriver->waitForPageLoad(30); | ||
$magentoWebDriver->click($deleteButton); | ||
$magentoWebDriver->waitForPageLoad(30); | ||
$magentoWebDriver->waitForElementVisible($modalAcceptButton); | ||
$magentoWebDriver->click($modalAcceptButton); | ||
$magentoWebDriver->waitForPageLoad(60); | ||
$magentoWebDriver->waitForElementVisible($successMessageContainer); | ||
$magentoWebDriver->see($successMessage, $successMessageContainer); | ||
$gridRows = $webDriver->findElements(WebDriverBy::cssSelector($notEmptyRow)); | ||
} | ||
} catch (\Exception $e) { | ||
$this->fail($e->getMessage()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.