Skip to content

feat(ci): add frontend CI workflow and exclude UI tests from unit tests#23

Merged
SamuelMessmer merged 3 commits into
mainfrom
samuel/frontend-ci-v2
Mar 3, 2026
Merged

feat(ci): add frontend CI workflow and exclude UI tests from unit tests#23
SamuelMessmer merged 3 commits into
mainfrom
samuel/frontend-ci-v2

Conversation

@SamuelMessmer

Copy link
Copy Markdown
Contributor

No description provided.

- Add .github/workflows/frontend-ci.yml to run unit and UI tests on push/PR
- Update frontend/vite.config.ts to exclude src/ui-tests from Vitest
- Ensure npm run test only runs unit tests
- Ensure npm run test:ui runs Playwright component tests
@SamuelMessmer SamuelMessmer self-assigned this Mar 3, 2026

Copilot AI 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.

Pull request overview

Adds a dedicated GitHub Actions workflow to run the frontend’s unit (Vitest) and UI/component (Playwright CT) test suites on PRs and main-branch pushes, and updates the Vitest config so UI tests aren’t executed as part of unit tests.

Changes:

  • Add Frontend CI GitHub Actions workflow that runs npm run test and npm run test:ui, and uploads the Playwright HTML report artifact.
  • Update Vitest configuration to exclude src/ui-tests from unit test runs.
  • Remove the “downloadFile returns a blob” unit test case from the API client tests.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
frontend/vite.config.ts Excludes ui-tests from Vitest to prevent Playwright specs from running as unit tests.
frontend/src/api/__tests__/client.test.ts Removes one downloadFile success-path unit test (coverage impact).
.github/workflows/frontend-ci.yml Adds a CI workflow to run unit + UI tests and upload Playwright report artifacts.
Comments suppressed due to low confidence (1)

frontend/src/api/tests/client.test.ts:191

  • This change removes the only “happy path” coverage for apiClient.downloadFile (successfully returning a Blob). Consider restoring a success test (e.g., validating the returned blob’s type/size or decoded text) so regressions in handleBlobResponse() aren’t missed while still keeping the existing error-case test.
    it("downloadFile throws on error", async () => {
        vi.spyOn(globalThis, "fetch").mockResolvedValue(
            new Response(JSON.stringify({detail: "Not found"}), {
                status: 404,
                statusText: "Not Found",
                headers: {"content-type": "application/json"},
            }),
        );

        const {apiClient} = await import("../client");
        await expect(apiClient.downloadFile("/test")).rejects.toThrow(ApiError);
    });

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@SamuelMessmer
SamuelMessmer merged commit 688c377 into main Mar 3, 2026
5 checks passed
@SamuelMessmer
SamuelMessmer deleted the samuel/frontend-ci-v2 branch March 3, 2026 11:15
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.

2 participants