Skip to content

[Tests] ConsoleViewModelTests — [Fact(Skip="TODO needs to be fixed")] with no tracked follow-up #741

@Christophe-Rogiers

Description

@Christophe-Rogiers

Severity: Info
File: tests/Servy.Manager.UnitTests/ViewModels/ConsoleViewModelTests.cs line 53

Description:
A fully-written test is marked skipped with a vague TODO:

[Fact(Skip = "TODO needs to be fixed")]
public async Task ConsoleSearchText_Filter_FiltersVisibleLines()
{
    await Helper.RunOnSTA(async () =>
    {
        // full test setup + assertions …
        await Task.Delay(400);  // debounce race
        var filtered = vm.VisibleLines.Cast<LogLine>().ToList();
        Assert.Single(filtered);
        Assert.Contains("Crash", filtered[0].Text);
    }, createApp: true);
}

Unlike the three [Fact(Skip = "Requires elevated permissions not available in standard CI container")] entries in ProcessKillerTests — which are explicit and non-fixable on free CI — this skip has no tracked follow-up and no description of what needs to be fixed. It is therefore both an invisible coverage gap (debounce filtering is not tested) and a source of noise in reviews of the test file.

Suggested fix:
Decide on one of:

  1. Fix the test now: replace the Task.Delay(400) with a deterministic wait (signal/CTS/ManualResetEvent triggered by the debounce completion) and remove Skip.
  2. Delete the test if the behaviour under test is now covered by another suite (e.g., ViewModel-level filter tests that don't need the dispatcher).
  3. Convert the skip reason into a link to a tracked GH issue ("skipped pending #") so the debt is visible in search.

Option 1 is preferred — debounce/filter behaviour is worth the 10 minutes needed to make the wait deterministic.

Metadata

Metadata

Assignees

Labels

testsChanges to test code and coverage

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions