@@ -25,58 +25,126 @@ https://www.saucedemo.com/
2525
26262 . Users
2727
28- | Username | Password |
29- | -----------------| --------------|
30- | standard_user | secret_sauce |
31- | locked_out_user | secret_sauce |
32- | problem_user | secret_sauce |
33- | error_user | secret_sauce |
28+ | Username | Password |
29+ | ---------------| ---------------|
30+ | standard_user | secret_sauce |
31+ | fake_user | fake_password |
3432
3533### Report
3634
3735#### Login Feature
3836
39- ![ ] ( /home/celvine/Downloads/code/Tugas_06_CelvineAdiPutra/report/LoginReport .png )
37+ ![ ] ( /home/celvine/Downloads/code/Tugas_06_CelvineAdiPutra/report/Login .png )
4038
4139``` gherkin
4240Feature: Login feature
4341
44- Scenario Outline: User successfully logs in with valid credentials
42+ Background:
4543 Given The user opens the web page or app
46- When The user enters <username> as username
47- And The user enters <password> as password
44+
45+ Scenario: User successfully logs in with valid credentials
46+ When The user enters a valid username
47+ And The user enters a valid password
4848 And The user clicks the login button
4949 Then The user should be logged in successfully
50- Examples:
51- | username | password |
52- | standard_user | secret_sauce |
5350
54- Scenario Outline: User fails to log in with invalid credentials
55- Given The user opens the web page or app
56- When The user enters <username> as username
57- And The user enters <password> as password
51+ Scenario: User failed logs in with invalid password with registered user credentials
52+ When The user enters a valid username
53+ And The user enters a invalid password
5854 And The user clicks the login button
59- Then The user should see an authentication error message
60- Examples:
61- | username | password |
62- | example | 123 |
55+ Then The user should be see error message
56+
57+ Scenario: User failed logs in with invalid credentials
58+ When The user enters a invalid username
59+ And The user enters a invalid password
60+ And The user clicks the login button
61+ Then The user should be see error message
6362```
6463
65- #### Add to Cart
64+ #### Add Product to Cart
6665
67- ![ ] ( /home/celvine/Downloads/code/Tugas_06_CelvineAdiPutra/report/AddToCartReport .png )
66+ ![ ] ( /home/celvine/Downloads/code/Tugas_06_CelvineAdiPutra/report/AddToCart .png )
6867
6968``` gherkin
7069Feature: Add Product to Cart
7170
7271 Background:
73- Given The user is logged in
72+ Given The user opens the web page or app
73+ When The user enters a valid username
74+ And The user enters a valid password
75+ And The user clicks the login button
76+ Then The user should be logged in successfully
7477
7578 Scenario: User successfully adds a product to the cart
7679 When The user clicks the add to cart button
7780 Then The text on the add to cart button should change to remove
7881 Then The number of items in the cart icon should be 1
79- When The user click the add to cart button other product
82+ When The user clicks the add to cart button for another product
8083 Then The text on the add to cart button other product should change to remove
8184 Then The number of items in the cart icon should be 2
85+ ```
86+
87+ #### Cart
88+
89+ ![ ] ( /home/celvine/Downloads/code/Tugas_06_CelvineAdiPutra/report/Cart.png )
90+
91+ ``` gherkin
92+ Feature: Remove Items from Cart
93+
94+ Background:
95+ Given The user opens the web page or app
96+ When The user enters a valid username
97+ And The user enters a valid password
98+ And The user clicks the login button
99+ Then The user should be logged in successfully
100+ Then The user clicks the add to cart button
101+ Then The user clicks the add to cart button for another product
102+
103+ Scenario: Remove an Item from the Cart
104+ Given The user is on the cart page
105+ Then The user should see at least 2 products in their cart
106+ When The user clicks the remove button for the first item
107+ Then The number of items in the cart icon should be 1
108+ Then The user should see at least 1 products in their cart
109+ When The user clicks the remove button for the first item
110+ Then The shopping cart should be empty
111+ ```
112+
113+ #### Checkout
114+
115+ ![ ] ( /home/celvine/Downloads/code/Tugas_06_CelvineAdiPutra/report/Checkout.png )
116+
117+ ``` gherkin
118+ Feature: Checkout
119+
120+ Background:
121+ Given The user opens the web page or app
122+ When The user enters a valid username
123+ And The user enters a valid password
124+ And The user clicks the login button
125+ Then The user should be logged in successfully
126+ And The user clicks the add to cart button
127+ And The user clicks the add to cart button for another product
128+ And The user is on the cart page
129+
130+ Scenario Outline: User Successfully Checks Out Products
131+ Given The user is on the cart page
132+ Then The user should see at least 2 products in their cart
133+ And The user clicks the checkout button
134+ And The user should be redirected to the checkout page step "one"
135+ And The user enters <fistName> as the first name
136+ And The user enters <lastName> as the last name
137+ And The user enters <postalCode> as the postal code
138+ And The user clicks the continue button
139+ And The user should be redirected to the checkout page step "two"
140+ And The user clicks the finish button
141+ And The user should be redirected to the checkout complete page
142+ And The user clicks the back home button
143+ Then The number of items in the cart icon should be empty
144+
145+ Examples:
146+ | fistName | lastName | postalCode |
147+ | example | example_last_name | 3301 |
148+ | --- | example_last_name | 3301 |
149+ | ? | --- | 0 |
82150```
0 commit comments