Skip to content

fix(e2e): make bot response test strict#500

Open
udithishanka wants to merge 12 commits intomainfrom
feat/strict-bot-response-test
Open

fix(e2e): make bot response test strict#500
udithishanka wants to merge 12 commits intomainfrom
feat/strict-bot-response-test

Conversation

@udithishanka
Copy link
Copy Markdown
Collaborator

Summary

  • Remove graceful degradation from "Bot responds to message" E2E test
  • Test now fails if the bot returns "Sorry, I encountered an error"
  • Ensures CI has a working LLM API key with available quota

Test plan

  • Verify CI fails when LLM API key has no quota
  • Verify CI passes with a valid, working LLM API key

Remove graceful degradation from "Bot responds to message" E2E test.
The test now fails if the bot returns "Sorry, I encountered an error"
instead of a valid response, ensuring a working LLM API key in CI.
The frontend has two error paths: "Sorry, I encountered an error"
and "Sorry, something went wrong". Check for both to ensure the
test fails when the LLM API call returns a 500.
Accessibility snapshot doesn't expose error text nodes. Use
browser_evaluate to check document.body.innerText for "Sorry"
which catches both error messages from the frontend.
The word 'Sorry' can appear in legitimate bot responses. Check for
the exact frontend error messages instead: 'Sorry, I encountered
an error' and 'Sorry, something went wrong'.
Playwright MCP browser_evaluate expects a 'function' parameter,
not 'expression'. The wrong param was silently ignored, causing
the bot response test to always fail.
Log browser_evaluate result to see what text the DOM actually
contains when the test fails.
Clean up after confirming the test works correctly with the
function parameter fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant