43 lines
1.5 KiB
Gherkin
43 lines
1.5 KiB
Gherkin
@api @shop-api
|
|
Feature: Shop and Bargaining API
|
|
Validates shop items, inventory, stats, and purchase endpoints
|
|
|
|
Background:
|
|
Given the API is accessible
|
|
And I am authenticated as "frodo_baggins"
|
|
|
|
Scenario: Get shop items returns available wares
|
|
When I GET "/api/shop/items"
|
|
Then the response status should be 200
|
|
And the response body should have property "items"
|
|
And the shop items should be a non-empty array
|
|
|
|
Scenario: Get user gold balance
|
|
When I GET "/api/shop/balance"
|
|
Then the response status should be 200
|
|
And the response body should have property "gold"
|
|
And the gold balance should be a non-negative number
|
|
|
|
Scenario: Get user inventory
|
|
When I GET "/api/shop/inventory"
|
|
Then the response status should be 200
|
|
And the response body should have property "inventory"
|
|
|
|
Scenario: Get bargaining stats
|
|
When I GET "/api/shop/stats"
|
|
Then the response status should be 200
|
|
And the response body should have property "stats"
|
|
|
|
Scenario: Get shop item by ID
|
|
Given there are items available in the shop
|
|
When I GET the first shop item by ID
|
|
Then the response status should be 200
|
|
And the response body should have property "item"
|
|
And the shop item should have name and id
|
|
|
|
Scenario: Inventory items have correct structure
|
|
When I GET "/api/shop/inventory"
|
|
Then the response status should be 200
|
|
And the response body should have property "inventory"
|
|
And inventory items should have price fields when present
|