Commit c4e7b05
committed
[Unified Data Table] Improve failing test speed (#243168)
## Summary
Closes #234829
Closes #240905
Closes #240904
All 3 tests were timing out so lets try to improve how fast they run -
for this this PR changes from `get/queryByRole` to `get/queryByTestId`
as it speeds up the tests significantly.
Times measured isolating the tests using `it.only` and using the mean
time of 10 runs + mean time of 10 runs of the whole file.
> [!NOTE]
> Both scripts to measure the test times were generated by ChatGPT
Individual tests where measured with this script + `it.only`:
[run-tests.sh](https://github.com/user-attachments/files/23580522/run-tests.sh)
The whole test file was measured using this script:
[all-tests.sh](https://github.com/user-attachments/files/23580737/all-tests.sh)
| Test | Before | After |
|--|--------|------|
| should show the reset width button only for absolute width columns,
and allow resetting to default width | 1268ms | 637ms |
| should not reset the last column to auto width when there are
remaining auto width columns | 894ms | 346ms |
| should reset the last column to auto width if only absolute width
columns remain | 893ms | 359ms |
| All tests | 21.069s | 17.338s |
### Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
(cherry picked from commit 94c5602)1 parent a061701 commit c4e7b05
3 files changed
Lines changed: 26 additions & 22 deletions
File tree
Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 14 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1307 | 1307 | | |
1308 | 1308 | | |
1309 | 1309 | | |
1310 | | - | |
1311 | | - | |
| 1310 | + | |
| 1311 | + | |
1312 | 1312 | | |
1313 | 1313 | | |
1314 | 1314 | | |
1315 | 1315 | | |
1316 | 1316 | | |
1317 | | - | |
1318 | | - | |
1319 | | - | |
1320 | | - | |
1321 | | - | |
1322 | 1317 | | |
1323 | 1318 | | |
1324 | 1319 | | |
| |||
1336 | 1331 | | |
1337 | 1332 | | |
1338 | 1333 | | |
1339 | | - | |
| 1334 | + | |
1340 | 1335 | | |
1341 | 1336 | | |
1342 | 1337 | | |
| |||
1361 | 1356 | | |
1362 | 1357 | | |
1363 | 1358 | | |
1364 | | - | |
| 1359 | + | |
1365 | 1360 | | |
1366 | 1361 | | |
1367 | 1362 | | |
| |||
1384 | 1379 | | |
1385 | 1380 | | |
1386 | 1381 | | |
| 1382 | + | |
1387 | 1383 | | |
1388 | | - | |
1389 | | - | |
1390 | | - | |
1391 | | - | |
1392 | | - | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
1393 | 1387 | | |
| 1388 | + | |
1394 | 1389 | | |
1395 | 1390 | | |
1396 | | - | |
1397 | | - | |
1398 | | - | |
1399 | | - | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
1400 | 1394 | | |
1401 | | - | |
1402 | | - | |
1403 | | - | |
1404 | | - | |
| 1395 | + | |
| 1396 | + | |
1405 | 1397 | | |
1406 | 1398 | | |
1407 | 1399 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| 247 | + | |
247 | 248 | | |
248 | 249 | | |
249 | 250 | | |
| |||
0 commit comments