Skip to content

fix(tests): E2E login tests exercise fictional API and component flow, not the real implementation #404

@github-actions

Description

@github-actions

Summary

The login tests in auth-flow.test.tsx (lines 76, 105) post to /api/auth/login and consume { token, user }, while the actual implementation uses a different endpoint and response shape. The form, submit handler, fetch URL, response parsing, and redirect are all defined inline within the test — the real component is never imported or rendered.

Affected file

src/UILayer/web/src/__tests__/e2e/auth-flow.test.tsx — line 123

Required fix

Import and render the actual login page/component. Mock only external boundaries (fetch, router) with responses that match the real API shape. Assertions should verify the real component's behavior after login.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions