Skip to content

Conversation

@premfrahancoder
Copy link

Describe your changes

Fixture file with realistic mock Stakwork API responses:
cypress/fixtures/stakwork-responses.js
Custom Cypress command to intercept & mock:
POST /hivechat/response
customer webhooks
(cypress/support/commands.js)

New Cypress test:
cypress/e2e/hivechat_flow.cy.js
Covers the full multi-step hivechat flow:
Renders text, code, and screen artifacts
Handles action dialogs (clicking "Yes")
Verifies all UI elements remain visible and correct
Configurable environment toggle:
useMocks: true in cypress.config.js
Easily switch between mock and real endpoints

Issue ticket number and link

https://community.sphinx.chat/bounty/4161

Type of change

Helps resolve and close out:
#1395

Checklist before requesting a review

Mocks all Stakwork endpoints needed for hivechat flow
Tests text, code, and screen artifact rendering
Verifies interaction with action dialogs
Ensures UI remains properly visible and accessible
Config allows toggling between mock and real endpoints
Screenshots included for verification
Test runs successfully in local & test environments

@aliraza556
Copy link
Contributor

Hi @premfrahancoder, could you please add a Cypress test demo?

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.

2 participants