diff --git a/e2e/src/steps/community/detail-pages.steps.ts b/e2e/src/steps/community/detail-pages.steps.ts index ca8ba39c54..c7d31be1e8 100644 --- a/e2e/src/steps/community/detail-pages.steps.ts +++ b/e2e/src/steps/community/detail-pages.steps.ts @@ -8,7 +8,9 @@ import { CustomWorld } from '../../support/world'; // ============================================ Given('I wait for the page to fully load', async function (this: CustomWorld) { - await this.page.waitForLoadState('networkidle', { timeout: 30_000 }); + // Use domcontentloaded instead of networkidle to avoid hanging on persistent connections + await this.page.waitForLoadState('domcontentloaded', { timeout: 10_000 }); + // Short wait for React hydration await this.page.waitForTimeout(1000); }); diff --git a/e2e/src/steps/community/interactions.steps.ts b/e2e/src/steps/community/interactions.steps.ts index b782b4fffa..418e1e31fd 100644 --- a/e2e/src/steps/community/interactions.steps.ts +++ b/e2e/src/steps/community/interactions.steps.ts @@ -446,8 +446,8 @@ Then('I should be navigated to the assistant detail page', async function (this: Then('I should see the assistant detail content', async function (this: CustomWorld) { await this.page.waitForLoadState('networkidle', { timeout: 30_000 }); - // Look for detail page elements (e.g., title, description, etc.) - const detailContent = this.page.locator('[data-testid="detail-content"], main, article').first(); + // Look for assistant detail page content + const detailContent = this.page.locator('[data-testid="assistant-detail-content"]'); await expect(detailContent).toBeVisible({ timeout: 30_000 }); }); @@ -561,8 +561,8 @@ Then('I should be navigated to the MCP detail page', async function (this: Custo Then('I should see the MCP detail content', async function (this: CustomWorld) { await this.page.waitForLoadState('networkidle', { timeout: 30_000 }); - // Look for detail page elements - const detailContent = this.page.locator('[data-testid="detail-content"], main, article').first(); + // Look for MCP detail page content + const detailContent = this.page.locator('[data-testid="mcp-detail-content"]'); await expect(detailContent).toBeVisible({ timeout: 30_000 }); }); diff --git a/src/app/[variants]/(main)/community/(detail)/assistant/index.tsx b/src/app/[variants]/(main)/community/(detail)/assistant/index.tsx index e1abc862bd..4a7eefa2b3 100644 --- a/src/app/[variants]/(main)/community/(detail)/assistant/index.tsx +++ b/src/app/[variants]/(main)/community/(detail)/assistant/index.tsx @@ -40,7 +40,7 @@ const AssistantDetailPage = memo(({ mobile }) => { return ( - +
diff --git a/src/app/[variants]/(main)/community/(detail)/mcp/index.tsx b/src/app/[variants]/(main)/community/(detail)/mcp/index.tsx index c077d61f75..f288ad3a0a 100644 --- a/src/app/[variants]/(main)/community/(detail)/mcp/index.tsx +++ b/src/app/[variants]/(main)/community/(detail)/mcp/index.tsx @@ -35,7 +35,7 @@ const McpDetailPage = memo(({ mobile }) => { return ( - +