Skip to content

[PB-7179]: chore/add testing utilities and LoginPageView tests - #191

Open
jzunigax2 wants to merge 1 commit into
mainfrom
test/react-testing-foundation
Open

jzunigax2 wants to merge 1 commit into
mainfrom
test/react-testing-foundation

Conversation

@jzunigax2

@jzunigax2 jzunigax2 commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

What

Adds React Testing Library to the project, a shared render helper for component tests, and the first component test (LoginPageView).

Why

Until now, no test in the suite rendered React. All four consoles (management, partners, wholesalers, sub-account) share login, auth-route and form logic that wasn't tested anywhere. This PR is the base the other three test PRs build on.

How

  • Dev dependencies: @testing-library/react, @testing-library/dom, @testing-library/user-event and @testing-library/jest-dom
  • src/testing/setup.ts, registered as setupFiles in vite.config.ts:
    • loads the jest-dom matchers;
    • runs cleanup() and clears localStorage after each test.

- Introduced testing utilities for rendering components with context providers.
- Added comprehensive tests for the LoginPageView component, covering form validation, authentication flow, and error handling.
- Updated package dependencies to include Testing Library packages for improved testing capabilities.
- Configured testing environment setup for consistent test execution.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
object-storage-management-web 68d26ab Commit Preview URL

Branch Preview URL
Dec 03 2026, 09:27 PM

@jzunigax2 jzunigax2 changed the title chore: add testing utilities and LoginPageView tests [PB-7179]: chore/add testing utilities and LoginPageView tests Dec 4, 2026
@jzunigax2 jzunigax2 self-assigned this Dec 4, 2026
@jzunigax2
jzunigax2 marked this pull request as ready for review December 4, 2026 15:51
@jzunigax2
jzunigax2 added this pull request to stack #193 December 4, 2026 15:53
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.

1 participant