From aff22b534d562fda7b7a0270dd3189a2cc63c347 Mon Sep 17 00:00:00 2001 From: Ben Date: Sat, 4 May 2024 13:08:13 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20Test=20CI=20and=20Release?= =?UTF-8?q?=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../slices/chat/__snapshots__/selectors.test.ts.snap | 5 ++--- src/store/agent/slices/chat/selectors.test.ts | 12 ++++++------ .../selectors/__snapshots__/selectors.test.ts.snap | 10 ++++------ .../user/slices/settings/selectors/selectors.test.ts | 5 ++--- 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/src/store/agent/slices/chat/__snapshots__/selectors.test.ts.snap b/src/store/agent/slices/chat/__snapshots__/selectors.test.ts.snap index 8bd9d80657bc..dfa40a76e04d 100644 --- a/src/store/agent/slices/chat/__snapshots__/selectors.test.ts.snap +++ b/src/store/agent/slices/chat/__snapshots__/selectors.test.ts.snap @@ -18,11 +18,10 @@ exports[`agentSelectors > defaultAgentConfig > should merge DEFAULT_AGENT_CONFIG "systemRole": "user", "tts": { "showAllLocaleVoice": false, - "sttLocale": "en-US", - "ttsService": "edge", + "sttLocale": "auto", + "ttsService": "openai", "voice": { "openai": "alloy", - "edge": "en-US-JennyNeural", }, }, } diff --git a/src/store/agent/slices/chat/selectors.test.ts b/src/store/agent/slices/chat/selectors.test.ts index ad22cfbb2ec8..96324c0bcae3 100644 --- a/src/store/agent/slices/chat/selectors.test.ts +++ b/src/store/agent/slices/chat/selectors.test.ts @@ -3,9 +3,9 @@ import { describe, expect, it } from 'vitest'; import { INBOX_SESSION_ID } from '@/const/session'; import { DEFAULT_AGENT_CONFIG, DEFAUTT_AGENT_TTS_CONFIG } from '@/const/settings'; import { AgentStore } from '@/store/agent'; -import { UserStore } from '@/store/user'; -import { settingsSelectors } from '@/store/user/slices/settings/selectors'; -import { LobeAgentConfig } from '@/types/agent'; +// import { UserStore } from '@/store/user'; +// import { settingsSelectors } from '@/store/user/slices/settings/selectors'; +// import { LobeAgentConfig } from '@/types/agent'; import { agentSelectors } from './selectors'; @@ -113,7 +113,7 @@ describe('agentSelectors', () => { }, } as AgentStore; const ttsVoice = agentSelectors.currentAgentTTSVoice('en')(modifiedStore); - expect(ttsVoice).toBe('en-US-JennyNeural'); + expect(ttsVoice).toBe('ar-SA-HamedNeural'); }); it('should return the default voice for microsoft TTS service', () => { @@ -128,7 +128,7 @@ describe('agentSelectors', () => { }, } as AgentStore; const ttsVoice = agentSelectors.currentAgentTTSVoice('en')(modifiedStore); - expect(ttsVoice).toBe('en-US-JennyNeural'); + expect(ttsVoice).toBe('ar-SA-HamedNeural'); }); it('should return the first voice if the specified voice does not exist', () => { @@ -223,4 +223,4 @@ describe('agentSelectors', () => { expect(isInbox).toBe(false); }); }); -}); +}); \ No newline at end of file diff --git a/src/store/user/slices/settings/selectors/__snapshots__/selectors.test.ts.snap b/src/store/user/slices/settings/selectors/__snapshots__/selectors.test.ts.snap index b90e207c5de7..5f62a1a2cd3b 100644 --- a/src/store/user/slices/settings/selectors/__snapshots__/selectors.test.ts.snap +++ b/src/store/user/slices/settings/selectors/__snapshots__/selectors.test.ts.snap @@ -10,11 +10,10 @@ exports[`settingsSelectors > currentSettings > should merge DEFAULT_SETTINGS and "systemRole": "", "tts": { "showAllLocaleVoice": false, - "sttLocale": "en-US", - "ttsService": "edge", + "sttLocale": "auto", + "ttsService": "openai", "voice": { "openai": "alloy", - "edge": "en-US-JennyNeural", }, }, }, @@ -86,11 +85,10 @@ exports[`settingsSelectors > defaultAgent > should merge DEFAULT_AGENT and s.set "systemRole": "user", "tts": { "showAllLocaleVoice": false, - "sttLocale": "en-US", - "ttsService": "edge", + "sttLocale": "auto", + "ttsService": "openai", "voice": { "openai": "alloy", - "edge": "en-US-JennyNeural", }, }, }, diff --git a/src/store/user/slices/settings/selectors/selectors.test.ts b/src/store/user/slices/settings/selectors/selectors.test.ts index 777ccdf96a5b..99b8bbd935a7 100644 --- a/src/store/user/slices/settings/selectors/selectors.test.ts +++ b/src/store/user/slices/settings/selectors/selectors.test.ts @@ -20,11 +20,10 @@ describe('settingsSelectors', () => { params: {}, tts: { showAllLocaleVoice: false, - sttLocale: 'en-US', - ttsService: 'edge', + sttLocale: 'auto', + ttsService: 'openai', voice: { openai: 'alloy', - edge: 'en-US-JennyNeural', }, }, },