Skip to content

Commit b87f1df

Browse files
🔃 [Magento Community Engineering] Community Contributions - 2.4-develop
Accepted Community Pull Requests: - #29799: Add elasticsearch params to integration tests config (by @ihor-sviziev) - #29634: [MFTF] Added some ActionGroups to Analytics module (by @Usik2203) - #29348: [MFTF] Test scenario for "Apply shopping cart rule to a single bundle item" (#28921) (by @zhartaunik) - #28413: Fix Downloadable product after refund (by @ProkopovVitaliy) - #27609: Test coverage for PR #27357 (E-mail templates) (by @lbajsarowicz) - #27579: Fix #27523: throw informative errors in setup:db:generate-patch (by @korostii) Fixed GitHub Issues: - #29648: [Issue] [MFTF] Added some ActionGroups to Analytics module (reported by @m2-assistant[bot]) has been fixed in #29634 by @Usik2203 in 2.4-develop branch Related commits: 1. f54fd86 2. 1492668 3. 59d5d32 4. 8c2291f 5. e25fc55 - #28921: Apply shopping cart rule to a single bundle item (reported by @MilanFrajt) has been fixed in #29348 by @zhartaunik in 2.4-develop branch Related commits: 1. e6aca3b 2. 7abc82f - #28388: Downloadable product is available in My Download Products tab after it has been partially refunded (reported by @YaninaPrudnikova) has been fixed in #28413 by @ProkopovVitaliy in 2.4-develop branch Related commits: 1. a6f460d 2. 9a83830 3. 96c9d54 4. 59cf9f7 5. c6c3231 6. eafdb17 7. 92fd06b 8. 1f7eace 9. db84d3a 10. d0a0962 11. aea9276 12. 1be2cd7 13. dee9b16 14. a49709f 15. 8023f42 16. 9e31246 17. d91b305 18. 62e4866 19. 97df424 20. 2d58988 21. 87d8984 - #27523: CLI Patch Generator: Lack of information what path cannot be created (reported by @lbajsarowicz) has been fixed in #27579 by @korostii in 2.4-develop branch Related commits: 1. 1e8e825 2. 1dd5290 3. c1d8fef 4. a74f8fe 5. f48cd50 6. 2bc691a 7. 8991733 8. 347602f 9. 75bb2c3 10. 7d316d4
2 parents edc018c + bcfe08f commit b87f1df

21 files changed

+701
-53
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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="AdminOpenConfigGeneralAnalyticsPageActionGroup">
12+
<annotations>
13+
<description>Open Config General Analytics Page.</description>
14+
</annotations>
15+
16+
<amOnPage url="{{AdminConfigGeneralAnalyticsPage.url}}" stepKey="amOnAdminConfig"/>
17+
<waitForPageLoad stepKey="waitPageLoad"/>
18+
</actionGroup>
19+
</actionGroups>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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="AssertAdminAdvancedReportingPageUrlActionGroup">
12+
<annotations>
13+
<description>Assert admin advanced reporting page url.</description>
14+
</annotations>
15+
16+
<switchToNextTab stepKey="switchToNewTab"/>
17+
<waitForPageLoad stepKey="waitForAdvancedReportingPageLoad"/>
18+
<seeInCurrentUrl url="advancedreporting.rjmetrics.com/report" stepKey="seeAssertAdvancedReportingPageUrl"/>
19+
</actionGroup>
20+
</actionGroups>

app/code/Magento/Analytics/Test/Mftf/Test/AdminAdvancedReportingButtonTest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
<amOnPage url="{{AdminDashboardPage.url}}" stepKey="amOnDashboardPage"/>
3333
<waitForPageLoad stepKey="waitForDashboardPageLoad"/>
3434
<click selector="{{AdminAdvancedReportingSection.goToAdvancedReporting}}" stepKey="clickGoToAdvancedReporting"/>
35-
<switchToNextTab stepKey="switchToNewTab"/>
36-
<seeInCurrentUrl url="advancedreporting.rjmetrics.com/report" stepKey="seeAssertAdvancedReportingPageUrl"/>
35+
<actionGroup ref="AssertAdminAdvancedReportingPageUrlActionGroup" stepKey="assertAdvancedReportingPageUrl"/>
3736
</test>
3837
</tests>

