Add e2e tests for AI settings clean up#4452
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Cypress E2E coverage for the “AI Configuration clean up” flow on the user profile page, validating the new “Clear Settings” UI behavior and the DELETE request path.
Changes:
- Add new page-object selectors and helpers to interact with the AI configuration “Clear Settings” button and confirmation modal.
- Extend existing AI Configuration E2E assertions to cover clear-button enabled/disabled states.
- Add two new E2E scenarios to verify dismissing vs confirming the clear-configuration modal.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/e2e/cypress/pageObject/users_po.js | Adds Cypress selectors and helper functions for clearing AI configuration (button state, modal open/close, confirm/cancel). |
| test/e2e/cypress/e2e/users.cy.js | Adds E2E test coverage for AI configuration clearing behavior and button state expectations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
vicenteqa
left a comment
There was a problem hiding this comment.
lgtm! just some minor stuff :)
| 'gemini-2.5-pro', | ||
| 'test-api-key' | ||
| ) | ||
| .then(() => { |
There was a problem hiding this comment.
I think this .then() is not needed here since we are not using the returned value. apiCreateAIConfiguration() already returns the Cypress chain, so the following commands will be queued after it
There was a problem hiding this comment.
Thanks! I addressed here d257bce and adjusted other tests that had the unnecessary then
c9d6c79 to
a23de44
Compare
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
d257bce to
bce82a1
Compare
Description
E2E tests for AI Configuration clean up.
How was this tested?
THIS IS THE TEST.