Skip to content

Commit c21e0f8

Browse files
ACQE-7588: VerifyDisableDownloadableProductSamplesAreNotAccessibleTest
MFTF test fix
1 parent d253a44 commit c21e0f8

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

app/code/Magento/Downloadable/Test/Mftf/Data/LinkData.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,17 @@
6161
<data key="is_shareable">1</data>
6262
<data key="sort_order">2</data>
6363
</entity>
64+
<entity name="downloadableLink3" type="downloadable_link">
65+
<data key="title" unique="suffix">link-1</data>
66+
<data key="price">2.43</data>
67+
<data key="number_of_downloads">2</data>
68+
<data key="sample_type">url</data>
69+
<data key="sample_url">https://static.magento.com/sites/all/themes/mag_redesign/images/magento-logo.svg</data>
70+
<data key="link_type">url</data>
71+
<data key="link_url">https://static.magento.com/sites/all/themes/mag_redesign/images/magento-logo.svg</data>
72+
<data key="is_shareable">0</data>
73+
<data key="sort_order">1</data>
74+
</entity>
6475
<entity name="ApiDownloadableLink" type="downloadable_link">
6576
<data key="title" unique="suffix">Api Downloadable Link</data>
6677
<data key="price">2.00</data>
@@ -105,6 +116,12 @@
105116
<data key="sample_type">file</data>
106117
<requiredEntity type="sample_file_content">downloadableSampleLink_TestImage</requiredEntity>
107118
</entity>
119+
<entity name="DownloadableSampleWithStaticDomain" type="downloadable_sample">
120+
<data key="title" unique="suffix">downloadableSampleUrl</data>
121+
<data key="sort_order">1</data>
122+
<data key="sample_type">url</data>
123+
<data key="sample_url">https://static.magento.com/sites/all/themes/mag_redesign/images/magento-logo.svg</data>
124+
</entity>
108125

109126
<!-- File Content -->
110127
<entity name="downloadableLink_MagentoLogo" type="link_file_content">

app/code/Magento/Downloadable/Test/Mftf/Test/VerifyDisableDownloadableProductSamplesAreNotAccessibleTest.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@
3535
</createData>
3636

3737
<!-- Add downloadable link -->
38-
<createData entity="downloadableLink1" stepKey="addDownloadableLink">
38+
<createData entity="downloadableLink3" stepKey="addDownloadableLink">
3939
<requiredEntity createDataKey="createProduct"/>
4040
</createData>
4141

4242
<!-- Add downloadable sample -->
43-
<createData entity="DownloadableSample" stepKey="addDownloadableSample">
43+
<createData entity="DownloadableSampleWithStaticDomain" stepKey="addDownloadableSample">
4444
<requiredEntity createDataKey="createProduct"/>
4545
</createData>
4646
</before>
@@ -65,9 +65,9 @@
6565

6666
<!-- Sample url is accessible -->
6767
<actionGroup ref="AssertStorefrontSeeElementActionGroup" stepKey="seeDownloadableSample">
68-
<argument name="selector" value="{{StorefrontDownloadableProductSection.downloadableSampleLabel(DownloadableSample.title)}}"/>
68+
<argument name="selector" value="{{StorefrontDownloadableProductSection.downloadableSampleLabel(DownloadableSampleWithStaticDomain.title)}}"/>
6969
</actionGroup>
70-
<click selector="{{StorefrontDownloadableProductSection.downloadableSampleLabel(DownloadableSample.title)}}" stepKey="clickDownloadableSample"/>
70+
<click selector="{{StorefrontDownloadableProductSection.downloadableSampleLabel(DownloadableSampleWithStaticDomain.title)}}" stepKey="clickDownloadableSample"/>
7171

7272
<!-- Grab Sample id -->
7373
<switchToNextTab stepKey="switchToSampleTab"/>
@@ -76,9 +76,9 @@
7676

7777
<!-- Link Sample url is accessible -->
7878
<actionGroup ref="AssertStorefrontSeeElementActionGroup" stepKey="seeDownloadableLink">
79-
<argument name="selector" value="{{StorefrontDownloadableProductSection.downloadableLinkLabel(downloadableLink1.title)}}"/>
79+
<argument name="selector" value="{{StorefrontDownloadableProductSection.downloadableLinkLabel(downloadableLink3.title)}}"/>
8080
</actionGroup>
81-
<click selector="{{StorefrontDownloadableProductSection.downloadableLinkSampleByTitle(downloadableLink1.title)}}" stepKey="clickDownloadableLinkSample"/>
81+
<click selector="{{StorefrontDownloadableProductSection.downloadableLinkSampleByTitle(downloadableLink3.title)}}" stepKey="clickDownloadableLinkSample"/>
8282

8383
<!-- Grab Link Sample id -->
8484
<switchToNextTab stepKey="switchToLinkSampleTab"/>

0 commit comments

Comments
 (0)