• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

orion-ecs / keen-eye / 20898707016

11 Jan 2026 05:00PM UTC coverage: 85.421%. First build
20898707016

Pull #926

github

web-flow
Merge 40002321b into e92f9bff8
Pull Request #926: feat(testbridge): Add IWindowController for window state queries

9596 of 13578 branches covered (70.67%)

Branch coverage included in aggregate %.

232 of 262 new or added lines in 10 files covered. (88.55%)

166204 of 192225 relevant lines covered (86.46%)

0.99 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

4.35
/src/KeenEyes.TestBridge.Client/RemoteWindowController.cs
1
using KeenEyes.TestBridge.Ipc.Protocol;
2
using KeenEyes.TestBridge.Window;
3

4
namespace KeenEyes.TestBridge.Client;
5

6
/// <summary>
7
/// Remote implementation of <see cref="IWindowController"/> that communicates over IPC.
8
/// </summary>
9
internal sealed class RemoteWindowController(TestBridgeClient client) : IWindowController
1✔
10
{
11
    /// <inheritdoc />
NEW
12
    public bool IsAvailable => client.SendRequestAsync<bool>("window.isAvailable", null, CancellationToken.None)
×
NEW
13
        .GetAwaiter().GetResult();
×
14

15
    /// <inheritdoc />
16
    public async Task<WindowStateSnapshot> GetStateAsync()
17
    {
NEW
18
        var result = await client.SendRequestAsync<WindowStateSnapshot>("window.getState", null, CancellationToken.None);
×
NEW
19
        return result ?? throw new InvalidOperationException("Failed to get window state");
×
NEW
20
    }
×
21

22
    /// <inheritdoc />
23
    public async Task<(int Width, int Height)> GetSizeAsync()
24
    {
NEW
25
        var result = await client.SendRequestAsync<WindowSizeResult>("window.getSize", null, CancellationToken.None);
×
NEW
26
        if (result == null)
×
27
        {
NEW
28
            return (0, 0);
×
29
        }
30

NEW
31
        return (result.Width, result.Height);
×
NEW
32
    }
×
33

34
    /// <inheritdoc />
35
    public async Task<string> GetTitleAsync()
36
    {
NEW
37
        var result = await client.SendRequestAsync<string>("window.getTitle", null, CancellationToken.None);
×
NEW
38
        return result ?? string.Empty;
×
NEW
39
    }
×
40

41
    /// <inheritdoc />
42
    public async Task<bool> IsClosingAsync()
43
    {
NEW
44
        return await client.SendRequestAsync<bool>("window.isClosing", null, CancellationToken.None);
×
NEW
45
    }
×
46

47
    /// <inheritdoc />
48
    public async Task<bool> IsFocusedAsync()
49
    {
NEW
50
        return await client.SendRequestAsync<bool>("window.isFocused", null, CancellationToken.None);
×
NEW
51
    }
×
52

53
    /// <inheritdoc />
54
    public async Task<float> GetAspectRatioAsync()
55
    {
NEW
56
        return await client.SendRequestAsync<float>("window.getAspectRatio", null, CancellationToken.None);
×
NEW
57
    }
×
58
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc