Skip to content

Commit 74ab1d4

Browse files
committed
Added more tests for MPT demo
1 parent 773c38b commit 74ab1d4

21 files changed

+535
-460
lines changed

playwright.config.ts

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,33 @@ export default defineConfig({
5757

5858
{ name: 'setup', testMatch: /.*\.setup\.ts/ },
5959

60+
{
61+
name: 'exampleTests-Chrome',
62+
testDir: 'tests-examples/tests',
63+
use: {
64+
...devices['Desktop Chrome'],
65+
headless: true,
66+
},
67+
},
68+
69+
{
70+
name: 'exampleTests-Firefox',
71+
testDir: 'tests-examples/tests',
72+
use: {
73+
...devices['Desktop Firefox'],
74+
headless: true,
75+
},
76+
},
77+
78+
{
79+
name: 'exampleTests-Pixel5',
80+
testDir: 'tests-examples/tests',
81+
use: {
82+
...devices['Pixel 5'],
83+
headless: true,
84+
},
85+
},
86+
6087
{
6188
name: 'webTests',
6289
testDir:'web/tests',
@@ -93,11 +120,11 @@ export default defineConfig({
93120
},
94121
},
95122

96-
// {
97-
// name: 'firefox',
98-
// use: { ...devices['Desktop Firefox'] },
99-
// },
100-
123+
// {
124+
// name: 'firefox',
125+
// use: { ...devices['Desktop Firefox'] },
126+
// },
127+
101128
// {
102129
// name: 'webkit',
103130
// use: { ...devices['Desktop Safari'] },
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Should sign-in user
2+
Should sign-in user with valid credentials
3+
Should show error on invalid signin
4+
Should show error on missing username
5+
Should show error on missing password
6+
Should sign-in user with expired credentials
7+
Should sign-in user with locked account
8+
Should sign-in user with disabled account
9+
Should sign-in user with special characters in username
10+
Should sign-in user with special characters in password
11+
Should show error on empty username
12+
Should show error on empty password
13+
Should show error on empty captcha
14+
Should sign-in user with uppercase letters in username
15+
Should sign-in user with lowercase letters in username
16+
Should sign-in user with mixed case in username
17+
Should sign-in user with uppercase letters in password
18+
Should sign-in user with lowercase letters in password
19+
Should sign-in user with mixed case in password
20+
Should sign-in user with minimum username length
21+
Should sign-in user with maximum username length
22+
Should sign-in user with minimum password length
23+
Should sign-in user with maximum password length
24+
Should sign-in user with valid email as username
25+
Should sign-in user with invalid email as username
26+
Should sign-in user with missing email as username
27+
Should sign-in user with missing email as password
28+
Should sign-in user with valid social media credentials
29+
Should sign-in user with invalid social media credentials
30+
Should sign-in user with empty social media credentials
31+
Should sign-in user with two-factor authentication
32+
Should sign-in user with multifactor authentication
33+
Should sign-in user with time-limited access
34+
Should sign-in user with role-based access
35+
Should sign-in user with permission-based access
36+
Should sign-in user with IP-based access control
37+
Should sign-in user with geolocation-based access control
38+
Should sign-in user with security token

tests-examples/data/discounts.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Should apply discount
2+
Should apply coupon
3+
Should apply percentage discount
4+
Should apply fixed amount discount
5+
Should apply discount to multiple items
6+
Should apply coupon to specific product categories
7+
Should apply coupon to specific brands
8+
Should apply coupon with minimum purchase amount
9+
Should apply coupon with maximum discount limit
10+
Should apply coupon with expired validity
11+
Should apply coupon with future validity
12+
Should apply coupon with invalid characters
13+
Should apply coupon with case-insensitive code
14+
Should not apply expired coupon
15+
Should not apply invalid coupon code
16+
Should not apply coupon to excluded products
17+
Should not apply coupon to restricted user roles

tests-examples/data/docs.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Should open help center
2+
Should open help center with different languages
3+
Should open help center with slow network
4+
Should open help center with JavaScript disabled
5+
Should open help center with cookies disabled
6+
Should search for help topics
7+
Should search for help topics with empty query
8+
Should search for help topics with special characters
9+
Should search for help topics with no results
10+
Should search for help topics with multiple results
11+
Should open a specific help topic
12+
Should open a specific help topic with different languages
13+
Should open a specific help topic with deep linking
14+
Should open a specific help topic with invalid URL
15+
Should open a specific help topic with invalid anchor
16+
Should open a specific help topic with scroll position preservation
17+
Should open a specific help topic with back button functionality
18+
Should open a specific help topic with breadcrumbs
19+
Should open a specific help topic with related articles
20+
Should open a specific help topic with suggested topics
21+
Should not open a non-existent help topic

tests-examples/data/reviews.txt

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
Should leave a product review
2+
Should leave a product review with a rating
3+
Should leave a product review with text
4+
Should leave a product review with images
5+
Should leave a product review with video
6+
Should leave a product review with emojis
7+
Should leave a product review with HTML tags
8+
Should edit a product review
9+
Should edit a product review to change the rating
10+
Should edit a product review to update the text
11+
Should edit a product review to add more images
12+
Should edit a product review to add video content
13+
Should edit a product review to include emojis
14+
Should edit a product review to modify HTML tags
15+
Should delete a product review
16+
Should delete a product review with confirmation
17+
Should delete a product review without confirmation
18+
Should delete another user's product review
19+
Should delete another user's product review with confirmation
20+
Should not delete another user's product review without confirmation
21+
Should reply to a product review
22+
Should reply to a product review with text
23+
Should reply to a product review with images
24+
Should reply to a product review with video
25+
Should reply to a product review with emojis
26+
Should reply to a product review with HTML tags
27+
Should flag a product review as inappropriate
28+
Should flag a product review as spam
29+
Should flag a product review as abusive
30+
Should flag a product review with an explanation
31+
Should report a product review for moderation
32+
Should report a product review with a reason
33+
Should report a product review with comments
34+
Should report a product review for removal
35+
Should report a product review with false information
36+
Should display product reviews on the product page
37+
Should display product reviews with the most helpful first
38+
Should display product reviews with the highest rating first
39+
Should display product reviews with the lowest rating first
40+
Should display product reviews with the most recent first
41+
Should display product reviews with pagination
42+
Should display a message when there are no product reviews
43+
Should display the average rating for a product

tests-examples/data/shipping.txt

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Should calculate shipping cost
2+
Should calculate shipping cost for free shipping
3+
Should calculate shipping cost for express shipping
4+
Should calculate shipping cost for international shipping
5+
Should calculate shipping cost for oversized items
6+
Should calculate shipping cost for multiple items
7+
Should calculate shipping cost for remote locations
8+
Should calculate shipping cost for a different destination
9+
Should offer free shipping for orders over a certain amount
10+
Should offer free shipping for specific product categories
11+
Should offer free shipping for loyalty program members
12+
Should apply shipping discounts for promotions
13+
Should apply shipping discounts for coupons
14+
Should apply shipping discounts for special events
15+
Should allow users to select shipping method
16+
Should display estimated delivery time
17+
Should show available shipping options
18+
Should show shipping restrictions for specific regions
19+
Should show shipping restrictions for hazardous items
20+
Should show shipping restrictions for oversized items
21+
Should allow users to add delivery notes
22+
Should show shipping tracking information
23+
Should provide real-time tracking updates
24+
Should handle delayed shipments
25+
Should handle lost shipments
26+
Should handle damaged shipments
27+
Should handle stolen shipments
28+
Should allow users to request a return
29+
Should handle return requests for damaged items
30+
Should handle return requests for incorrect items
31+
Should handle return requests for unwanted items
32+
Should provide return shipping labels
33+
Should display return status and updates
34+
Should refund shipping fees for returned items
35+
Should handle international customs and duties
36+
Should calculate customs and duties for international orders
37+
Should provide customs and duties information to customers
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
Should show products
2+
Should show products for registered users
3+
Should show products for anonymous users
4+
Should filter products
5+
Should filter products by category
6+
Should filter products by price range
7+
Should filter products by availability
8+
Should filter products by brand
9+
Should filter products by rating
10+
Should filter products by popularity
11+
Should add item to shopping cart
12+
Should add item to shopping cart with quantity 1
13+
Should add item to shopping cart with quantity 10
14+
Should add item to shopping cart with maximum quantity
15+
Should remove item from shopping cart
16+
Should remove item from shopping cart with one item
17+
Should remove item from shopping cart with multiple items
18+
Should update item quantity in shopping cart
19+
Should update item quantity to 0 in shopping cart
20+
Should update item quantity to maximum in shopping cart
21+
Should display empty cart message when no items
22+
Should calculate total price correctly in cart
23+
Should calculate total price with multiple items
24+
Should calculate total price with discounts
25+
Should navigate to product details page
26+
Should display product images correctly
27+
Should allow user to sign out
28+
Should display user profile information
29+
Should display user profile information for admin
30+
Should display user profile information for different users
31+
Should display user profile information for anonymous users
32+
Should process checkout successfully
33+
Should process checkout with single item
34+
Should process checkout with multiple items
35+
Should process checkout with different shipping methods
36+
Should process checkout with different payment methods
37+
Should process checkout with billing address
38+
Should process checkout with shipping address
39+
Should display error for out-of-stock items at checkout
40+
Should display error for out-of-stock items in cart
41+
Should save user address information
42+
Should save user address information for billing
43+
Should save user address information for shipping
44+
Should validate user payment method
45+
Should show order confirmation after checkout
46+
Should show order details after checkout
47+
Should show order history
48+
Should show order history with multiple orders
49+
Should show order history for different users
50+
Should show order history for anonymous users
51+
Should update product catalog dynamically
52+
Should update product catalog with new arrivals
53+
Should update product catalog with out-of-stock items
54+
Should update product catalog with discounts
55+
Should handle multiple users in cart simultaneously
56+
Should prevent simultaneous updates to cart
57+
Should provide search functionality for products
58+
Should provide search functionality with empty query
59+
Should provide search functionality with special characters
60+
Should provide search functionality for non-existing products
61+
Should provide search functionality for misspelled products
62+
Should provide search functionality for long queries
63+
Should display product reviews and ratings
64+
Should allow users to add reviews
65+
Should allow users to add reviews with text
66+
Should allow users to add reviews with ratings
67+
Should allow users to add reviews with images
68+
Should allow users to edit reviews
69+
Should allow users to delete reviews
70+
Should handle invalid product search gracefully
71+
Should allow sorting products by price
72+
Should allow sorting products by popularity
73+
Should allow sorting products by rating
74+
Should allow sorting products by brand
75+
Should allow sorting products by name
76+
Should offer category filters for products
77+
Should offer category filters for multiple categories
78+
Should offer category filters for subcategories
79+
Should preserve cart items after user logs out and in again
80+
Should show recommended products
81+
Should allow users to compare products
82+
Should provide detailed product descriptions
83+
Should provide detailed product descriptions with HTML
84+
Should handle payment processing errors
85+
Should display breadcrumbs for navigation
86+
Should offer discounts at checkout when applicable
87+
Should send email confirmation after order placement
88+
Should enforce password strength on account creation
89+
Should require minimum password length
90+
Should require at least one uppercase letter in password
91+
Should require at least one lowercase letter in password
92+
Should require at least one digit in password
93+
Should require at least one special character in password
94+
Should provide password reset functionality
95+
Should allow password reset with valid email
96+
Should show error on password reset with invalid email
97+
Should show success message after password reset request
98+
Should show error after multiple password reset requests
99+
Should display a mobile-responsive site layout
100+
Should support pagination in product catalog
101+
Should allow users to navigate to next page
102+
Should allow users to navigate to previous page
103+
Should allow users to navigate to last page
104+
Should allow users to navigate to first page
105+
Should show loading indicators for slow network responses
106+
Should handle session timeouts
107+
Should validate user input in checkout forms
108+
Should validate user input for shipping address
109+
Should validate user input for billing address
110+
Should validate user input for payment method
111+
Should allow users to cancel orders within a time limit
112+
Should offer customer support chat functionality
113+
Should maintain user session across different pages
114+
Should allow wishlist creation and management
115+
Should allow users to add items to wishlist
116+
Should allow users to remove items from wishlist
117+
Should display wishlist items on user profile
118+
Should display wishlist items on product pages
119+
Should display a 404 page for non-existent products

tests-examples/data/support.txt

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
Should open support chat window
2+
Should close support chat window
3+
Should minimize support chat window
4+
Should maximize support chat window
5+
Should start chat session
6+
Should end chat session
7+
Should send message to support assistant
8+
Should receive message from support assistant
9+
Should show typing indicator from support assistant
10+
Should show user typing indicator to support assistant
11+
Should show waiting for support assistant
12+
Should show estimated wait time
13+
Should provide chat history with previous messages
14+
Should clear chat history
15+
Should allow user to attach files in chat
16+
Should display attached files in chat
17+
Should allow user to send emojis in chat
18+
Should allow user to send links in chat
19+
Should display links as clickable in chat
20+
Should allow user to send code snippets in chat
21+
Should format code snippets in chat
22+
Should show support assistant's name and avatar
23+
Should show support assistant's status
24+
Should show support assistant's bio or description
25+
Should allow user to rate support assistant
26+
Should show user's rating for support assistant
27+
Should allow user to leave feedback
28+
Should allow user to request a transcript of the chat
29+
Should display transcript request confirmation
30+
Should allow user to exit chat gracefully
31+
Should allow user to continue chat after exiting
32+
Should show chat notifications for new messages
33+
Should show chat notifications for support assistant availability
34+
Should allow user to block support assistant
35+
Should allow user to unblock support assistant
36+
Should show blocked status for support assistant
37+
Should allow user to report inappropriate behavior
38+
Should show confirmation for reporting
39+
Should allow user to cancel report
40+
Should show blocked status for reported support assistant
41+
Should allow user to request a supervisor

0 commit comments

Comments
 (0)