Repository navigation
fix(gui): show actual skip status of tests after gui restart - #819
ekazakov14 wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Hey! Thanks a lot for the contribution!
After careful review & local testing I think this PR doesn't really address the issues it's aiming to solve:
- If the test is skipped, launch GUI, then unskip it and launch GUI again = test remains skipped
- If the test was launched at least once, it will never appear as skipped anymore, because that's enough for the "getNotPendingTestSpecs" to consider test to be "not pending"
I'm not entirely satisfied with the fact that we have even more fixes on top fixes on top of fixes here and it feels like things start to get out of hand.
The "perfect" solution in the long run is for us to get rid of the "skipped" and "idle" statuses of test results, because those aren't actually results. But that requires a deep refactor and will probably be a breaking change. I will try to find some time for this in the future, but no promises yet.
As for the "get it working" solution, I think the clean (well, "the least ugly") fix would be to have an explicit step that resolves skipped/not-skipped status as a final step in the pipeline which either removes last skipped test status (and replaces it with idle if it's the only attempt) OR adds the skipped attempt. And this step should be used everywhere: in watch mode, GUI tree building, etc. However, with this, we should be very careful with reportBuilder.provideAttempt logic
Проблема
После перезапуска GUI показывает статус скипа из прошлой сессии, а не актуальный:
skippedskippedskipped, в старом UI у строки теста нет RetryidlesuccesssuccesssuccessskippedРешение
buildTreeFromCurrentDbпринимаетexcludeSkippedи отбрасываетskipped-записи тестов, которые сейчас не pending, — по тому же правилу, что watch-режим уже применяет вrestoreTestHistory.ToolRunnerпередаёт этот параметр при старте, вrefreshTestsи при полной замене коллекции тестов. Это исправляет старт 2.buildTreeFromCurrentDb, а не из файлаsqlite.db: в текущей БД уже естьskipped, записанный при этом старте.skippedне пишется в БД, только если последний результат теста ужеskipped:getTestFromDbвозвращает последнюю запись теста независимо от её статуса, без кэша запроса. Вместе с предыдущим пунктом это исправляет старт 4.