Compare commits

...

1 Commits

Author SHA1 Message Date
yyh
41fb1b974f test(web): query notion loading by status
Remove the redundant Notion loading test id and assert the existing named status exposed by the shared Loading component. Keep the rendered layout and loading behavior unchanged.
2026-08-09 12:32:49 +08:00
2 changed files with 3 additions and 6 deletions

View File

@@ -121,7 +121,7 @@ describe('NotionPageSelector Base', () => {
render(<NotionPageSelector credentialList={mockCredentialList} onSelect={vi.fn()} />)
expect(screen.getByTestId('notion-page-selector-loading')).toBeInTheDocument()
expect(screen.getByRole('status', { name: 'appApi.loading' })).toBeInTheDocument()
})
it('should render connector and open settings when fetch fails', async () => {
@@ -334,7 +334,7 @@ describe('NotionPageSelector Base', () => {
isError: false,
} as unknown as ReturnType<typeof usePreImportNotionPages>)
render(<NotionPageSelector credentialList={mockCredentialList} onSelect={vi.fn()} />)
expect(screen.getByTestId('notion-page-selector-loading')).toBeInTheDocument()
expect(screen.getByRole('status', { name: 'appApi.loading' })).toBeInTheDocument()
})
it('should handle credential with empty id', () => {

View File

@@ -194,10 +194,7 @@ const NotionPageSelector = ({
</div>
<div className="overflow-hidden rounded-b-xl">
{isFetchingNotionPages ? (
<div
className="flex h-74 items-center justify-center"
data-testid="notion-page-selector-loading"
>
<div className="flex h-74 items-center justify-center">
<Loading />
</div>
) : (