This guide outlines the steps to manually verify the core functionality of the ConsensusAI platform. It is designed to test the full lifecycle of a decision, from creation to collaborative participation and analysis.
- Backend: Ensure your Supabase instance is running and connected (
.env.localis configured). - Frontend: Run the application locally using
npm run dev. - Browser: Use two different browsers or one browser incognito window to simulate multiple users (Admin vs. Member).
Perform these steps in your Main Browser Window.
-
Sign Up / Login
- Navigate to
/login. - Log in with an existing admin account (or Sign Up if fresh DB).
- Verification: You are redirected to the
/dashboardand see "Welcome back".
- Navigate to
-
Create a New Proposal
- Click "New Decision" button on the Dashboard.
- Step 1 (Details):
- Title: "Team Building Event Location"
- Description: "Deciding where to go for Q3 team building."
- Deadline: Set to a future date (e.g., next week).
- Step 2 (Options):
- Add Option 1: "Escape Room"
- Add Option 2: "Rooftop Dinner"
- Step 3 (Criteria):
- Add Criterion 1: "Cost" (Weight: 30)
- Add Criterion 2: "Fun Factor" (Weight: 70)
- Note: Ensure weights sum to 100 if the UI enforces it, or just use arbitrary weights.
- Finish: Click "Create Proposal".
- Verification: You are redirected to the proposal detail page or dashboard list. The status should be "Active".
-
Verify Dashboard Updates
- Go to
/dashboard. - Verification: The "Active Decisions" count should have incremented. Use the search bar to find "Team Building".
- Go to
Perform these steps in an Incognito Window to simulate a different user.
-
Second User Login
- Navigate to
/login. - Log in as a different user (e.g.,
member@example.com).
- Navigate to
-
Find & View Proposal
- Navigate to
/dashboard. - Locate the "Team Building Event Location" proposal in the list.
- Click to view details.
- Verification: You should see the Title, Description, and the "Contribute" tab active.
- Navigate to
-
Submit Contribution
- Select Option: Choose "Rooftop Dinner".
- Rate Criteria:
- Rate "Cost": 4/10
- Rate "Fun Factor": 9/10
- Comment: Add a text comment: "Great for summer evenings!"
- Click Submit.
- Verification: Look for a success toast notification "Contribution Submitted". The view should switch to the "Overview" tab.
-
Attempt Duplicate Submission (Negative Test)
- Try to switch back to the "Contribute" tab.
- Verification: You should see a message saying "You've already contributed" or the form should be disabled/hidden.
Return to your Main Browser Window (Admin).
-
View Real-time Updates
- Go to the "Team Building" proposal details page.
- Navigate to the Overview (or Analytics) tab.
- Verification:
- Participation Count: Should now show at least 1 participant.
- Vote Breakdown: Should show a vote for "Rooftop Dinner".
- Consensus Score: Should be calculated (non-zero).
-
Check Activity Log
- Navigate to
/dashboard/activity(or click Activity in sidebar). - Verification: You should see a new entry: "Member Name added new contribution to 'Team Building Event Location'".
- Navigate to
-
Expired Proposal
- Create a proposal with a deadline in the past (if UI allows) or wait for a deadline to pass.
- Verification: Status should change to "Completed" or "Expired". Verify that the "Contribute" button is disabled for users.
-
Form Validation
- Try creating a proposal without a Title.
- Verification: The "Next" or "Create" button should be disabled, or an error message should appear.
-
Empty Search
- In the Dashboard, search for a chemically impossible string like "XyZ123".
- Verification: The list should filter down to show "No decisions match your filters".
If a step fails:
- Check Console: Open DevTools (F12) to see if there are any red network errors.
- Check RLS: If data isn't loading for the Second User, it may be a Row Level Security policy issue in Supabase (check
policiesonproposalstable). - Check Network Tab: Ensure API calls to Supabase are returning
200 OK.