Compare commits

...

1 Commits

Author SHA1 Message Date
yyh
d54697b0d0 test(web): query collaboration loading by status
Remove the redundant collaboration overlay test id and use the existing status role across the graph-ready transition test. Keep the overlay layout and collaboration state behavior unchanged.
2026-08-09 12:36:33 +08:00
2 changed files with 2 additions and 5 deletions

View File

@@ -581,7 +581,7 @@ describe('WorkflowMain', () => {
render(<WorkflowMain nodes={[]} edges={[]} viewport={{ x: 0, y: 0, zoom: 1 }} />)
expect(screen.queryByTestId('collaboration-graph-loading')).not.toBeInTheDocument()
expect(screen.queryByRole('status')).not.toBeInTheDocument()
act(() => collaborationListeners.graphReadyChange?.(false))
expect(screen.getByRole('status')).toHaveTextContent('workflow.common.syncingData')

View File

@@ -534,10 +534,7 @@ const WorkflowMain = ({ nodes, edges, viewport }: WorkflowMainProps) => {
</WorkflowWithInnerContext>
{isCollaborationEnabled &&
(collaborationGraphState.appId !== appId || !collaborationGraphState.isReady) && (
<div
data-testid="collaboration-graph-loading"
className="absolute inset-0 z-50 flex cursor-wait items-center justify-center"
>
<div className="absolute inset-0 z-50 flex cursor-wait items-center justify-center">
<div
role="status"
aria-live="polite"