app/code/Magento/Analytics/Test/Mftf/Test/AdminAdvancedReportingNavigateMenuTest.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
<argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/>
3030
<argument name="submenuUiId" value="{{AdminMenuReportsBusinessIntelligenceAdvancedReporting.dataUiId}}"/>
3131
</actionGroup>
32-
<switchToNextTab stepKey="switchToNewTab"/>
33-
<waitForPageLoad stepKey="waitForAdvancedReportingPageLoad"/>
34-
<seeInCurrentUrl url="advancedreporting.rjmetrics.com/report" stepKey="seeAssertAdvancedReportingPageUrl"/>
32+
<actionGroup ref="AssertAdminAdvancedReportingPageUrlActionGroup" stepKey="assertAdvancedReportingPageUrl"/>
3533
</test>
3634
</tests>

app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationBlankIndustryTest.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@
1717
<testCaseId value="MAGETWO-63981"/>
1818
<group value="analytics"/>
1919
</annotations>
20+
<before>
21+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
22+
</before>
2023
<after>
2124
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/>
2225
</after>
23-
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
24-
<amOnPage url="{{AdminConfigGeneralAnalyticsPage.url}}" stepKey="amOnAdminConfig"/>
26+
<actionGroup ref="AdminOpenConfigGeneralAnalyticsPageActionGroup" stepKey="amOnAdminConfig"/>
2527
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingService}}" userInput="Enable" stepKey="selectAdvancedReportingServiceEnabled"/>
2628
<see selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustryLabel}}" userInput="Industry" stepKey="seeAdvancedReportingIndustryLabel"/>
2729
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustry}}" userInput="--Please Select--" stepKey="selectAdvancedReportingIndustry"/>

app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationEnableDisableAnalyticsTest.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@
1717
<testCaseId value="MAGETWO-66465"/>
1818
<group value="analytics"/>
1919
</annotations>
20+
<before>
21+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
22+
</before>
2023
<after>
2124
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/>
2225
</after>
23-
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
24-
<amOnPage url="{{AdminConfigGeneralAnalyticsPage.url}}" stepKey="amOnAdminConfig"/>
26+
<actionGroup ref="AdminOpenConfigGeneralAnalyticsPageActionGroup" stepKey="amOnAdminConfig"/>
2527
<see selector="{{AdminConfigAdvancedReportingSection.advancedReportingServiceLabel}}" userInput="Advanced Reporting Service" stepKey="seeAdvancedReportingServiceLabelEnabled"/>
2628
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingService}}" userInput="Enable" stepKey="selectAdvancedReportingServiceEnabled"/>
2729
<see selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustryLabel}}" userInput="Industry" stepKey="seeAdvancedReportingIndustryLabel"/>

app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationIndustryTest.xml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,13 @@
1818
<testCaseId value="MAGETWO-63898"/>
1919
<group value="analytics"/>
2020
</annotations>
21-
22-
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23-
<amOnPage url="{{AdminConfigGeneralAnalyticsPage.url}}" stepKey="amOnAdminConfig"/>
21+
<before>
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23+
</before>
24+
<after>
25+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/>
26+
</after>
27+
<actionGroup ref="AdminOpenConfigGeneralAnalyticsPageActionGroup" stepKey="amOnAdminConfig"/>
2428
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingService}}" userInput="Enable" stepKey="selectAdvancedReportingServiceEnabled"/>
2529
<see selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustryLabel}}" userInput="Industry" stepKey="seeAdvancedReportingIndustryLabel"/>
2630
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustry}}" userInput="Apps and Games" stepKey="selectAdvancedReportingIndustry"/>

