Add opt-in GOG achievements through Comet (#651)

This commit is contained in:
Kurt Himebauch authored and GitHub committed 2026-10-12 16:40:06 -04:00
1 parent 3ed756b067
commit 8f36eb7f54
35 files changed
+1364 -45

No files matched your search

@@ -0,0 +1,29 @@
package com.droiddeck.launcher.session
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNull
import org.junit.Test
class SessionAchievementGameTest {
private val installed = setOf(10L, 20L)
@Test fun exitingGameCannotRemainSelectedWithoutItsWindow() {
assertNull(SessionAchievementGame.activeAppId(10, listOf(769), installed))
}
@Test fun steamOverlayKeepsTheRunningGameSelected() {
assertEquals(10L, SessionAchievementGame.activeAppId(769, listOf(769, 10), installed))
}
@Test fun anotherForegroundAppCannotBorrowABackgroundGamesAchievements() {
assertNull(SessionAchievementGame.activeAppId(30, listOf(30, 10), installed))
}
@Test fun ambiguousBackgroundGamesDoNotPickAnArbitraryGame() {
assertNull(SessionAchievementGame.activeAppId(769, listOf(769, 10, 20), installed))
}
@Test fun theForegroundGameWinsWhenSeveralGamesAreRunning() {
assertEquals(20L, SessionAchievementGame.activeAppId(20, listOf(769, 10, 20), installed))
}
}