ソースを参照

test(client): align popup aria anchors with locale rollout

imccyu 1 ヶ月 前
コミット
e56da2e47e
1 ファイル変更2 行追加2 行削除
  1. 2 2
      packages/client/ui-command/tests/popup-view.spec.tsx

+ 2 - 2
packages/client/ui-command/tests/popup-view.spec.tsx

@@ -167,7 +167,7 @@ describe('PopupSelectView', () => {
       onSelect,
       onSelect,
     })
     })
     await act(async () => { fireEvent.click(screen.getByRole('option', { name: 'Full access' })) })
     await act(async () => { fireEvent.click(screen.getByRole('option', { name: 'Full access' })) })
-    expect(screen.queryByLabelText('/theme options')).toBeNull()
+    expect(screen.queryByLabelText('/theme 选项')).toBeNull()
     expect(screen.getByRole('dialog', { name: 'Enable Full access?' })).toBeTruthy()
     expect(screen.getByRole('dialog', { name: 'Enable Full access?' })).toBeTruthy()
     const enable = screen.getByRole('button', { name: 'Enable Full access' }) as HTMLButtonElement
     const enable = screen.getByRole('button', { name: 'Enable Full access' }) as HTMLButtonElement
     expect(enable.disabled).toBe(true)
     expect(enable.disabled).toBe(true)
@@ -186,7 +186,7 @@ describe('PopupSelectView', () => {
     await act(async () => { fireEvent.click(screen.getByRole('option', { name: 'Full access' })) })
     await act(async () => { fireEvent.click(screen.getByRole('option', { name: 'Full access' })) })
     fireEvent.click(screen.getByRole('checkbox'))
     fireEvent.click(screen.getByRole('checkbox'))
     fireEvent.click(screen.getByRole('button', { name: 'Cancel' }))
     fireEvent.click(screen.getByRole('button', { name: 'Cancel' }))
-    expect(screen.getByLabelText('/theme options')).toBeTruthy()
+    expect(screen.getByLabelText('/theme 选项')).toBeTruthy()
     await act(async () => { fireEvent.click(screen.getByRole('option', { name: 'Full access' })) })
     await act(async () => { fireEvent.click(screen.getByRole('option', { name: 'Full access' })) })
     expect(screen.getByRole<HTMLInputElement>('checkbox').checked).toBe(false)
     expect(screen.getByRole<HTMLInputElement>('checkbox').checked).toBe(false)
   })
   })