Commit a6367d5
committed
Rename test cases and corresponding snapshots
- Use new, fuller names when clicking theme menu items.
- Update test case names to consistently refer to the theme, except for
the default theme (Classic Light), which is omitted.
- Update snapshot image file names to match changed test case names.
I exported a patch and winnowed it down to a set of replacements,
and then had ChatGPT give me this Powershell script:
# Define the replacements as old -> new mappings
$replacements = @{
"modern theme eye gaze mode"="modern light theme -- eye gaze mode";
"modern theme"="modern light theme -- main screenshot";
"modern theme edit colors dialog (expanded)"="modern light theme -- edit colors dialog (expanded)";
"winter theme"="winter theme -- main screenshot";
"winter theme edit colors dialog (expanded)"="winter theme -- edit colors dialog (expanded)";
"winter theme vertical color box"="winter theme -- vertical color box";
"classic theme vertical color box"="'vertical color box";
"classic theme edit colors dialog"="edit colors dialog";
"modern theme vertical color box"="modern light theme -- vertical color box"
}
# Get all files in the current directory
$files = Get-ChildItem -File
foreach ($file in $files) {
# Store the original file name
$originalName = $file.Name
# Perform each replacement on the file name
foreach ($replacement in $replacements.GetEnumerator()) {
if ($originalName -like "*$($replacement.Key)*") {
$newName = $originalName -replace [regex]::Escape($replacement.Key), $replacement.Value
Rename-Item -Path $originalName -NewName $newName
# Update originalName to handle multiple replacements
$originalName = $newName
}
}
}1 parent eef07b6 commit a6367d5
File tree
10 files changed
+12
-12
lines changed- cypress
- integration
- snapshots/visual-tests.spec.js
10 files changed
+12
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
| 202 | + | |
203 | 203 | | |
204 | | - | |
| 204 | + | |
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
215 | | - | |
| 214 | + | |
| 215 | + | |
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | | - | |
| 219 | + | |
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
224 | | - | |
| 223 | + | |
| 224 | + | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| |||
0 commit comments