Closed
Description
Overview
Create a Cypress integration end-to-end test to verify users signing up through partner channels can properly access partner-specific course content. This is a critical feature that ensures our partner integration works correctly and maintains proper access control.
Action Items
- Run Bloom's backend with a populated database, then run the frontend.
- Create partner users for Cypress variables. Partner users can sign up on the
/welcome/<partner_name>
URL in the browser (e.g./welcome/bumble
and/welcome/badoo
). - Create new test file
partner-content-access.cy.tsx
that verifies:- Partner-specific courses and resources, such as the "Dating Boundaries and Relationships" course for Bumble partner users, exclusively exists on the /courses page for Bumble partner users.
Guidance and Resources
- Content filtering based on
included_for_partners
- This issue should ideally by expanded upon to cover other partner-exclusive features such as therapy access, session limits, and live chat features.
- There are 2 partners: Bumble and Badoo.
- Related Files and Components (including, but not limited to):
lib/hooks/useLoadUser.ts
components/pages/CoursesPage.tsx
lib/utils/userHasAccessToPartnerContent.ts
lib/utils/hasAccessToPage.ts
lib/constants/partners.ts
cypress/integration/tests/register-partner-with-code.cy.tsx
- Bumblecypress/integration/tests/register-partner-without-code.cy.tsx
- BadooPartnerAccess
interface implementationuserHasAccessToPartnerContent
utilityhasAccessToPage
utility
- Example of Bumble exclusive course "Dating Boundaries and Relationships" (in blue):
Note: This issue should be expanded to cover other partner exclusive features, such as therapy sessions, but this can be saved for a future issue.