app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationTimeToSendDataTest.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@
1818
<testCaseId value="MAGETWO-66464"/>
1919
<group value="analytics"/>
2020
</annotations>
21+
<before>
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23+
</before>
2124
<after>
2225
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/>
2326
</after>
24-
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
25-
<amOnPage url="{{AdminConfigGeneralAnalyticsPage.url}}" stepKey="amOnAdminConfig"/>
27+
<actionGroup ref="AdminOpenConfigGeneralAnalyticsPageActionGroup" stepKey="amOnAdminConfig"/>
2628
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingService}}" userInput="Enable" stepKey="selectAdvancedReportingServiceEnabled"/>
2729
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustry}}" userInput="Apps and Games" stepKey="selectAdvancedReportingIndustry"/>
2830
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingHour}}" userInput="23" stepKey="selectAdvancedReportingHour"/>

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@
5858
<argument name="categoryName" value="$$categoryN.name$$, $$categoryM.name$$"/>
5959
</actionGroup>
6060

61-
<wait stepKey="waitBeforeRunCronIndex" time="30"/>
61+
<wait stepKey="waitBeforeRunCronIndex" time="60"/>
6262
<magentoCLI stepKey="runCronIndex" command="cron:run --group=index"/>
63-
<wait stepKey="waitAfterRunCronIndex" time="60"/>
63+
<wait stepKey="waitAfterRunCronIndex" time="120"/>
6464
</before>
6565
<after>
6666
<!-- Change "Category Products" and "Product Categories" indexers to "Update on Save" mode -->
@@ -108,6 +108,8 @@
108108
<argument name="categoryName" value="$$categoryK.name$$"/>
109109
</actionGroup>
110110

111+
<wait stepKey="waitAfterAssignCategoryK" time="60"/>
112+
111113
<!-- Unassign category M from Product B -->
112114
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="amOnEditCategoryPageB">
113115
<argument name="productId" value="$$productB.id$$"/>
@@ -147,8 +149,9 @@
147149
<see userInput="$$productC.name$$" selector="{{StorefrontCategoryMainSection.productName}}" stepKey="seeProductInCategoryN"/>
148150

149151
<!-- Run cron -->
150-
<wait stepKey="waitBeforeRunMagentoCron" time="30"/>
152+
<wait stepKey="waitBeforeRunMagentoCron" time="60"/>
151153
<magentoCLI stepKey="runMagentoCron" command="cron:run --group=index"/>
154+
152155
<wait stepKey="waitAfterRunMagentoCron" time="90"/>
153156

154157
<!-- Open categories K, L, M, N on Storefront in order to make sure that new assigments are applied -->
@@ -213,8 +216,9 @@
213216
<see userInput="$$productC.name$$" selector="{{StorefrontCategoryMainSection.productName}}" stepKey="productCOnCategoryN"/>
214217

215218
<!-- Run Cron once to reindex product changes -->
216-
<wait stepKey="waitBeforeRunCronIndexAfterProductAssignToCategory" time="30"/>
219+
<wait stepKey="waitBeforeRunCronIndexAfterProductAssignToCategory" time="60"/>
217220
<magentoCLI stepKey="runCronIndexAfterProductAssignToCategory" command="cron:run --group=index"/>
221+
218222
<wait stepKey="waitAfterRunCronIndexAfterProductAssignToCategory" time="90"/>
219223

220224
<!-- Open categories K, L, M, N on Storefront in order to make sure that new assigments are applied -->

app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminCustomerFindWishlistItemActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
</arguments>
1515
<fillField userInput="{{productName}}" selector="{{AdminCustomerWishlistSection.productName}}" stepKey="fillProductNameField"/>
1616
<click selector="{{AdminCustomerWishlistSection.searchButton}}" stepKey="clickSearchButton"/>
17-
<waitForPageLoad stepKey="waitForGridLoading"/>
17+
<waitForAjaxLoad time="60" stepKey="waitForLoading"/>
1818
</actionGroup>
1919
</actionGroups>

