Moved disable microphone into the menu you get when clicking on your own name.
This commit is contained in:
@@ -23,6 +23,13 @@ func requireContains(t *testing.T, text, want, context string) {
|
||||
}
|
||||
}
|
||||
|
||||
func requireNotContains(t *testing.T, text, unwanted, context string) {
|
||||
t.Helper()
|
||||
if strings.Contains(text, unwanted) {
|
||||
t.Fatalf("%s unexpectedly contains %q", context, unwanted)
|
||||
}
|
||||
}
|
||||
|
||||
func requireFunctionContains(t *testing.T, source, functionName, want string) {
|
||||
t.Helper()
|
||||
start := strings.Index(source, "function "+functionName+"(")
|
||||
@@ -86,3 +93,16 @@ func TestGlobalShortcutAliasesStayDocumented(t *testing.T) {
|
||||
requireContains(t, js, "if(isGlobalShortcut(e, 'c'))", "chat shortcut")
|
||||
requireContains(t, js, "if(isGlobalShortcut(e, 't'))", "microphone shortcut")
|
||||
}
|
||||
|
||||
func TestMicrophoneHardStopLivesInSelfMenu(t *testing.T) {
|
||||
html := readStaticFile(t, "skald.html")
|
||||
js := readStaticFile(t, "skald.js")
|
||||
|
||||
requireNotContains(t, html, `id="unpresentbutton"`, "toolbar")
|
||||
requireNotContains(t, html, `aria-label="Disable microphone"`, "toolbar")
|
||||
requireNotContains(t, js, "getButtonElement('unpresentbutton')", "toolbar handler")
|
||||
requireNotContains(t, js, "setVisibility('unpresentbutton'", "toolbar visibility")
|
||||
requireFunctionContains(t, js, "userMenu", "Turn microphone off")
|
||||
requireFunctionContains(t, js, "userMenu", "closeUpMedia('audio')")
|
||||
requireFunctionContains(t, js, "userMenu", "Restart audio connection")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user