Skip to content

Commit 74974db

Browse files
岳琮淏岳琮淏
authored andcommitted
test: align cross-platform fixtures on Apple Silicon
1 parent 9ab79b8 commit 74974db

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

apps/dsa-desktop/tests/main.test.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,10 @@ test('renderDesktopShareImage captures the complete local poster and closes its
224224
}
225225
FakeRenderWindow.getAllWindows = () => [];
226226

227-
const mainModule = loadMainModule(t, { browserWindow: FakeRenderWindow });
227+
const mainModule = loadMainModule(t, {
228+
browserWindow: FakeRenderWindow,
229+
platform: 'win32',
230+
});
228231
const sourceWindow = {
229232
isDestroyed: () => false,
230233
webContents: {

apps/dsa-web/src/components/alerts/__tests__/AlertRuleForm.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,16 +234,16 @@ describe('AlertRuleForm', () => {
234234
expect(screen.queryByText('组合回撤')).not.toBeInTheDocument();
235235
});
236236

237-
it('shows JP/KR options for market region in Chinese UI mode', () => {
237+
it('keeps JP/KR out of market light options in Chinese UI mode', () => {
238238
render(<AlertRuleForm onSubmit={onSubmit} />);
239239

240240
fireEvent.change(screen.getByLabelText('目标范围'), { target: { value: 'market' } });
241241

242242
expect(screen.getByRole('option', { name: 'A 股(cn)' })).toBeInTheDocument();
243243
expect(screen.getByRole('option', { name: '港股(hk)' })).toBeInTheDocument();
244244
expect(screen.getByRole('option', { name: '美股(us)' })).toBeInTheDocument();
245-
expect(screen.getByRole('option', { name: '日股(jp)' })).toBeInTheDocument();
246-
expect(screen.getByRole('option', { name: '韩股(kr)' })).toBeInTheDocument();
245+
expect(screen.queryByRole('option', { name: '日股(jp)' })).not.toBeInTheDocument();
246+
expect(screen.queryByRole('option', { name: '韩股(kr)' })).not.toBeInTheDocument();
247247
});
248248

249249
it('submits a market light status rule payload', async () => {

apps/dsa-web/src/components/settings/__tests__/SettingsField.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ describe('SettingsField', () => {
6868
);
6969

7070
expect(screen.getByLabelText('TickFlow 日 K 优先级')).toBeInTheDocument();
71-
expect(screen.getByText(/ TickFlow A K 退/)).toBeInTheDocument();
71+
expect(screen.getByText(/ TickFlow A K 退/)).toBeInTheDocument();
7272
expect(screen.queryByText(/Priority for TickFlow daily K-line fetcher/)).not.toBeInTheDocument();
7373
});
7474
it('uses schema key for TickFlow localization when the runtime item key differs', () => {

0 commit comments

Comments
 (0)