Review the ui component at @workspace/<location of the component file .tsx or .jsx> and generate cypress based functional test. To mock the response from /data-testid to reference any component in the cy.get selectors, please provide those recommendations, do not assume they exist.
npm install cypress) and the cypress.config.ts is already created in the project folder.Install Prompt
Add this prompt to your Amazon Q CLI prompt library:
1. Download to local prompt library:
mkdir -p .amazonq/cli-prompts && curl -o .amazonq/cli-prompts/generate-ui-functional-test-using-cypress-for-a-specific-page.md https://promptz.dev/prompts/testing/generate-ui-functional-test-using-cypress-for-a-specific-page/2. Use with Q CLI:
q prompts use generate-ui-functional-test-using-cypress-for-a-specific-page