-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Remove ChatActivity component and associated references #2648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,14 +12,17 @@ test("concurrent chat", async ({ po }) => { | |
| await po.navigation.goToAppsTab(); | ||
| await po.sendPrompt("tc=chat2"); | ||
| await po.snapshotMessages(); | ||
| await po.chatActions.clickChatActivityButton(); | ||
|
|
||
| // Chat #1 will be the last in the list | ||
| expect( | ||
| await po.page.getByTestId(`chat-activity-list-item-1`).textContent(), | ||
| ).toContain("Chat #1"); | ||
| await po.page.getByTestId(`chat-activity-list-item-1`).click(); | ||
| await po.snapshotMessages({ timeout: 12_000 }); | ||
| // Chat #1 tab should be visible in the chat tabs with an "in progress" indicator | ||
| // Find the tab that contains the "Chat in progress" indicator and click it | ||
| const chat1TabContainer = po.page | ||
| .locator('[aria-label="Chat in progress"]') | ||
| .locator( | ||
| "xpath=ancestor::div[contains(@class, 'flex') and contains(@class, 'h-10')]", | ||
| ); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 MEDIUM | test-brittleness | Found by: Correctness & Code Health, Endorsed by: UX Brittle XPath selector coupled to Tailwind CSS classes This XPath expression 💡 Suggestion: Add a |
||
| await expect(chat1TabContainer).toBeVisible(); | ||
|
|
||
| // | ||
| // Click the button inside the tab to select it | ||
| await chat1TabContainer.locator("button").first().click(); | ||
| await po.snapshotMessages({ timeout: 12_000 }); | ||
| }); | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ambiguous tab selection
This locator selects the first
[aria-label="Chat in progress"]on the page, then clicks the firstbuttonin its ancestor tab. If chat #2 is also still streaming at this point (timing-dependent), this can click the wrong tab and make the test flaky (snapshotting chat #2 instead of chat #1). Consider scoping the selection to chat #1’s tab (e.g., by title/text liketc=chat1/ “Chat #1”, or a stable test id on the tab) rather than relying on a global "in progress" indicator +.first().Prompt To Fix With AI