Skip to content

Commit 90a3f43

Browse files
committed
test_add_product_then_delete_then_add_again_successfully
1 parent 1fcd707 commit 90a3f43

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

test_post_cart.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,26 @@ def test_with_ai(self):
8282
check.equal(res['products'][0]['category'], input_data['products'][0]['category'])
8383
else:
8484
check.equal(res['products'], [])
85+
86+
@allure.feature('test_post_cart_delete_after_added')
87+
def test_add_product_then_delete_then_add_again_successfully(self):
88+
""" Expand with Human-Designed Cases """
89+
90+
# 1. Add to cart
91+
# ... ...
92+
93+
# 2. Delete the cart's products API
94+
# ... ...
95+
96+
# 3. Add to cart again
97+
resp = self.api.post_cart(
98+
cartId=input_data['id'],
99+
userId=input_data['userId'],
100+
products=input_data.get('products', [])
101+
)
102+
103+
assert resp.status_code == HTTPStatus.OK
104+
res = resp.json()
105+
106+
# Start to assertion
107+
# ... ...

0 commit comments

Comments
 (0)