Commit 85002f8
[Unified Data Table] Improve failing test speed (elastic#243168)
## Summary
Closes elastic#234829
Closes elastic#240905
Closes elastic#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 scenarios1 parent c2f0090 commit 85002f8
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 | |
|---|---|---|---|
| |||
1310 | 1310 | | |
1311 | 1311 | | |
1312 | 1312 | | |
1313 | | - | |
1314 | | - | |
| 1313 | + | |
| 1314 | + | |
1315 | 1315 | | |
1316 | 1316 | | |
1317 | 1317 | | |
1318 | 1318 | | |
1319 | 1319 | | |
1320 | | - | |
1321 | | - | |
1322 | | - | |
1323 | | - | |
1324 | | - | |
1325 | 1320 | | |
1326 | 1321 | | |
1327 | 1322 | | |
| |||
1339 | 1334 | | |
1340 | 1335 | | |
1341 | 1336 | | |
1342 | | - | |
| 1337 | + | |
1343 | 1338 | | |
1344 | 1339 | | |
1345 | 1340 | | |
| |||
1364 | 1359 | | |
1365 | 1360 | | |
1366 | 1361 | | |
1367 | | - | |
| 1362 | + | |
1368 | 1363 | | |
1369 | 1364 | | |
1370 | 1365 | | |
| |||
1387 | 1382 | | |
1388 | 1383 | | |
1389 | 1384 | | |
| 1385 | + | |
1390 | 1386 | | |
1391 | | - | |
1392 | | - | |
1393 | | - | |
1394 | | - | |
1395 | | - | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
1396 | 1390 | | |
| 1391 | + | |
1397 | 1392 | | |
1398 | 1393 | | |
1399 | | - | |
1400 | | - | |
1401 | | - | |
1402 | | - | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
1403 | 1397 | | |
1404 | | - | |
1405 | | - | |
1406 | | - | |
1407 | | - | |
| 1398 | + | |
| 1399 | + | |
1408 | 1400 | | |
1409 | 1401 | | |
1410 | 1402 | | |
| |||
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