mirror of
https://github.com/LizardByte/tray.git
synced 2026-10-23 03:27:02 +09:00
test(Windows): stabilize tray notification CI test (#185)
This commit is contained in:
1 parent
dbacfbe8c3
commit
c329d9fd0d
3 files changed
+23
-1
No files matched your search
@@ -8,6 +8,23 @@ runs:
|
||||
- name: Configure Windows tray screenshots
|
||||
shell: pwsh
|
||||
run: |
|
||||
echo "::group::Use dark Windows appearance"
|
||||
$personalizeSettings = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize"
|
||||
New-Item -Path $personalizeSettings -Force | Out-Null
|
||||
New-ItemProperty `
|
||||
-Path $personalizeSettings `
|
||||
-Name "AppsUseLightTheme" `
|
||||
-PropertyType DWord `
|
||||
-Value 0 `
|
||||
-Force | Out-Null
|
||||
New-ItemProperty `
|
||||
-Path $personalizeSettings `
|
||||
-Name "SystemUsesLightTheme" `
|
||||
-PropertyType DWord `
|
||||
-Value 0 `
|
||||
-Force | Out-Null
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Enable all tray icons"
|
||||
$trayIconScript = Join-Path $env:RUNNER_TEMP "Enable-AllTrayIcons.ps1"
|
||||
Invoke-WebRequest `
|
||||
|
||||
@@ -59,7 +59,9 @@ jobs:
|
||||
- os: ubuntu-latest
|
||||
shell: "bash"
|
||||
qt_version: '6'
|
||||
- os: windows-latest
|
||||
# Windows Server 2022 renders QSystemTrayIcon notifications. The newer
|
||||
# windows-latest image suppresses them in its interactive session.
|
||||
- os: windows-2022
|
||||
shell: "msys2 {0}"
|
||||
qt_version: '6'
|
||||
steps:
|
||||
|
||||
@@ -401,6 +401,9 @@ TEST_P(TrayNotificationIconTest, TestNotificationDisplay) {
|
||||
int initResult = tray_init(&testTray);
|
||||
trayRunning = (initResult == 0);
|
||||
ASSERT_EQ(initResult, 0);
|
||||
|
||||
// Let the desktop shell process the new icon before sending its notification.
|
||||
WaitForTrayReady();
|
||||
dismissNativeNotifications();
|
||||
|
||||
// Set notification properties
|
||||
|
||||
Reference in new issue
Block a user