-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest_Cases_Report.html
More file actions
402 lines (396 loc) · 15.7 KB
/
Copy pathTest_Cases_Report.html
File metadata and controls
402 lines (396 loc) · 15.7 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
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Test Cases - Add to Cart Feature</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #f4f4f9;
color: #333;
margin: 0;
padding: 20px;
}
.container {
max-width: 1200px;
margin: 0 auto;
background: #fff;
padding: 30px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
border-radius: 8px;
}
h1 {
color: #2c3e50;
text-align: center;
border-bottom: 2px solid #2c3e50;
padding-bottom: 10px;
}
h2 {
color: #34495e;
margin-top: 30px;
border-bottom: 1px solid #ddd;
padding-bottom: 5px;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
font-size: 0.95em;
}
th, td {
border: 1px solid #ddd;
padding: 12px;
text-align: left;
vertical-align: top;
}
th {
background-color: #2c3e50;
color: white;
font-weight: bold;
}
tr:nth-child(even) {
background-color: #f9f9f9;
}
tr:hover {
background-color: #f1f1f1;
}
.priority-high {
color: #e74c3c;
font-weight: bold;
}
.priority-medium {
color: #f39c12;
font-weight: bold;
}
.priority-low {
color: #27ae60;
font-weight: bold;
}
.summary-section {
background-color: #e8f4fd;
padding: 15px;
border-left: 5px solid #3498db;
margin-top: 30px;
}
.download-btn {
display: block;
width: 200px;
margin: 20px auto;
padding: 10px;
background-color: #3498db;
color: white;
text-align: center;
text-decoration: none;
border-radius: 5px;
font-weight: bold;
}
.download-btn:hover {
background-color: #2980b9;
}
</style>
</head>
<body>
<div class="container">
<h1>Test Cases: Add to Cart Feature (BStackDemo)</h1>
<h2>Context</h2>
<p><strong>Application:</strong> BStackDemo E-Commerce<br>
<strong>Scope:</strong> Homepage Product Grid and "Bag" (Cart) Panel.<br>
<strong>Key Elements:</strong> Product Cards (Image, Price, Title, Add Button), Cart Sidebar, Cart Counter, Subtotal, Checkout.</p>
<h2>Test Cases</h2>
<table>
<thead>
<tr>
<th>ID</th>
<th>Category</th>
<th>Summary</th>
<th>Preconditions</th>
<th>Steps</th>
<th>Expected Result</th>
<th>Priority</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>TC_01</strong></td>
<td>Functional (Pos)</td>
<td>Add single valid item to cart</td>
<td>Homepage loaded</td>
<td>1. Click 'Add to cart' on 'iPhone 12'.</td>
<td>Cart opens; Item added; Qty=1; Subtotal=$799.00.</td>
<td class="priority-high">High</td>
</tr>
<tr>
<td><strong>TC_02</strong></td>
<td>Functional (Pos)</td>
<td>Add multiple distinct items</td>
<td>'iPhone 12' in cart</td>
<td>1. Click 'Add to cart' on 'iPhone 12 Mini'.</td>
<td>Cart has 2 unique items; Total = Sum of both prices.</td>
<td class="priority-high">High</td>
</tr>
<tr>
<td><strong>TC_03</strong></td>
<td>Functional (Pos)</td>
<td>Increase quantity via Product Grid</td>
<td>'iPhone 12' (Qty:1) in cart</td>
<td>1. Click 'Add to cart' on 'iPhone 12' again.</td>
<td>Qty becomes 2; Item row is NOT duplicated; Price updates.</td>
<td class="priority-high">High</td>
</tr>
<tr>
<td><strong>TC_04</strong></td>
<td>Functional (Pos)</td>
<td>Increase quantity via Cart (+) button</td>
<td>Cart open with item</td>
<td>1. Click '+' button next to item.</td>
<td>Qty increases by 1; Subtotal recalculates immediately.</td>
<td class="priority-medium">Medium</td>
</tr>
<tr>
<td><strong>TC_05</strong></td>
<td>Functional (Pos)</td>
<td>Decrease quantity via Cart (-) button</td>
<td>Item Qty > 1</td>
<td>1. Click '-' button next to item.</td>
<td>Qty decreases by 1; Subtotal recalculates.</td>
<td class="priority-medium">Medium</td>
</tr>
<tr>
<td><strong>TC_06</strong></td>
<td>Functional (Pos)</td>
<td>Remove item via 'X' button</td>
<td>Item in cart</td>
<td>1. Click 'X' icon on the item row.</td>
<td>Item removed specifically; Subtotal reduces; If 0 items, cart shows empty state.</td>
<td class="priority-high">High</td>
</tr>
<tr>
<td><strong>TC_07</strong></td>
<td>Functional (Neg)</td>
<td>Rapid click 'Add to Cart' (Performance)</td>
<td>Homepage loaded</td>
<td>1. Click 'Add to cart' 10 times quickly.</td>
<td>App handles requests; Qty matches clicks (10); No UI freeze.</td>
<td class="priority-high">High</td>
</tr>
<tr>
<td><strong>TC_08</strong></td>
<td>Calculation</td>
<td>Verify Subtotal Accuracy</td>
<td>Cart has multiple items</td>
<td>1. Sum individual (Price * Qty) manually.<br>2. Compare with 'Subtotal'.</td>
<td>Manual sum matches displayed Subtotal exactly.</td>
<td class="priority-high">High</td>
</tr>
<tr>
<td><strong>TC_09</strong></td>
<td>Calculation</td>
<td>Verify Currency Formatting</td>
<td>3+ items in cart</td>
<td>1. Check all prices in Cart.</td>
<td>All prices have '$' prefix; 2 decimal places (e.g., 88.78).</td>
<td class="priority-low">Low</td>
</tr>
<tr>
<td><strong>TC_10</strong></td>
<td>UI/UX</td>
<td>Cart Slide-out Animation</td>
<td>Cart closed</td>
<td>1. Click 'Add to cart'.</td>
<td>Cart panel slides in smoothly from right; No layout shift on main page.</td>
<td class="priority-low">Low</td>
</tr>
<tr>
<td><strong>TC_11</strong></td>
<td>UI/UX</td>
<td>Cart Badge Counter Update</td>
<td>Cart empty</td>
<td>1. Add 1 item.<br>2. Add 2nd item.</td>
<td>Badge on bag icon updates: 0 -> 1 -> 2.</td>
<td class="priority-medium">Medium</td>
</tr>
<tr>
<td><strong>TC_12</strong></td>
<td>UI/UX</td>
<td>Installment Text Visibility</td>
<td>Item in cart</td>
<td>1. Verify text below subtotal.</td>
<td>Display shows correct installment calc (e.g., "OR UP TO 9 x $ [value]").</td>
<td class="priority-low">Low</td>
</tr>
<tr>
<td><strong>TC_13</strong></td>
<td>Persistence</td>
<td>Cart Retention on Refresh</td>
<td>Items in cart</td>
<td>1. Refresh the browser page (F5).</td>
<td>Cart contents persist; Qty and Total remain unchanged.</td>
<td class="priority-medium">Medium</td>
</tr>
<tr>
<td><strong>TC_14</strong></td>
<td>Persistence</td>
<td>Cart Retention on New Tab</td>
<td>Items in cart</td>
<td>1. Open `bstackdemo.com` in new tab.</td>
<td>Cart mirrors the state of the first tab (Session Storage/Local Storage check).</td>
<td class="priority-medium">Medium</td>
</tr>
<tr>
<td><strong>TC_15</strong></td>
<td>Checkout</td>
<td>Checkout Button State</td>
<td>Items in cart</td>
<td>1. Check 'CHECKOUT' button.</td>
<td>Button is clickable/enabled; Contrast is distinct.</td>
<td class="priority-high">High</td>
</tr>
<tr>
<td><strong>TC_16</strong></td>
<td>Checkout</td>
<td>Empty Cart Checkout</td>
<td>Cart empty</td>
<td>1. Check 'CHECKOUT' button or Cart Footer.</td>
<td>Checkout button hidden or disabled; "Add some products in the bag" msg shown.</td>
<td class="priority-medium">Medium</td>
</tr>
<tr>
<td><strong>TC_17</strong></td>
<td>Filtering</td>
<td>Add to Cart after Filtering</td>
<td>Filter by 'Samsung'</td>
<td>1. Click 'Samsung' filter.<br>2. Add 'Galaxy S20'.</td>
<td>Correct item (S20) added, not a hidden Apple product.</td>
<td class="priority-medium">Medium</td>
</tr>
<tr>
<td><strong>TC_18</strong></td>
<td>Ordering</td>
<td>Add to Cart after Sorting</td>
<td>Sort 'Lowest to Highest'</td>
<td>1. Sort products.<br>2. Add first item (Lowest price).</td>
<td>Correct item details (Price/Name) added to cart.</td>
<td class="priority-medium">Medium</td>
</tr>
<tr>
<td><strong>TC_19</strong></td>
<td>Boundary</td>
<td>Minimum Quantity Handling</td>
<td>Item Qty = 1</td>
<td>1. Click '-' button in cart.</td>
<td>Verify behavior: Item removed OR button disabled (Usually removal is distinct check).</td>
<td class="priority-medium">Medium</td>
</tr>
<tr>
<td><strong>TC_20</strong></td>
<td>Boundary</td>
<td>Maximum Quantity Check</td>
<td>Item in cart</td>
<td>1. Click '+' 50 times (or edit input if available).</td>
<td>Verify if limit exists (e.g. 99) or allows infinite (within reason).</td>
<td class="priority-low">Low</td>
</tr>
<tr>
<td><strong>TC_21</strong></td>
<td>UI/UX</td>
<td>Close Cart via Overlay</td>
<td>Cart open</td>
<td>1. Click grey overlay outside panel.</td>
<td>Cart panel closes.</td>
<td class="priority-low">Low</td>
</tr>
<tr>
<td><strong>TC_22</strong></td>
<td>Responsive</td>
<td>Cart View on Mobile (Simulation)</td>
<td>DevTools -> Dimensions: iPhone 12</td>
<td>1. Add item to cart.</td>
<td>Cart panel fits screen; 'Checkout' button visible/accessible.</td>
<td class="priority-medium">Medium</td>
</tr>
<tr>
<td><strong>TC_23</strong></td>
<td>Data Integrity</td>
<td>Product Image Mismatch</td>
<td>Homepage</td>
<td>1. Note 'iPhone 12' image.<br>2. Add to cart.</td>
<td>Image in cart thumbnail matches homepage image exactly.</td>
<td class="priority-low">Low</td>
</tr>
<tr>
<td><strong>TC_24</strong></td>
<td>Integration</td>
<td>Add to cart then Login</td>
<td>Guest user with items</td>
<td>1. Add items.<br>2. Click 'Sign In'.<br>3. Log in.</td>
<td>Verify if cart items persist after login (Merge cart strategy).</td>
<td class="priority-high">High</td>
</tr>
<tr>
<td><strong>TC_25</strong></td>
<td>API</td>
<td>Verify Add to Cart Network Request</td>
<td>Network Tab Open</td>
<td>1. Add item.</td>
<td>Verify POST/PUT request to API; Status 200/201; Payload correct.</td>
<td class="priority-medium">Medium</td>
</tr>
<tr>
<td><strong>TC_26</strong></td>
<td>Functional</td>
<td>Cross-Vendor Addition</td>
<td>Cart has Apple item</td>
<td>1. Filter 'Google'.<br>2. Add 'Pixel 5'.</td>
<td>Cart contains both Apple and Google items correctly.</td>
<td class="priority-medium">Medium</td>
</tr>
<tr>
<td><strong>TC_27</strong></td>
<td>UI/UX</td>
<td>Long Product Name</td>
<td>(Hypothetical)</td>
<td>1. Add product with longest name.</td>
<td>Name wraps correctly in cart; No text overflow/overlap.</td>
<td class="priority-low">Low</td>
</tr>
<tr>
<td><strong>TC_28</strong></td>
<td>Functional</td>
<td>Rapid Removal</td>
<td>2 items in cart</td>
<td>1. Click 'X' on Item 1 then Item 2 instantly.</td>
<td>Both items removed cleanly; No JS errors/orphaned rows.</td>
<td class="priority-medium">Medium</td>
</tr>
<tr>
<td><strong>TC_29</strong></td>
<td>Localization</td>
<td>Currency Symbol Check</td>
<td>(If currency toggle exists)</td>
<td>1. Change to EUR (if avail).<br>2. Add item.</td>
<td>Cart displays prices in €.</td>
<td class="priority-low">Low</td>
</tr>
<tr>
<td><strong>TC_30</strong></td>
<td>Accessibility</td>
<td>Keyboard Navigation</td>
<td>Focus on Product Grid</td>
<td>1. Tab to 'Add to cart'.<br>2. Press Enter.</td>
<td>Item added; Focus management (Screen reader announcement).</td>
<td class="priority-low">Low</td>
</tr>
</tbody>
</table>
<div class="summary-section">
<h3>Test Summary</h3>
<ul>
<li><strong>Total Cases:</strong> 30</li>
<li><strong>Categories:</strong> Functional (Core), UI/UX, Calculation, Persistence, Boundary, Integration.</li>
<li><strong>Coverage:</strong> High probability of catching UI glitches, calculation errors, and state management issues.</li>
</ul>
</div>
</div>
</body>
</html>