app/code/Magento/Developer/Console/Command/GeneratePatchCommand.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
133133
}
134134
$type = $input->getOption(self::INPUT_KEY_PATCH_TYPE);
135135
$modulePath = $this->componentRegistrar->getPath(ComponentRegistrar::MODULE, $moduleName);
136+
if (null === $modulePath) {
137+
throw new \InvalidArgumentException(sprintf('Cannot find a registered module with name "%s"', $moduleName));
138+
}
136139
$preparedModuleName = str_replace('_', '\\', $moduleName);
137140
$preparedType = ucfirst($type);
138141
$patchInterface = sprintf('%sPatchInterface', $preparedType);
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Developer\Test\Unit\Console\Command;
8+
9+
use Magento\Developer\Console\Command\GeneratePatchCommand;
10+
use Magento\Framework\Component\ComponentRegistrar;
11+
use Magento\Framework\Filesystem\Directory\Read;
12+
use Magento\Framework\Filesystem\Directory\ReadFactory;
13+
use Magento\Framework\Filesystem\Directory\Write;
14+
use Magento\Framework\Filesystem\Directory\WriteFactory;
15+
use Magento\Framework\Filesystem\DirectoryList;
16+
use PHPUnit\Framework\MockObject\MockObject;
17+
use PHPUnit\Framework\TestCase;
18+
use Symfony\Component\Console\Tester\CommandTester;
19+
20+
class GeneratePatchCommandTest extends TestCase
21+
{
22+
/**
23+
* @var ComponentRegistrar|MockObject
24+
*/
25+
private $componentRegistrarMock;
26+
27+
/**
28+
* @var DirectoryList|MockObject
29+
*/
30+
private $directoryListMock;
31+
32+
/**
33+
* @var ReadFactory|MockObject
34+
*/
35+
private $readFactoryMock;
36+
37+
/**
38+
* @var WriteFactory|MockObject
39+
*/
40+
private $writeFactoryMock;
41+
42+
/**
43+
* @var GeneratePatchCommand|MockObject
44+
*/
45+
private $command;
46+
47+
protected function setUp(): void
48+
{
49+
$this->componentRegistrarMock = $this->createMock(ComponentRegistrar::class);
50+
$this->directoryListMock = $this->createMock(DirectoryList::class);
51+
$this->readFactoryMock = $this->createMock(ReadFactory::class);
52+
$this->writeFactoryMock = $this->createMock(WriteFactory::class);
53+
54+
$this->command = new GeneratePatchCommand(
55+
$this->componentRegistrarMock,
56+
$this->directoryListMock,
57+
$this->readFactoryMock,
58+
$this->writeFactoryMock
59+
);
60+
}
61+
62+
public function testExecute()
63+
{
64+
$this->componentRegistrarMock->expects($this->once())
65+
->method('getPath')
66+
->with('module', 'Vendor_Module')
67+
->willReturn('/long/path/to/Vendor/Module');
68+
69+
$read = $this->createMock(Read::class);
70+
$read->expects($this->at(0))
71+
->method('readFile')
72+
->with('patch_template.php.dist')
73+
->willReturn('something');
74+
$this->readFactoryMock->method('create')->willReturn($read);
75+
76+
$write = $this->createMock(Write::class);
77+
$write->expects($this->once())->method('writeFile');
78+
$this->writeFactoryMock->method('create')->willReturn($write);
79+
80+
$this->directoryListMock->expects($this->once())->method('getRoot')->willReturn('/some/path');
81+
82+
$commandTester = new CommandTester($this->command);
83+
$commandTester->execute(
84+
[
85+
GeneratePatchCommand::MODULE_NAME => 'Vendor_Module',
86+
GeneratePatchCommand::INPUT_KEY_PATCH_NAME => 'SomePatch'
87+
]
88+
);
89+
$this->assertStringContainsString('successfully generated', $commandTester->getDisplay());
90+
}
91+
92+
public function testWrongParameter()
93+
{
94+
$this->expectExceptionMessage('Not enough arguments');
95+
$this->expectException(\RuntimeException::class);
96+
97+
$commandTester = new CommandTester($this->command);
98+
$commandTester->execute([]);
99+
}
100+
101+
public function testBadModule()
102+
{
103+
$this->componentRegistrarMock->expects($this->once())
104+
->method('getPath')
105+
->with('module', 'Fake_Module')
106+
->willReturn(null);
107+
108+
$this->expectExceptionMessage('Cannot find a registered module with name "Fake_Module"');
109+
$this->expectException(\InvalidArgumentException::class);
110+
111+
$commandTester = new CommandTester($this->command);
112+
$commandTester->execute(
113+
[
114+
GeneratePatchCommand::MODULE_NAME => 'Fake_Module',
115+
GeneratePatchCommand::INPUT_KEY_PATCH_NAME => 'SomePatch'
116+
]
117+
);
118+
}
119+
}

