Skip to content

Commit 647f7fa

Browse files
committed
B2B-2121: [S3 MFTF] AdminCreateImageSwatchTest MFTF test fails
- Fixing AdminCreateImageSwatchTest
1 parent 7900123 commit 647f7fa

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<!-- Selector for Admin Description input where the index is zero-based -->
2323
<element name="swatchAdminDescriptionByIndex" type="input" selector="input[name='optiontext[value][option_{{index}}][0]']" parameterized="true"/>
2424
<element name="swatchWindow" type="button" selector="#swatch_window_option_option_{{var}}" parameterized="true"/>
25+
<element name="swatchWindowUnavailable" type="button" selector="//div[@id='swatch_window_option_option_{{var}}']//ancestor::td[contains(@class,'swatches-visual-col') and contains(@class,'col-default') and contains(@class,'unavailable')]" parameterized="true"/>
2526
<element name="nthChooseColor" type="button" selector="#swatch-visual-options-panel table tbody tr:nth-of-type({{var}}) .swatch_row_name.colorpicker_handler" parameterized="true"/>
2627
<element name="nthUploadFile" type="button" selector="#swatch-visual-options-panel table tbody tr:nth-of-type({{var}}) .swatch_row_name.btn_choose_file_upload" parameterized="true"/>
2728
<element name="nthDelete" type="button" selector="#swatch-visual-options-panel table tbody tr:nth-of-type({{var}}) button.delete-option" parameterized="true"/>

app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateImageSwatchTest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
</actionGroup>
5252
<click selector="{{AdminManageSwatchSection.nthUploadFile('1')}}" stepKey="clickUploadFile1"/>
5353
<attachFile selector="input[name='datafile']" userInput="adobe-thumb.jpg" stepKey="attachFile1"/>
54+
<waitForElementNotVisible selector="{{AdminManageSwatchSection.swatchWindowUnavailable('0')}}" stepKey="waitForImageUploaded"/>
5455
<fillField selector="{{AdminManageSwatchSection.adminInputByIndex('0')}}" userInput="adobe-thumb" stepKey="fillAdmin1"/>
5556
<click selector="{{AdminManageSwatchSection.swatchWindow('0')}}" stepKey="clicksWatchWindow1"/>
5657

@@ -61,6 +62,7 @@
6162
</actionGroup>
6263
<click selector="{{AdminManageSwatchSection.nthUploadFile('2')}}" stepKey="clickUploadFile2"/>
6364
<attachFile selector="input[name='datafile']" userInput="adobe-small.jpg" stepKey="attachFile2"/>
65+
<waitForElementNotVisible selector="{{AdminManageSwatchSection.swatchWindowUnavailable('1')}}" stepKey="waitForImageUploaded2"/>
6466
<fillField selector="{{AdminManageSwatchSection.adminInputByIndex('1')}}" userInput="adobe-small" stepKey="fillAdmin2"/>
6567
<click selector="{{AdminManageSwatchSection.swatchWindow('1')}}" stepKey="clicksWatchWindow2"/>
6668

@@ -71,6 +73,7 @@
7173
</actionGroup>
7274
<click selector="{{AdminManageSwatchSection.nthUploadFile('3')}}" stepKey="clickUploadFile3"/>
7375
<attachFile selector="input[name='datafile']" userInput="adobe-base.jpg" stepKey="attachFile3"/>
76+
<waitForElementNotVisible selector="{{AdminManageSwatchSection.swatchWindowUnavailable('2')}}" stepKey="waitForImageUploaded3"/>
7477
<fillField selector="{{AdminManageSwatchSection.adminInputByIndex('2')}}" userInput="adobe-base" stepKey="fillAdmin3"/>
7578

7679
<!-- Set scope -->

0 commit comments

Comments
 (0)