Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Contributing to WCC QA

Thanks for helping improve the WCC QA test automation project.

## Getting started

1. Fork the repository and clone your fork.
2. Install dependencies:

```bash
npm install
```

3. Install Playwright browsers:

```bash
npx playwright install
```

4. Copy `tests/.env.example` to `tests/.env` and fill in local test values.
Never commit real credentials.

## Project layout

This repository contains Playwright + TypeScript tests for the WCC platform.

- `helpers/apifactory/` contains API clients, services, typed responses, and request helpers.
- `helpers/datafactory/` contains test data, constants, and Zod schemas.
- `helpers/fixtures/` exposes role-scoped API and UI fixtures.
- `tests/api/` contains API test flows and the API test plan.
- `tests/admin/` contains admin UI setup, page objects, and tests.
- `playwright.config.ts` defines the `setup`, `api`, and `admin` projects.

See the README's API Architecture section and `tests/api/TEST_PLAN.md` before
adding or changing API tests.

## Running checks

Run the checks that match your change before opening a pull request:

```bash
npm test
npm run lint
npm run format
npm run typecheck
```

For focused API work, you can run:

```bash
npm run test:api
```

For admin UI work, run:

```bash
npm run test:admin
```

## Branches and commits

Use a short, descriptive branch name:

- `feature/add-member-api-tests`
- `fix/admin-login-selector`
- `test/mentor-permissions`

Use clear commit messages. Conventional commits are encouraged:

```text
docs: add contributing guide
test: cover mentor accept flow
fix: correct admin login selector
```

## Pull request expectations

- Keep each pull request focused on one change.
- Link the related issue when one exists.
- Add or update tests for behavior changes.
- Mention which checks you ran.
- Keep the project runnable without committing secrets.

If you are adding an API test, follow the client/service/schema/fixture pattern
described in the README instead of bypassing the existing helpers.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ The hook installs itself on `npm install` via the `prepare` script, so no extra

---

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for setup, local checks, branch naming, and pull request expectations.

---

## Project Structure

```
Expand Down