Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ markers = [
"restapi: REST API admin endpoint tests",
"serial: test mutates global platform state and must not run in parallel",
"destructive: test restarts or drops global state (restart platform, drop search index). Excluded from default CI runs.",
"optional: test belongs to an unstable/optional backend module bundle. Exclude with `-m 'not optional'`.",
"with_user(username): sign in as the given user for this test",
"with_page_context(username): provide a Playwright page context for the given user",
"with_cart(items): seed a cart with the given list of (productId, quantity) pairs",
Expand Down
3 changes: 3 additions & 0 deletions tests/graphql/test_quote_create.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import allure
import pytest

from core.clients import GraphQLClient
from gql.operations import QuoteOperations
from gql.types import Cart
Expand All @@ -10,6 +11,7 @@
_USERNAME = "acme_store_employee_1@acme.com"


@pytest.mark.optional
@pytest.mark.graphql
@pytest.mark.with_user(_USERNAME)
@allure.feature("Quotes (GraphQL)")
Expand All @@ -32,6 +34,7 @@ def test_quote_create_empty(graphql_client: GraphQLClient, ctx: Context) -> None
assert quote.items == []


@pytest.mark.optional
@pytest.mark.graphql
@pytest.mark.with_user(_USERNAME)
@pytest.mark.with_cart([(_PRODUCT_ID, _QUANTITY)])
Expand Down
7 changes: 4 additions & 3 deletions tests/graphql/test_quote_update.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import allure
import pytest

from core.clients import GraphQLClient
from gql.operations import QuoteOperations
from gql.types.cart import Cart
Expand All @@ -10,6 +11,7 @@
_UPDATED_COMMENT = "Updated comment"


@pytest.mark.optional
@pytest.mark.graphql
@pytest.mark.with_user(_USERNAME)
@pytest.mark.with_cart([(_PRODUCT_ID, 1)])
Expand All @@ -34,15 +36,14 @@ def test_quote_update_items(
quantity=_UPDATED_QUANTITY,
)

with allure.step(
f"Verify proposal prices include quantity {_UPDATED_QUANTITY}"
):
with allure.step(f"Verify proposal prices include quantity {_UPDATED_QUANTITY}"):
updated_item = next(i for i in updated_quote.items if i.id == line_item.id)
assert any(
t.quantity == _UPDATED_QUANTITY for t in updated_item.proposal_prices
)


@pytest.mark.optional
@pytest.mark.graphql
@pytest.mark.with_user(_USERNAME)
@pytest.mark.with_cart([(_PRODUCT_ID, 1)])
Expand Down