Skip to content

test(api): Add menteeApi fixture and AUTH-09 - #103

Merged
ptrcja merged 1 commit into
Women-Coding-Community:mainfrom
ptrcja:feature/55-mentee-fixture
Nov 5, 2026
Merged

ptrcja merged 1 commit into
Women-Coding-Community:mainfrom
ptrcja:feature/55-mentee-fixture

Conversation

@ptrcja

@ptrcja ptrcja commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Description

Wires the new QA mentee@wcc.dev account (role MENTEE) into the framework so mentee and
application tests can authenticate as a mentee.

  • tests/.env.example: MENTEE_EMAIL / MENTEE_PASSWORD
  • roles.data.ts: Role.MENTEE and its USERS entry
  • common.fixtures.ts: menteeApi fixture (plus the fixture list in the doc comment)
  • admin-nav.data.ts: NAV_LINKS[Role.MENTEE] = ["Dashboard"]. The portal shows MENTEE the
    same nav as a VIEWER (AdminLayout.tsx has no MENTEE-specific links). Confirmed by ADMIN-LOGIN-02.
  • AUTH-09 (new): loops over every Role, calls GET /api/auth/me with that role's token, and
    checks member.email matches the role's account. This proves menteeApi (and the previously
    untested memberApi / mentorAdHocApi) log in, and covers future roles automatically.
  • AUTH-04 still checks the role claim for MENTOR.
  • TEST_PLAN.md: AUTH-09 row.
  • CLAUDE.md: updated the seeded-accounts sentence (it still said member / ad-hoc mentor were
    "not yet wired to fixtures", and didn't mention the mentee).

Depends on Women-Coding-Community/wcc-backend#827, which adds the account to the seed.
Until it merges, nightly runs against backend main without the mentee, so the mentee cases of
AUTH-09 and ADMIN-LOGIN-02 will fail there. Please merge #827 first, or run Nightly manually.

Related Issue

Closes #55

Type

  • New test coverage
  • Test fix (flaky, broken, or incorrect test)
  • Framework change (fixtures, clients, services, factories, schemas)
  • Bug fix
  • Documentation
  • Tooling / CI
  • Other

Test Evidence

Run locally against npm run env:up with wcc-backend on feat/seed-mentee-account:
Screenshot 2026-11-05 at 12 27 47

Screenshot 2026-11-05 at 12 29 21

Pull request checklist

  • This PR is linked to an issue
  • npm run lint and npm run typecheck pass locally
  • Tests have been added or updated for this change
  • tests/api/TEST_PLAN.md has a row for every new test ID (API flows only)
  • No secrets committed — credentials stay in tests/.env, and no token, password, or API key is logged or hardcoded
  • I have performed a self-review of my own code

@ptrcja
ptrcja requested a review from a team as a code owner November 5, 2026 11:33

@nora-weisser nora-weisser left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ptrcja
ptrcja merged commit c46fab6 into Women-Coding-Community:main Nov 5, 2026
1 of 2 checks passed
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.

test(api): seed a MENTEE account and add the menteeApi fixture

2 participants