[CLUST-350] Frontend UI testing with Network mocking - #172
Merged
nyan222727 merged 8 commits intoSep 4, 2026
Conversation
…cking tests for mobile drawers - Cover the admin user detail drawer - Cover the Link Resources drawer - Cover the Add Initial Members drawer
yukicoder0509
requested changes
Aug 21, 2026
nyan222727
marked this pull request as ready for review
August 28, 2026 07:07
yukicoder0509
requested changes
Aug 28, 2026
yukicoder0509
approved these changes
Sep 4, 2026
yukicoder0509
deleted the
clust-350-frontend-ui-testing-with-network-mocking
branch
September 4, 2026 05:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of changes
Purpose
Add Playwright network-mocking tests for the mobile drawers.
The tests cover:
Additional Information
React Testing Library renders a simulated DOM rather than the application in a real browser. Therefore, it cannot reliably verify drawer behavior. Playwright runs the real frontend in a mobile browser while mocking backend requests.
Playwright folder structure
How to run test
Install the Playwright Chromium browser:
pnpm exec playwright install chromiumRun all Playwright tests:
Runs all Playwright end-to-end tests in the e2e/ directory. Playwright starts the Vite development server automatically, opens a mobile Chromium browser, and tests the application using mocked API responses.
For Arch Linux or other systems without Chromium dependencies, run the tests through Docker:
docker run --rm \ --ipc=host \ --network=host \ -v "$PWD:/work" \ -v clustron-pnpm-store:/pnpm/store \ -v /work/node_modules \ -w /work \ mcr.microsoft.com/playwright:v1.62.1-noble \ bash -lc 'corepack enable && pnpm config set store-dir /pnpm/store && pnpm install --frozen-lockfile && pnpm exec playwright test'Preview Environment
https://pr-172.clustron.sdc.nycu.club
Preview Environment
https://pr-172.clustron.sdc.nycu.club