Default rate was a bit slow even for being slow. Fixed to a more sane starting point.
This commit is contained in:
1 parent
3b7a44c224
commit
6be06d26af
9 files changed
+17
-17
No files matched your search
@@ -271,7 +271,7 @@ func TestAttributeSessionToggleQuickSaveAndFreshStartup(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
saved, _, err := config.Load(path, nil)
|
||||
if err != nil || saved.Reading.Attributes != mode || saved.Reading.AttributeFormat != "fenrirBold" || saved.Presentation.Speech.Rate != -10 {
|
||||
if err != nil || saved.Reading.Attributes != mode || saved.Reading.AttributeFormat != "fenrirBold" || saved.Presentation.Speech.Rate != 10 {
|
||||
t.Fatal("temporary toggle persisted", saved, err)
|
||||
}
|
||||
settings = saved
|
||||
|
||||
@@ -90,14 +90,14 @@ func TestHardwareQuickSettingsOnlyOfferSupportedControls(t *testing.T) {
|
||||
menu.selectSpeech = func(config.Speech, func(error, bool)) {
|
||||
t.Fatal("hardware numeric adjustment tried reopening the device")
|
||||
}
|
||||
for _, want := range []string{"speech pitch 0", "speech volume 100", "speech rate -20"} {
|
||||
for _, want := range []string{"speech pitch 0", "speech volume 100", "speech rate 0"} {
|
||||
menu.command(command.NextQuickEntry, &settings, voice)
|
||||
if got := voice.messages[len(voice.messages)-1]; got != want {
|
||||
t.Fatal(driver, got, want)
|
||||
}
|
||||
}
|
||||
menu.command(command.NextQuickValue, &settings, voice)
|
||||
if settings.Presentation.Speech.Rate != -10 || voice.parameters[len(voice.parameters)-1].Rate != -10 {
|
||||
if settings.Presentation.Speech.Rate != 10 || voice.parameters[len(voice.parameters)-1].Rate != 10 {
|
||||
t.Fatal(settings, voice.parameters)
|
||||
}
|
||||
}
|
||||
@@ -125,7 +125,7 @@ func TestQuickChangesSurviveMenuCancelAndExplicitSaveThenQuit(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
saved, _, err := config.Load(path, nil)
|
||||
if err != nil || saved.Presentation.Speech.Rate != -10 || saved.Presentation.Speech.Pitch != -10 || !saved.Reading.Automatic || saved.Reading.Mode != "table" || !reflect.DeepEqual(saved.General, base.General) {
|
||||
if err != nil || saved.Presentation.Speech.Rate != 10 || saved.Presentation.Speech.Pitch != -10 || !saved.Reading.Automatic || saved.Reading.Mode != "table" || !reflect.DeepEqual(saved.General, base.General) {
|
||||
t.Fatal(saved, err)
|
||||
}
|
||||
if !strings.Contains(strings.Join(voice.messages, "|"), "Settings saved.") {
|
||||
@@ -209,7 +209,7 @@ func TestSessionMuteDoesNotPersistAcrossRestart(t *testing.T) {
|
||||
if err != nil || settings.Presentation.Speech.Enabled != trial.enabled {
|
||||
t.Fatal("session mute changed saved speech enablement", settings.Presentation.Speech, err)
|
||||
}
|
||||
if trial.save && settings.Presentation.Speech.Rate != -10 {
|
||||
if trial.save && settings.Presentation.Speech.Rate != 10 {
|
||||
t.Fatal("quick speech adjustment was not saved", settings.Presentation.Speech)
|
||||
}
|
||||
}
|
||||
@@ -278,7 +278,7 @@ func TestSessionAutomaticReadingDoesNotPersistAcrossRestart(t *testing.T) {
|
||||
if err != nil || settings.Reading.Automatic != trial.automatic || !settings.Presentation.Speech.Enabled {
|
||||
t.Fatal("session reading toggle changed saved startup behavior", settings, err)
|
||||
}
|
||||
if trial.save && settings.Presentation.Speech.Rate != -10 {
|
||||
if trial.save && settings.Presentation.Speech.Rate != 10 {
|
||||
t.Fatal("quick adjustment was not saved", settings.Presentation.Speech)
|
||||
}
|
||||
}
|
||||
@@ -306,7 +306,7 @@ func TestSaveFailureKeepsRunningQuickSettings(t *testing.T) {
|
||||
case <-time.After(time.Second):
|
||||
t.Fatal("save hung")
|
||||
}
|
||||
if saver.busy || settings.Presentation.Speech.Rate != -10 || voice.messages[len(voice.messages)-1] != "Failed to save settings." {
|
||||
if saver.busy || settings.Presentation.Speech.Rate != 10 || voice.messages[len(voice.messages)-1] != "Failed to save settings." {
|
||||
t.Fatal(settings, voice.messages)
|
||||
}
|
||||
}
|
||||
@@ -342,7 +342,7 @@ func TestQuickCategoriesRememberSelectionAndWrap(t *testing.T) {
|
||||
t.Fatalf("%s: got %q, want %q", trial.id, got, trial.want)
|
||||
}
|
||||
}
|
||||
if menu := new_quick_settings("speech-dispatcher"); !menu.command(command.CurrentQuickEntry, &settings, voice) || voice.messages[len(voice.messages)-1] != "speech rate -20" {
|
||||
if menu := new_quick_settings("speech-dispatcher"); !menu.command(command.CurrentQuickEntry, &settings, voice) || voice.messages[len(voice.messages)-1] != "speech rate 0" {
|
||||
t.Fatal("new session did not reset selection", voice.messages)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ func TestMenuSelectionFailurePreservesDiskAndCommittedSaveSurvivesClose(t *testi
|
||||
t.Fatal("failure changed disk/live", outcome)
|
||||
}
|
||||
} else {
|
||||
if outcome != nil || a.settings.live.Presentation.Speech.Voice != "Base Voice" || a.settings.live.Presentation.Speech.Rate != -10 || a.settings.resetBase.Presentation.Speech.Rate != -20 || a.settings.resetBase.Presentation.Speech.Voice != "Base Voice" {
|
||||
if outcome != nil || a.settings.live.Presentation.Speech.Voice != "Base Voice" || a.settings.live.Presentation.Speech.Rate != 10 || a.settings.resetBase.Presentation.Speech.Rate != 0 || a.settings.resetBase.Presentation.Speech.Voice != "Base Voice" {
|
||||
t.Fatal("committed selection or newer numeric override lost", outcome, a.settings.live, a.settings.resetBase)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user