File tree Expand file tree Collapse file tree 10 files changed +79
-53
lines changed
CatalogImportExport/Test/Mftf
ImportExport/Test/Mftf/Section Expand file tree Collapse file tree 10 files changed +79
-53
lines changed Original file line number Diff line number Diff line change 10
10
xsi : noNamespaceSchemaLocation =" urn:magento:mftf:Test/etc/actionGroupSchema.xsd" >
11
11
<actionGroup name =" DeleteExportedFileActionGroup" >
12
12
<annotations >
13
- <description >Deletes the provided Grid Index on the Exports grid page.</description >
13
+ <description >Deletes the exported file on the Exports grid page.</description >
14
14
</annotations >
15
15
<arguments >
16
- <argument name =" rowIndex " type =" string" />
16
+ <argument name =" fileName " type =" string" />
17
17
</arguments >
18
18
19
19
<amOnPage url =" {{AdminExportIndexPage.url}}" stepKey =" goToExportIndexPage" />
20
20
<waitForPageLoad time =" 30" stepKey =" waitFormReload" />
21
- <click stepKey =" clickSelectBtn" selector =" {{AdminExportAttributeSection.selectByIndex(rowIndex )}}" />
22
- <click stepKey =" clickOnDelete" selector =" {{AdminExportAttributeSection.delete(rowIndex )}}" after =" clickSelectBtn" />
21
+ <click stepKey =" clickSelectBtn" selector =" {{AdminExportAttributeSection.selectByFileName(fileName )}}" />
22
+ <click stepKey =" clickOnDelete" selector =" {{AdminExportAttributeSection.deleteByFileName(fileName )}}" after =" clickSelectBtn" />
23
23
<waitForElementVisible selector =" {{AdminProductGridConfirmActionSection.title}}" stepKey =" waitForConfirmModal" />
24
24
<click selector =" {{AdminProductGridConfirmActionSection.ok}}" stepKey =" confirmDelete" />
25
- <waitForElementVisible selector = " {{AdminDataGridTableSection.dataGridEmpty}} " stepKey =" waitDataGridEmptyMessageAppears " />
26
- <see selector =" {{AdminDataGridTableSection.dataGridEmpty }}" userInput = " We couldn't find any records. " stepKey =" assertDataGridEmptyMessage " />
25
+ <waitForPageLoad time = " 30 " stepKey =" waitFormReload2 " />
26
+ <dontSeeElement selector =" {{AdminExportAttributeSection.fileName(fileName) }}" stepKey =" assertDontSeeFile " />
27
27
</actionGroup >
28
28
</actionGroups >
Original file line number Diff line number Diff line change 8
8
9
9
<actionGroups xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
10
10
xsi : noNamespaceSchemaLocation =" urn:magento:mftf:Test/etc/actionGroupSchema.xsd" >
11
- <actionGroup name =" DownloadFileByRowIndexActionGroup " >
11
+ <actionGroup name =" DownloadFileActionGroup " >
12
12
<annotations >
13
- <description >Downloads the provided Grid Index on the Exports grid page.</description >
13
+ <description >Downloads the provided fileName on the Exports grid page.</description >
14
14
</annotations >
15
15
<arguments >
16
- <argument name =" rowIndex " type =" string" />
16
+ <argument name =" fileName " type =" string" />
17
17
</arguments >
18
18
19
19
<reloadPage stepKey =" refreshPage" />
20
20
<waitForPageLoad stepKey =" waitFormReload" />
21
- <click stepKey =" clickSelectBtn" selector =" {{AdminExportAttributeSection.selectByIndex(rowIndex )}}" />
22
- <click stepKey =" clickOnDownload" selector =" {{AdminExportAttributeSection.download(rowIndex )}}" after =" clickSelectBtn" />
21
+ <click stepKey =" clickSelectBtn" selector =" {{AdminExportAttributeSection.selectByFileName(fileName )}}" />
22
+ <click stepKey =" clickOnDownload" selector =" {{AdminExportAttributeSection.downloadByFileName(fileName )}}" after =" clickSelectBtn" />
23
23
</actionGroup >
24
24
</actionGroups >
Original file line number Diff line number Diff line change 88
88
<actionGroup ref =" LoginAsAdmin" stepKey =" loginAsAdmin" />
89
89
</before >
90
90
<after >
91
- <!-- Delete exported file -->
92
- <actionGroup ref =" DeleteExportedFileActionGroup" stepKey =" deleteExportedFile" >
93
- <argument name =" rowIndex" value =" 0" />
94
- </actionGroup >
95
-
96
91
<!-- Delete products creations -->
97
92
<deleteData createDataKey =" createDynamicBundleProduct" stepKey =" deleteDynamicBundleProduct" />
98
93
<deleteData createDataKey =" firstSimpleProductForDynamic" stepKey =" deleteFirstSimpleProductForDynamic" />
122
117
<magentoCLI command =" cron:run" stepKey =" runCron3" />
123
118
<magentoCLI command =" cron:run" stepKey =" runCron4" />
124
119
120
+ <grabTextFrom selector =" {{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey =" grabNameFile" />
121
+
125
122
<!-- Download product -->
126
- <actionGroup ref =" DownloadFileByRowIndexActionGroup" stepKey =" downloadCreatedProducts" >
127
- <argument name =" rowIndex" value =" 0" />
123
+ <actionGroup ref =" DownloadFileActionGroup" stepKey =" downloadCreatedProducts" >
124
+ <argument name =" fileName" value =" {$grabNameFile}" />
125
+ </actionGroup >
126
+
127
+ <!-- Delete exported file -->
128
+ <actionGroup ref =" DeleteExportedFileActionGroup" stepKey =" deleteExportedFile" >
129
+ <argument name =" fileName" value =" {$grabNameFile}" />
128
130
</actionGroup >
129
131
</test >
130
132
</tests >
Original file line number Diff line number Diff line change 56
56
<actionGroup ref =" LoginAsAdmin" stepKey =" loginAsAdmin" />
57
57
</before >
58
58
<after >
59
- <!-- Delete exported file -->
60
- <actionGroup ref =" DeleteExportedFileActionGroup" stepKey =" deleteExportedFile" >
61
- <argument name =" rowIndex" value =" 0" />
62
- </actionGroup >
63
-
64
59
<!-- Deleted created products -->
65
60
<deleteData createDataKey =" createFirstSimpleProduct" stepKey =" deleteFirstSimpleProduct" />
66
61
<deleteData createDataKey =" createSecondSimpleProduct" stepKey =" deleteSecondSimpleProduct" />
84
79
<magentoCLI command =" cron:run" stepKey =" runCron3" />
85
80
<magentoCLI command =" cron:run" stepKey =" runCron4" />
86
81
82
+ <grabTextFrom selector =" {{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey =" grabNameFile" />
83
+
87
84
<!-- Download product -->
88
- <actionGroup ref =" DownloadFileByRowIndexActionGroup" stepKey =" downloadCreatedProducts" >
89
- <argument name =" rowIndex" value =" 0" />
85
+ <actionGroup ref =" DownloadFileActionGroup" stepKey =" downloadCreatedProducts" >
86
+ <argument name =" fileName" value =" {$grabNameFile}" />
87
+ </actionGroup >
88
+
89
+ <!-- Delete exported file -->
90
+ <actionGroup ref =" DeleteExportedFileActionGroup" stepKey =" deleteExportedFile" >
91
+ <argument name =" fileName" value =" {$grabNameFile}" />
90
92
</actionGroup >
91
93
</test >
92
94
</tests >
Original file line number Diff line number Diff line change 130
130
<actionGroup ref =" LoginAsAdmin" stepKey =" loginAsAdmin" />
131
131
</before >
132
132
<after >
133
- <!-- Delete exported file -->
134
- <actionGroup ref =" DeleteExportedFileActionGroup" stepKey =" deleteExportedFile" >
135
- <argument name =" rowIndex" value =" 0" />
136
- </actionGroup >
137
-
138
133
<!-- Remove downloadable domains -->
139
134
<magentoCLI stepKey =" removeDownloadableDomain" command =" downloadable:domains:remove example.com static.magento.com" />
140
135
174
169
<magentoCLI command =" cron:run" stepKey =" runCronFirstTime" />
175
170
<magentoCLI command =" cron:run" stepKey =" runCronSecondTime" />
176
171
172
+ <grabTextFrom selector =" {{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey =" grabNameFile" />
173
+
177
174
<!-- Save exported file: file successfully downloaded -->
178
- <actionGroup ref =" DownloadFileByRowIndexActionGroup " stepKey =" downloadCreatedProducts" >
179
- <argument name =" rowIndex " value =" 0 " />
175
+ <actionGroup ref =" DownloadFileActionGroup " stepKey =" downloadCreatedProducts" >
176
+ <argument name =" fileName " value =" {$grabNameFile} " />
180
177
</actionGroup >
181
178
182
179
<!-- Go to Catalog > Products. Find ConfProd and delete it -->
224
221
<argument name =" image" value =" MagentoLogo" />
225
222
</actionGroup >
226
223
<closeTab stepKey =" closeConfigChildProductPage" />
224
+
225
+ <!-- Delete exported file -->
226
+ <actionGroup ref =" DeleteExportedFileActionGroup" stepKey =" deleteExportedFile" >
227
+ <argument name =" fileName" value =" {$grabNameFile}" />
228
+ </actionGroup >
227
229
</test >
228
230
</tests >
Original file line number Diff line number Diff line change 81
81
<actionGroup ref =" LoginAsAdmin" stepKey =" loginAsAdmin" />
82
82
</before >
83
83
<after >
84
- <!-- Delete exported file -->
85
- <actionGroup ref =" DeleteExportedFileActionGroup" stepKey =" deleteExportedFile" >
86
- <argument name =" rowIndex" value =" 0" />
87
- </actionGroup >
88
84
<!-- Delete configurable product creation -->
89
85
<deleteData createDataKey =" createConfigProduct" stepKey =" deleteConfigProduct" />
90
86
<deleteData createDataKey =" createConfigFirstChildProduct" stepKey =" deleteConfigFirstChildProduct" />
113
109
<magentoCLI command =" cron:run" stepKey =" runCron3" />
114
110
<magentoCLI command =" cron:run" stepKey =" runCron4" />
115
111
112
+ <grabTextFrom selector =" {{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey =" grabNameFile" />
113
+
116
114
<!-- Download product -->
117
- <actionGroup ref =" DownloadFileByRowIndexActionGroup" stepKey =" downloadCreatedProducts" >
118
- <argument name =" rowIndex" value =" 0" />
115
+ <actionGroup ref =" DownloadFileActionGroup" stepKey =" downloadCreatedProducts" >
116
+ <argument name =" fileName" value =" {$grabNameFile}" />
117
+ </actionGroup >
118
+
119
+ <!-- Delete exported file -->
120
+ <actionGroup ref =" DeleteExportedFileActionGroup" stepKey =" deleteExportedFile" >
121
+ <argument name =" fileName" value =" {$grabNameFile}" />
119
122
</actionGroup >
120
123
</test >
121
124
</tests >
Original file line number Diff line number Diff line change 129
129
<magentoCLI command =" cron:run" stepKey =" runCron3" />
130
130
<magentoCLI command =" cron:run" stepKey =" runCron4" />
131
131
132
+ <grabTextFrom selector =" {{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey =" grabNameFile" />
133
+
132
134
<!-- Download product -->
133
- <actionGroup ref =" DownloadFileByRowIndexActionGroup" stepKey =" downloadCreatedProducts" >
134
- <argument name =" rowIndex" value =" 0" />
135
+ <actionGroup ref =" DownloadFileActionGroup" stepKey =" downloadCreatedProducts" >
136
+ <argument name =" fileName" value =" {$grabNameFile}" />
137
+ </actionGroup >
138
+
139
+ <!-- Delete exported file -->
140
+ <actionGroup ref =" DeleteExportedFileActionGroup" stepKey =" deleteExportedFile" >
141
+ <argument name =" fileName" value =" {$grabNameFile}" />
135
142
</actionGroup >
136
143
</test >
137
144
</tests >
Original file line number Diff line number Diff line change 79
79
<actionGroup ref =" LoginAsAdmin" stepKey =" loginAsAdmin" />
80
80
</before >
81
81
<after >
82
- <!-- Delete exported file -->
83
- <actionGroup ref =" DeleteExportedFileActionGroup" stepKey =" deleteExportedFile" >
84
- <argument name =" rowIndex" value =" 0" />
85
- </actionGroup >
86
82
87
83
<!-- Delete simple product -->
88
84
<deleteData createDataKey =" createSimpleProduct" stepKey =" deleteSimpleProduct" />
112
108
<magentoCLI command =" cron:run" stepKey =" runCron3" />
113
109
<magentoCLI command =" cron:run" stepKey =" runCron4" />
114
110
111
+ <grabTextFrom selector =" {{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey =" grabNameFile" />
112
+
115
113
<!-- Download product -->
116
- <actionGroup ref =" DownloadFileByRowIndexActionGroup" stepKey =" downloadCreatedProducts" >
117
- <argument name =" rowIndex" value =" 0" />
114
+ <actionGroup ref =" DownloadFileActionGroup" stepKey =" downloadCreatedProducts" >
115
+ <argument name =" fileName" value =" {$grabNameFile}" />
116
+ </actionGroup >
117
+
118
+ <!-- Delete exported file -->
119
+ <actionGroup ref =" DeleteExportedFileActionGroup" stepKey =" deleteExportedFile" >
120
+ <argument name =" fileName" value =" {$grabNameFile}" />
118
121
</actionGroup >
119
122
</test >
120
123
</tests >
Original file line number Diff line number Diff line change 36
36
<actionGroup ref =" LoginAsAdmin" stepKey =" loginAsAdmin" />
37
37
</before >
38
38
<after >
39
- <!-- Delete exported file -->
40
- <actionGroup ref =" DeleteExportedFileActionGroup" stepKey =" deleteExportedFile" >
41
- <argument name =" rowIndex" value =" 0" />
42
- </actionGroup >
43
-
44
39
<!-- Delete product creations -->
45
40
<deleteData createDataKey =" createSimpleProductWithCustomAttributeSet" stepKey =" deleteSimpleProductWithCustomAttributeSet" />
46
41
<deleteData createDataKey =" createAttributeSet" stepKey =" deleteAttributeSet" />
61
56
<magentoCLI command =" cron:run" stepKey =" runCron3" />
62
57
<magentoCLI command =" cron:run" stepKey =" runCron4" />
63
58
59
+ <grabTextFrom selector =" {{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey =" grabNameFile" />
60
+
64
61
<!-- Download product -->
65
- <actionGroup ref =" DownloadFileByRowIndexActionGroup " stepKey =" downloadCreatedProducts" >
66
- <argument name =" rowIndex " value =" 0 " />
62
+ <actionGroup ref =" DownloadFileActionGroup " stepKey =" downloadCreatedProducts" >
63
+ <argument name =" fileName " value =" {$grabNameFile} " />
67
64
</actionGroup >
65
+
66
+ <!-- Delete exported file -->
67
+ <actionGroup ref =" DeleteExportedFileActionGroup" stepKey =" deleteExportedFile" >
68
+ <argument name =" fileName" value =" {$grabNameFile}" />
69
+ </actionGroup >
70
+
68
71
</test >
69
72
</tests >
Original file line number Diff line number Diff line change 18
18
<element name =" download" type =" button" selector =" //tr[@data-repeat-index='{{var}}']//a[text()='Download']" parameterized =" true" timeout =" 30" />
19
19
<element name =" delete" type =" button" selector =" //tr[@data-repeat-index='{{var}}']//a[text()='Delete']" parameterized =" true" timeout =" 30" />
20
20
<element name =" exportFileNameByPosition" type =" text" selector =" [data-role='grid'] tr[data-repeat-index='{{position}}'] div.data-grid-cell-content" parameterized =" true" />
21
+ <element name =" fileName" type =" text" selector =" //div[@class='data-grid-cell-content'][text()='{{fileName}}']" parameterized =" true" />
22
+ <element name =" selectByFileName" type =" button" selector =" //div[@class='data-grid-cell-content'][text()='{{fileName}}']/../..//button[@class='action-select']" parameterized =" true" />
23
+ <element name =" downloadByFileName" type =" button" selector =" //div[@class='data-grid-cell-content'][text()='{{fileName}}']/../..//a[text()='Download']" parameterized =" true" timeout =" 30" />
24
+ <element name =" deleteByFileName" type =" button" selector =" //div[@class='data-grid-cell-content'][text()='{{fileName}}']/../..//a[text()='Delete']" parameterized =" true" timeout =" 30" />
21
25
</section >
22
26
</sections >
You can’t perform that action at this time.
0 commit comments