SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
test(integrations): stop GCP account settings drawer tests timing out under load (#13310)
Vinicius Lourençoc3e4ca277d46
diff --git a/frontend/src/container/Integrations/CloudIntegration/GoogleCloudPlatform/__tests__/AccountSettingsDrawer.test.tsx b/frontend/src/container/Integrations/CloudIntegration/GoogleCloudPlatform/__tests__/AccountSettingsDrawer.test.tsxindex 133485a32a..ca45f5c6b6 100644--- a/frontend/src/container/Integrations/CloudIntegration/GoogleCloudPlatform/__tests__/AccountSettingsDrawer.test.tsx+++ b/frontend/src/container/Integrations/CloudIntegration/GoogleCloudPlatform/__tests__/AccountSettingsDrawer.test.tsx@@ -30,6 +30,19 @@ jest.mock('@signozhq/ui/sonner', () => ({},}));+// jsdom has no layout, and Floating UI's getComputedStyle walk over every+// popover ancestor costs ~1 s per open here, enough to time out under load.+jest.mock('@floating-ui/dom', () => ({+ ...jest.requireActual('@floating-ui/dom'),+ autoUpdate: (): (() => void) => (): void => {},+ computePosition: (+ _reference: unknown,+ _floating: unknown,+ { placement = 'bottom', strategy = 'absolute' } = {},+ ): Promise<unknown> =>+ Promise.resolve({ x: 0, y: 0, placement, strategy, middlewareData: {} }),+}));+type AccountSettingsDrawerProps = ComponentProps<typeof AccountSettingsDrawer>;const onClose = jest.fn() as jest.MockedFunction<@@ -90,7 +103,7 @@ describe('GCP AccountSettingsDrawer', () => {});it('keeps save disabled until the project IDs actually change', async () => {- const user = userEvent.setup();+ const user = userEvent.setup({ pointerEventsCheck: 0 });renderDrawer();expect(screen.getByTestId('gcp-update-account-btn')).toHaveAttribute(@@ -109,7 +122,7 @@ describe('GCP AccountSettingsDrawer', () => {});it('sends the updated project IDs while preserving the immutable deployment fields', async () => {- const user = userEvent.setup();+ const user = userEvent.setup({ pointerEventsCheck: 0 });renderDrawer();await addProjectIds(user, 'gcp-edit-project-ids-select', ['project-c']);@@ -152,7 +165,7 @@ describe('GCP AccountSettingsDrawer', () => {});it('blocks the update and shows a validation error when every project ID is removed', async () => {- const user = userEvent.setup();+ const user = userEvent.setup({ pointerEventsCheck: 0 });renderDrawer();// Strip every tag via its remove icon; the list shrinks as we go.@@ -188,7 +201,7 @@ describe('GCP AccountSettingsDrawer', () => {),);- const user = userEvent.setup();+ const user = userEvent.setup({ pointerEventsCheck: 0 });renderDrawer();await addProjectIds(user, 'gcp-edit-project-ids-select', ['project-c']);