mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-09-24 16:05:33 +00:00
Remove tests for app badgecount
These require a full-blown desktop environment which is hardly ever available where these tests are run
This commit is contained in:
@@ -47,28 +47,6 @@ namespace ElectronNET.IntegrationTests.Tests
|
||||
Directory.Exists(temp).Should().BeTrue();
|
||||
}
|
||||
|
||||
|
||||
[Fact(Timeout = 20000)]
|
||||
public async Task Badge_count_roundtrip_where_supported()
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||
{
|
||||
var ok = await Electron.App.SetBadgeCountAsync(3);
|
||||
ok.Should().BeTrue();
|
||||
var count = await Electron.App.GetBadgeCountAsync();
|
||||
count.Should().Be(3);
|
||||
// reset
|
||||
await Electron.App.SetBadgeCountAsync(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
// On Windows it's usually unsupported; ensure badge query works and returns a non-negative value
|
||||
await Electron.App.SetBadgeCountAsync(0); // ignore return value
|
||||
var count = await Electron.App.GetBadgeCountAsync();
|
||||
count.Should().BeGreaterOrEqualTo(0);
|
||||
}
|
||||
}
|
||||
|
||||
[Fact(Timeout = 20000)]
|
||||
public async Task Can_get_app_metrics()
|
||||
{
|
||||
@@ -133,7 +111,7 @@ namespace ElectronNET.IntegrationTests.Tests
|
||||
await Electron.App.SetBadgeCountAsync(2);
|
||||
var count = await Electron.App.GetBadgeCountAsync();
|
||||
// Some platforms may always return0; just ensure call didn't throw and is non-negative
|
||||
count.Should().BeGreaterOrEqualTo(0);
|
||||
count.Should().BeGreaterThanOrEqualTo(0);
|
||||
await Electron.App.SetBadgeCountAsync(0);
|
||||
}
|
||||
|
||||
@@ -144,17 +122,6 @@ namespace ElectronNET.IntegrationTests.Tests
|
||||
metrics[0].Cpu.Should().NotBeNull();
|
||||
}
|
||||
|
||||
[Fact(Timeout = 20000)]
|
||||
public async Task App_badge_count_roundtrip()
|
||||
{
|
||||
// Set then get (non-mac platforms treat as no-op but should return0 or set value)
|
||||
var success = await Electron.App.SetBadgeCountAsync(3);
|
||||
success.Should().BeTrue();
|
||||
var count = await Electron.App.GetBadgeCountAsync();
|
||||
// Allow fallback to0 on platforms without badge support
|
||||
(count == 3 || count == 0).Should().BeTrue();
|
||||
}
|
||||
|
||||
[Fact(Timeout = 20000)]
|
||||
public async Task App_gpu_feature_status_has_some_fields()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user