-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathui_test_guide.py
More file actions
276 lines (200 loc) · 11 KB
/
Copy pathui_test_guide.py
File metadata and controls
276 lines (200 loc) · 11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
"""
UI Testing Guide - Manual Steps
Follow these steps in the browser at http://localhost:5174
"""
print("""
╔════════════════════════════════════════════════════════════════════════════╗
║ LANGUAGE LEARNING PLATFORM - UI TEST GUIDE ║
╔════════════════════════════════════════════════════════════════════════════╗
Frontend: http://localhost:5174
Backend: http://127.0.0.1:5000
═══════════════════════════════════════════════════════════════════════════
TEST 1: UI REGISTRATION FLOW ⏳
═══════════════════════════════════════════════════════════════════════════
📋 STEPS:
1. Open browser to: http://localhost:5174
2. Navigate to Registration:
- Click "Register" or "Sign Up" button on landing page
OR
- Navigate directly to: http://localhost:5174/register
3. Fill Registration Form:
┌─────────────────────────────────────────┐
│ Username: uitest1 │
│ Email: uitest1@test.com │
│ Password: Test123! │
│ Confirm Pass: Test123! │
│ Native Lang: Telugu │
│ Target Lang: English │
└─────────────────────────────────────────┘
4. Submit the form
5. ✅ EXPECTED RESULTS:
- Success message appears
- Redirect to assessment/onboarding page
- OR redirect to dashboard
- Token stored in localStorage
- User created in database
6. ⚠️ CHECK BROWSER CONSOLE:
- Press F12 to open DevTools
- Look for any errors
- Check Network tab for API calls
═══════════════════════════════════════════════════════════════════════════
TEST 2: UI LOGIN FLOW ⏸️
═══════════════════════════════════════════════════════════════════════════
📋 STEPS:
1. If already logged in, logout first
- Look for logout button
- OR clear localStorage: localStorage.clear()
2. Navigate to: http://localhost:5174/login
3. Enter Credentials:
┌─────────────────────────────────────────┐
│ Username/Email: uitest1 │
│ Password: Test123! │
└─────────────────────────────────────────┘
4. Click Login
5. ✅ EXPECTED RESULTS:
- Login successful message
- Redirect to dashboard
- User info displayed
- Navigation menu appears
═══════════════════════════════════════════════════════════════════════════
TEST 3: UI ASSESSMENT FLOW ⏸️
═══════════════════════════════════════════════════════════════════════════
📋 STEPS:
1. After login, check if redirected to assessment
OR
Navigate to: http://localhost:5174/assessment
2. Read assessment instructions
3. Answer Questions:
- Answer introduction question
- Answer daily life question
- Answer goals question
4. Submit assessment
5. ✅ EXPECTED RESULTS:
- Assessment completed
- Results displayed
- Proficiency level shown
- Recommended learning paths appear
═══════════════════════════════════════════════════════════════════════════
TEST 4: UI DASHBOARD ⏸️
═══════════════════════════════════════════════════════════════════════════
📋 STEPS:
1. Navigate to: http://localhost:5174/dashboard
2. Verify Dashboard Components:
□ User welcome message
□ Current level/XP display
□ Streak counter
□ Recent activities
□ Learning progress
□ Achievements/badges
□ Quick stats
3. ✅ EXPECTED RESULTS:
- All stats display correctly
- No errors in console
- Data matches backend
═══════════════════════════════════════════════════════════════════════════
TEST 5: UI LEARNING PATHS ⏸️
═══════════════════════════════════════════════════════════════════════════
📋 STEPS:
1. Find Learning Paths section
- Check navigation menu
- Look for "Learning Paths" or "Courses"
2. View Available Paths:
- Should see list of learning paths
- Each path shows title, level, description
3. Enroll in a Path:
- Click "Enroll" or "Start Learning"
- Confirm enrollment
4. ✅ EXPECTED RESULTS:
- Enrollment successful
- Path appears in "My Paths"
- Can access path activities
═══════════════════════════════════════════════════════════════════════════
TEST 6: UI ACTIVITIES ⏸️
═══════════════════════════════════════════════════════════════════════════
📋 STEPS:
1. Navigate to Activities section
2. View Available Activities:
- Quiz activities
- Flashcard activities
- Writing prompts
- Role-play scenarios
3. Start an Activity:
- Click on an activity
- Complete the activity
- Submit answers
4. ✅ EXPECTED RESULTS:
- Activity loads correctly
- Can submit answers
- Results/feedback shown
- Progress updated
═══════════════════════════════════════════════════════════════════════════
TEST 7: UI CHAT INTERFACE ⏸️
═══════════════════════════════════════════════════════════════════════════
📋 STEPS:
1. Find Chat/Tutor section
- Look for chat icon
- Check navigation menu
2. Open Chat Interface
3. Send Test Messages:
Message 1: "Hello!"
Message 2: "Can you help me learn English?"
Message 3: "Teach me basic greetings"
4. ✅ EXPECTED RESULTS:
- Chat interface opens
- Messages send successfully
- AI responds with helpful answers
- Conversation history preserved
═══════════════════════════════════════════════════════════════════════════
DEBUGGING TIPS
═══════════════════════════════════════════════════════════════════════════
If something doesn't work:
1. Open Browser DevTools (F12)
2. Check Console Tab:
- Look for JavaScript errors
- Note API call failures
3. Check Network Tab:
- Look for failed requests (red)
- Check request/response data
- Verify API endpoints
4. Check Application Tab:
- localStorage → look for 'access_token'
- Session Storage
5. Backend Logs:
- Check terminal running Flask
- Look for error messages
- Note which endpoints are called
═══════════════════════════════════════════════════════════════════════════
COMMON ISSUES & SOLUTIONS
═══════════════════════════════════════════════════════════════════════════
Issue: Cannot access page after login
→ Check if onboarding is required
→ Clear localStorage and try again
Issue: API calls fail with 401
→ Token might be expired
→ Logout and login again
Issue: API calls fail with 404
→ Endpoint might not exist
→ Check backend routes
Issue: API calls fail with 500
→ Backend error
→ Check Flask terminal for traceback
Issue: Nothing happens on button click
→ Check console for JavaScript errors
→ Verify event handlers are attached
═══════════════════════════════════════════════════════════════════════════
📝 RECORDING YOUR RESULTS
═══════════════════════════════════════════════════════════════════════════
For each test, note:
- ✅ PASS: Everything works as expected
- ⚠️ PARTIAL: Works but with minor issues
- ❌ FAIL: Does not work
Document any errors:
- Screenshot the error
- Copy error message
- Note which step failed
═══════════════════════════════════════════════════════════════════════════
Good luck with testing! 🚀
The browser is already open at http://localhost:5174
Start with TEST 1: UI REGISTRATION FLOW
═══════════════════════════════════════════════════════════════════════════
""")