diff --git a/pyproject.toml b/pyproject.toml index 8f8405dd..476c81df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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", diff --git a/tests/graphql/test_quote_create.py b/tests/graphql/test_quote_create.py index 96bc4d76..b420cced 100644 --- a/tests/graphql/test_quote_create.py +++ b/tests/graphql/test_quote_create.py @@ -1,5 +1,6 @@ import allure import pytest + from core.clients import GraphQLClient from gql.operations import QuoteOperations from gql.types import Cart @@ -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)") @@ -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)]) diff --git a/tests/graphql/test_quote_update.py b/tests/graphql/test_quote_update.py index 59a1eb4b..de07f52b 100644 --- a/tests/graphql/test_quote_update.py +++ b/tests/graphql/test_quote_update.py @@ -1,5 +1,6 @@ import allure import pytest + from core.clients import GraphQLClient from gql.operations import QuoteOperations from gql.types.cart import Cart @@ -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)]) @@ -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)])