Unlock commands now support a given time, e.g 10 minutes.

This commit is contained in:
Storm Dragon
2026-07-22 21:37:34 -04:00
parent 704b1a9558
commit 6a94f893b6
8 changed files with 934 additions and 34 deletions
+12
View File
@@ -108,6 +108,18 @@ func TestGlobalShortcutAliasesStayDocumented(t *testing.T) {
requireContains(t, js, "if(isGlobalShortcut(e, 't'))", "microphone shortcut")
}
func TestTimedUnlockCommandStaysDocumentedAndUsesServerAnnouncements(t *testing.T) {
js := readStaticFile(t, "skald.js")
requireContains(t, js, "[minutes[m|M] | HH:MM | h:mm AM/PM]", "unlock command help")
requireContains(t, js, "Intl.DateTimeFormat().resolvedOptions().timeZone", "unlock timezone")
requireContains(t, js, "timezoneOffset: new Date().getTimezoneOffset()", "unlock timezone fallback")
requireContains(t, js, "serverConnection.hallAction('unlock', {", "scheduled unlock request")
requireFunctionContains(t, js, "gotUserMessage", "displayMessage(text, false)")
requireFunctionContains(t, js, "displayError", "if(announce)")
requireFunctionContains(t, js, "displayError", "announceChat(text)")
}
func TestMicrophoneHardStopLivesInSelfMenu(t *testing.T) {
html := readStaticFile(t, "skald.html")
js := readStaticFile(t, "skald.js")