app/code/Magento/Downloadable/Observer/SetLinkStatusObserver.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public function execute(\Magento\Framework\Event\Observer $observer)
6161
'payment_pending' => \Magento\Downloadable\Model\Link\Purchased\Item::LINK_STATUS_PENDING_PAYMENT,
6262
'payment_review' => \Magento\Downloadable\Model\Link\Purchased\Item::LINK_STATUS_PAYMENT_REVIEW,
6363
];
64+
$expiredOrderItemIds = [];
6465

6566
$downloadableItemsStatuses = [];
6667
$orderItemStatusToEnable = $this->_scopeConfig->getValue(
@@ -114,6 +115,10 @@ public function execute(\Magento\Framework\Event\Observer $observer)
114115
if (in_array($item->getStatusId(), $availableStatuses)) {
115116
$downloadableItemsStatuses[$item->getId()] = $linkStatuses['avail'];
116117
}
118+
119+
if ($item->getQtyOrdered() - $item->getQtyRefunded() == 0) {
120+
$expiredOrderItemIds[] = $item->getId();
121+
}
117122
}
118123
}
119124
}
@@ -141,10 +146,22 @@ public function execute(\Magento\Framework\Event\Observer $observer)
141146
}
142147
}
143148

149+
if ($expiredOrderItemIds) {
150+
$linkPurchased = $this->_createItemsCollection()->addFieldToFilter(
151+
'order_item_id',
152+
['in' => $expiredOrderItemIds]
153+
);
154+
foreach ($linkPurchased as $link) {
155+
$link->setStatus(\Magento\Downloadable\Model\Link\Purchased\Item::LINK_STATUS_EXPIRED)->save();
156+
}
157+
}
158+
144159
return $this;
145160
}
146161

147162
/**
163+
* Returns purchased item collection
164+
*
148165
* @return \Magento\Downloadable\Model\ResourceModel\Link\Purchased\Item\Collection
149166
*/
150167
protected function _createItemsCollection()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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="StorefrontNotAssertDownloadableProductLinkInCustomerAccountActionGroup">
12+
<annotations>
13+
<description>Goes to the Storefront Customer Dashboard page. Clicks on 'My Downloadable Products'. Validates that the provided Downloadable Product is present and Downloadable link not exist.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="product"/>
17+
</arguments>
18+
19+
<amOnPage url="{{StorefrontCustomerDashboardPage.url}}" stepKey="goToMyAccountPage"/>
20+
<click selector="{{StorefrontCustomerSidebarSection.sidebarTab('My Downloadable Products')}}" stepKey="clickDownloadableProducts"/>
21+
<waitForPageLoad stepKey="waitForDownloadableProductsPageLoad"/>
22+
<seeElement selector="{{StorefrontCustomerDownloadableProductsSection.productName(product.name)}}" stepKey="seeStorefrontDownloadableProductsProductName"/>
23+
<dontSeeElement selector="{{StorefrontCustomerDownloadableProductsSection.downloadableLink}}" stepKey="dontSeeStorefrontMyDownloadableProductsLink"/>
24+
25+
</actionGroup>
26+
</actionGroups>

app/code/Magento/Downloadable/Test/Mftf/Section/StorefrontCustomerDownloadableProductsSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="StorefrontCustomerDownloadableProductsSection">
1212
<element name="productName" type="text" selector="//table[@id='my-downloadable-products-table']//strong[contains(@class, 'product-name') and normalize-space(.)='{{productName}}']" parameterized="true"/>
13+
<element name="downloadableLink" type="button" selector="//table[@id='my-downloadable-products-table']//a[contains(@class, 'download')]"/>
1314
</section>
1415
</sections>

0 commit comments

Comments
 (0)