This is a simple React application simulating the "Reward Preference Management" feature for the Week 1 QA Upskilling Challenge.
- Displays a list of reward categories with checkboxes.
- Allows users to select/deselect preferences.
- Simulates saving preferences (logs to console, updates local state).
- Simulates potential save failures (e.g., if "Experiences" is selected).
- Displays confirmation/error messages.
- Loads different initial preferences based on URL query parameter
?user=A,?user=B, or?user=C. Defaults to User A if no parameter is provided.
- Node.js (LTS version recommended) and npm (or yarn)
- Git
- Clone:
git clone <repository_url> - Navigate:
cd <repository_directory> - Install:
npm install(oryarn install) - Run:
npm start(oryarn start)
The application will typically open at http://localhost:3000.
To simulate different users, append ?user=A, ?user=B, or ?user=C to the URL.
- Clone: As above.
- Ensure Docker Desktop is running.
- Build & Run:
docker-compose up --build - Access:
http://localhost:3000(or the port mapped indocker-compose.yml)
- Check the browser's developer console (F12) to see simulated save messages and potential errors.
- The "persistence" is only simulated within the component's state for this challenge. Reloading the page will reset to the initial state based on the URL parameter.
- The save failure is hardcoded to trigger if "Experiences" is selected, purely for testing the error handling path.