repo
stringclasses
454 values
file_path
stringlengths
5
201
extension
stringclasses
1 value
content
stringlengths
8
509k
num_lines
int64
3
16.9k
size_bytes
int64
8
511k
saleor
saleor/tests/e2e/account/utils/customer_bulk_update.py
.py
from ...utils import get_graphql_content CUSTOMER_BULK_UPDATE_MUTATION = """ mutation CustomerBulkUpdate($errorPolicy: ErrorPolicyEnum, $customers: [CustomerBulkUpdateInput!]!) { customerBulkUpdate(errorPolicy: $errorPolicy, customers: $customers) { count results { customer { id email ...
55
1,009
saleor
saleor/tests/e2e/account/utils/customer_update.py
.py
from ...utils import get_graphql_content CUSTOMER_UPDATE_MUTATION = """ mutation CustomerUpdate($id: ID!, $input: CustomerInput!) { customerUpdate(id: $id, input: $input) { errors { field message code } user { id email isActive isConfirmed isStaff met...
51
855
saleor
saleor/tests/e2e/apps/utils/__init__.py
.py
from .app_create import add_app __all__ = [ "add_app", ]
6
62
saleor
saleor/tests/e2e/apps/utils/app_create.py
.py
from ...utils import get_graphql_content APP_CREATE_MUTATION = """ mutation AppCreate($input: AppInput!) { appCreate(input: $input) { errors { field code message } authToken app { id isActive identifier } } } """ def add_app( staff_api_client, inpu...
37
636
saleor
saleor/tests/e2e/translations/utils.py
.py
from ..utils import get_graphql_content TRANSLATIONS_QUERY = """ query Translations($language: LanguageCodeEnum!, $first: Int, $kind: TranslatableKinds!) { translations( kind: $kind first: $first ) { totalCount edges { node { ...PromotionTranslation ...PromotionRuleTranslation...
66
1,093
saleor
saleor/tests/e2e/vouchers/test_export_voucher_codes.py
.py
import uuid import pytest from ..shop.utils.preparing_shop import prepare_default_shop from ..utils import assign_permissions from .utils import ( create_voucher, create_voucher_channel_listing, export_voucher_codes, raw_export_voucher_codes, ) def create_vouchers_with_multiple_codes(e2e_staff_api_c...
371
9,732
saleor
saleor/tests/e2e/vouchers/test_staff_can_delete_vouchers_in_bulk.py
.py
import pytest from ..shop.utils.preparing_shop import prepare_default_shop from ..utils import assign_permissions from .utils import ( create_voucher, create_voucher_channel_listing, get_vouchers, voucher_bulk_delete, ) def create_multiple_vouchers(e2e_staff_api_client, channel_id): voucher_ids =...
81
2,207
saleor
saleor/tests/e2e/vouchers/utils/voucher_codes_export.py
.py
from ...utils import get_graphql_content VOUCHER_CODES_EXPORT_MUTATION = """ mutation VoucherCreate($input: ExportVoucherCodesInput!) { exportVoucherCodes(input: $input) { errors { code field message } exportFile { status id } } } """ def raw_export_voucher_codes(sta...
44
931
saleor
saleor/tests/e2e/vouchers/utils/query_voucher.py
.py
from ...utils import get_graphql_content VOUCHER_QUERY = """ query voucherQuery ($id:ID!){ voucher(id: $id) { discountValue discountValueType id name onlyForStaff singleUse startDate endDate used usageLimit codes(first: 10) { edges { node { code ...
41
625
saleor
saleor/tests/e2e/vouchers/utils/voucher_catalogues_add.py
.py
from ...utils import get_graphql_content VOUCHER_CATALOGUE_ADD_MUTATION = """ mutation VoucherCataloguesAdd($id: ID!, $input: CatalogueInput!) { voucherCataloguesAdd(id: $id, input: $input) { errors { message field } voucher { id code type discountValueType chann...
59
1,255
saleor
saleor/tests/e2e/vouchers/utils/__init__.py
.py
from .query_voucher import get_voucher from .query_vouchers import get_vouchers from .voucher_bulk_delete import voucher_bulk_delete from .voucher_catalogues_add import add_catalogue_to_voucher from .voucher_channel_listing import create_voucher_channel_listing from .voucher_code_bulk_delete import voucher_code_bulk_de...
26
890
saleor
saleor/tests/e2e/vouchers/utils/voucher_bulk_delete.py
.py
from ...utils import get_graphql_content VOUCHER_BULK_DELETE_MUTATION = """ mutation VoucherBulkDelete ($ids: [ID!]!) { voucherBulkDelete(ids: $ids) { errors { voucherCodes message field code } count } } """ def voucher_bulk_delete(staff_api_client, voucher_ids): variables...
33
646
saleor
saleor/tests/e2e/vouchers/utils/voucher_update.py
.py
from ...utils import get_graphql_content VOUCHER_UPDATE_MUTATION = """ mutation VoucherUpdate($id:ID! $input: VoucherInput!) { voucherUpdate(id: $id, input: $input) { errors { message code field } voucher { id applyOncePerCustomer applyOncePerOrder endDate ...
60
1,183
saleor
saleor/tests/e2e/vouchers/utils/prepare_voucher.py
.py
from ...vouchers.utils import create_voucher, create_voucher_channel_listing def prepare_voucher( e2e_staff_api_client, channel_id, voucher_code, voucher_discount_type, voucher_discount_value, voucher_type, products_list=None, usage_limit=2, single_use=True, apply_once_per_orde...
41
1,037
saleor
saleor/tests/e2e/vouchers/utils/voucher_channel_listing.py
.py
from ...utils import get_graphql_content VOUCHER_CREATE_CHANNEL_LISTING_MUTATION = """ mutation VoucherChannelListingUpdate($id: ID!, $input: VoucherChannelListingInput!) { voucherChannelListingUpdate(id: $id, input: $input) { errors { field message code } voucher { id start...
64
1,305
saleor
saleor/tests/e2e/vouchers/utils/voucher_create.py
.py
from ...utils import get_graphql_content VOUCHER_CREATE_MUTATION = """ mutation VoucherCreate($input: VoucherInput!) { voucherCreate(input: $input) { errors { field message code } voucher { id startDate discountValueType type codes(first: 10) { edge...
51
924
saleor
saleor/tests/e2e/vouchers/utils/voucher_delete.py
.py
from ...utils import get_graphql_content VOUCHER_DELETE_MUTATION = """ mutation VoucherDelete ($id: ID!) { voucherDelete(id: $id) { errors { message code field voucherCodes } voucher { id } } } """ def voucher_delete(staff_api_client, voucher_id): variables = { ...
35
629
saleor
saleor/tests/e2e/vouchers/utils/voucher_code_bulk_delete.py
.py
from ...utils import get_graphql_content VOUCHER_CODE_BULK_DELETE_MUTATION = """ mutation VoucherCodeBulkDelete ($ids: [ID!]!) { voucherCodeBulkDelete(ids: $ids) { errors { message code voucherCodes } } } """ def voucher_code_bulk_delete(staff_api_client, voucher_code_ids): variable...
31
661
saleor
saleor/tests/e2e/vouchers/utils/query_vouchers.py
.py
from ...utils import get_graphql_content VOUCHERS_QUERY = """ query vouchersQuery{ vouchers(first: 10) { edges { node { id } } } } """ def get_vouchers( api_client, ): response = api_client.post_graphql(VOUCHERS_QUERY) content = get_graphql_content(response) return ...
23
336
saleor
saleor/tests/e2e/shipping_zone/utils/shipping_method_channel_listing.py
.py
from ...utils import get_graphql_content SHIPPING_METHOD_CHANNEL_LISTING_MUTATION = """ mutation ShippingMethodChannelListingUpdate( $id: ID!, $input: ShippingMethodChannelListingInput! ) { shippingMethodChannelListingUpdate(id: $id, input: $input) { errors { field code message } sh...
65
1,646
saleor
saleor/tests/e2e/shipping_zone/utils/shipping_method.py
.py
import base64 from ...utils import get_graphql_content SHIPPING_PRICE_CREATE_MUTATION = """ mutation CreateShippingRate($input: ShippingPriceInput!) { shippingPriceCreate(input: $input) { errors { field code message } shippingZone { id } shippingMethod { id ch...
85
1,940
saleor
saleor/tests/e2e/shipping_zone/utils/__init__.py
.py
from .shipping_method import create_shipping_method from .shipping_method_channel_listing import create_shipping_method_channel_listing from .shipping_price_update import update_shipping_price from .shipping_zone import create_shipping_zone __all__ = [ "create_shipping_method", "create_shipping_method_channel_...
12
389
saleor
saleor/tests/e2e/shipping_zone/utils/shipping_zone.py
.py
from ...utils import get_graphql_content SHIPPING_ZONE_CREATE_MUTATION = """ mutation createShipping($input: ShippingZoneCreateInput!) { shippingZoneCreate(input: $input) { errors { field code message } shippingZone { id name description warehouses { name...
87
1,648
saleor
saleor/tests/e2e/shipping_zone/utils/shipping_price_update.py
.py
from ...utils import get_graphql_content SHIPPING_PRICE_UPDATE_MUTATION = """ mutation ShippingPriceUpdate($id: ID!, $input: ShippingPriceInput!) { shippingPriceUpdate(id: $id, input: $input) { errors { field message code } shippingMethod { id name type taxClass ...
72
1,320
saleor
saleor/tests/e2e/gift_cards/test_gift_cards.py
.py
import pytest from ....graphql.order.enums import OrderChargeStatusEnum from ....tests import race_condition from ...e2e.utils import assign_permissions from ..checkout.utils.checkout_add_promo_code import checkout_add_promo_code from ..checkout.utils.checkout_complete import checkout_complete from ..checkout.utils.ch...
408
13,238
saleor
saleor/tests/e2e/gift_cards/utils/__init__.py
.py
from .gift_card_bulk_create import bulk_create_gift_card from .gift_card_create import create_gift_card from .gift_cards_query import get_gift_cards __all__ = [ "create_gift_card", "get_gift_cards", "bulk_create_gift_card", ]
10
239
saleor
saleor/tests/e2e/gift_cards/utils/gift_card_query.py
.py
from ...utils import get_graphql_content GIFT_CARD_QUERY = """ query GiftCard($id: ID!) { giftCard(id: $id) { id code initialBalance { amount currency } currentBalance { amount currency } } } """ def get_gift_card( staff_api_client, gift_card_id, ): var...
35
545
saleor
saleor/tests/e2e/gift_cards/utils/gift_cards_query.py
.py
from ...utils import get_graphql_content GIFT_CARDS_QUERY = """ query GiftCards($first: Int) { giftCards(first: $first) { edges { node { id code initialBalance { amount } } } } } """ def get_gift_cards( staff_api_client, first=10, ): varia...
35
566
saleor
saleor/tests/e2e/gift_cards/utils/gift_card_create.py
.py
from ...utils import get_graphql_content GIFT_CARD_CREATE_MUTATION = """ mutation GiftCardCreate($input: GiftCardCreateInput!) { giftCardCreate(input: $input) { giftCard { id code initialBalance { amount } } errors { code field message } } } """ d...
55
1,086
saleor
saleor/tests/e2e/gift_cards/utils/gift_card_bulk_create.py
.py
from ...utils import get_graphql_content GIFT_CARD_BULK_CREATE_MUTATION = """ mutation GiftCardBulkCreate($input: GiftCardBulkCreateInput!) { giftCardBulkCreate(input: $input) { giftCards { id code initialBalance{ amount } } errors { code field message ...
50
1,039
saleor
saleor/tests/e2e/metadata/utils/update_private_metadata.py
.py
from ...utils import get_graphql_content PRIVATE_METADATA_UPDATE_MUTATION = """ mutation UpdatePrivateMetadata( $id: ID!, $input:[MetadataInput!]!, ) { updatePrivateMetadata(id: $id, input: $input) { errors { message field } item { privateMetadata { key ...
43
830
saleor
saleor/tests/e2e/metadata/utils/__init__.py
.py
from .delete_metadata import delete_metadata from .delete_private_metadata import delete_private_metadata from .update_metadata import update_metadata from .update_private_metadata import update_private_metadata __all__ = [ "delete_metadata", "delete_private_metadata", "update_metadata", "update_privat...
12
335
saleor
saleor/tests/e2e/metadata/utils/delete_metadata.py
.py
from ...utils import get_graphql_content METADATA_DELETE_MUTATION = """ mutation DeleteMetadata( $id: ID!, $keys:[String!]!, ) { deleteMetadata(id: $id, keys: $keys) { errors { message field } item { metadata { key value } } } } """ def delet...
42
750
saleor
saleor/tests/e2e/metadata/utils/update_metadata.py
.py
from ...utils import get_graphql_content METADATA_UPDATE_MUTATION = """ mutation UpdateMetadata( $id: ID!, $input:[MetadataInput!]!, ) { updateMetadata(id: $id, input: $input) { errors { message field } item { metadata { key value } } } } """ ...
42
763
saleor
saleor/tests/e2e/metadata/utils/delete_private_metadata.py
.py
from ...utils import get_graphql_content PRIVATE_METADATA_DELETE_MUTATION = """ mutation DeletePrivateMetadata( $id: ID!, $keys:[String!]!, ) { deletePrivateMetadata(id: $id, keys: $keys) { errors { message field } item { privateMetadata { key value ...
42
804
saleor
saleor/tests/e2e/promotions/test_promotions_query_with_different_parameters.py
.py
import datetime import pytest from django.utils import timezone from freezegun import freeze_time from ..metadata.utils import update_metadata from ..promotions.utils import create_promotion, promotions_query from ..sales.utils import create_sale from ..utils import assign_permissions # Should be able to query promo...
463
14,048
saleor
saleor/tests/e2e/promotions/test_sale_updated_by_promotion_can_not_be_handled_by_sales.py
.py
import pytest from ..product.utils.preparing_product import prepare_product from ..promotions.utils import promotions_query, update_promotion_rule from ..sales.utils import ( create_sale, create_sale_channel_listing, raw_create_sale_channel_listing, sale_catalogues_add, ) from ..shop.utils.preparing_sh...
125
3,541
saleor
saleor/tests/e2e/promotions/test_staff_can_create_promotion_for_collections.py
.py
import pytest from ....product.tasks import recalculate_discounted_price_for_products_task from ..product.utils import ( create_category, create_collection, create_collection_channel_listing, create_product, create_product_channel_listing, create_product_type, create_product_variant, cr...
139
4,279
saleor
saleor/tests/e2e/promotions/test_unable_to_query_nor_mutate_sale_updated_by_promotion_translations.py
.py
import json import pytest from ..product.utils.preparing_product import prepare_product from ..sales.utils import ( create_sale, raw_create_sale_channel_listing, sale_catalogues_add, ) from ..shop.utils.preparing_shop import prepare_default_shop from ..utils import assign_permissions from .utils import pr...
145
3,978
saleor
saleor/tests/e2e/promotions/test_staff_can_change_reward_value_type_in_promotion_rule.py
.py
import pytest from ....product.tasks import recalculate_discounted_price_for_products_task from ..product.utils import get_product from ..product.utils.preparing_product import prepare_product from ..shop.utils.preparing_shop import prepare_default_shop from ..utils import assign_permissions from .utils import create_...
107
3,889
saleor
saleor/tests/e2e/promotions/test_staff_can_change_channel_in_promotion_rule.py
.py
import pytest from ....product.tasks import recalculate_discounted_price_for_products_task from ..product.utils import ( get_product, raw_create_product_channel_listing, raw_create_product_variant_channel_listing, ) from ..product.utils.preparing_product import prepare_product from ..promotions.utils impor...
176
5,211
saleor
saleor/tests/e2e/promotions/test_staff_can_change_catalog_predicate.py
.py
import pytest from ....product.tasks import recalculate_discounted_price_for_products_task from ..product.utils import ( create_collection, create_collection_channel_listing, create_product_variant, create_product_variant_channel_listing, get_product, ) from ..product.utils.collection_add_products ...
140
4,555
saleor
saleor/tests/e2e/promotions/test_unable_to_have_promotion_rule_with_mixed_predicates.py
.py
import pytest from ..product.utils import ( create_collection, create_collection_channel_listing, ) from ..shop.utils.preparing_shop import prepare_default_shop from ..utils import assign_permissions from .utils import create_promotion, raw_create_promotion, raw_update_promotion_rule def prepare_collection( ...
114
3,690
saleor
saleor/tests/e2e/promotions/test_staff_can_translate_promotions.py
.py
import json import pytest from ..product.utils.preparing_product import prepare_product from ..promotions.utils import ( create_promotion, create_promotion_rule, translate_promotion, translate_promotion_rule, ) from ..shop.utils.preparing_shop import prepare_default_shop from ..translations.utils impo...
150
4,916
saleor
saleor/tests/e2e/promotions/utils/promotions_query.py
.py
from ...utils import get_graphql_content PROMOTIONS_QUERY = """ query Promotions($first: Int, $sortBy: PromotionSortingInput, $where: PromotionWhereInput) { promotions(first: $first, sortBy: $sortBy, where: $where) { totalCount edges { node { id events { __typename } ...
66
1,143
saleor
saleor/tests/e2e/promotions/utils/promotion_rule_create.py
.py
from ...utils import get_graphql_content PROMOTION_RULE_CREATE_MUTATION = """ mutation promotionRuleCreate($input: PromotionRuleCreateInput!) { promotionRuleCreate(input: $input) { errors { field message code } promotionRule { id name description rewardValueType ...
44
884
saleor
saleor/tests/e2e/promotions/utils/promotion_query.py
.py
from ...utils import get_graphql_content PROMOTION_QUERY = """ query PromotionQuery($id:ID!) { promotion(id:$id) { id } } """ def promotion_query( staff_api_client, promotion_id, ): variables = {"id": promotion_id} response = staff_api_client.post_graphql( PROMOTION_QUERY, va...
28
425
saleor
saleor/tests/e2e/promotions/utils/__init__.py
.py
from .promotion_create import create_promotion, raw_create_promotion from .promotion_delete import delete_promotion from .promotion_query import promotion_query from .promotion_rule_create import create_promotion_rule from .promotion_rule_translate import translate_promotion_rule from .promotion_rule_update import raw_...
22
753
saleor
saleor/tests/e2e/promotions/utils/promotion_rule_translate.py
.py
from ...utils import get_graphql_content PROMOTION_RULE_TRANSLATE_MUTATION = """ mutation promotionRuleTranslate($id: ID!, $input: PromotionRuleTranslationInput!, $languageCode: LanguageCodeEnum!) { promotionRuleTranslate(id: $id, input: $input, languageCode: $languageCode) { errors { field code ...
49
1,119
saleor
saleor/tests/e2e/promotions/utils/promotion_create.py
.py
from ...utils import get_graphql_content PROMOTION_CREATE_MUTATION = """ mutation CreatePromotion($input: PromotionCreateInput!) { promotionCreate(input: $input) { errors { message field code } promotion { id name type startDate endDate description ...
109
2,050
saleor
saleor/tests/e2e/promotions/utils/promotion_translate.py
.py
from ...utils import get_graphql_content PROMOTION_TRANSLATE_MUTATION = """ mutation PromotionTranslate($id: ID!, $input: PromotionTranslationInput!, $languageCode: LanguageCodeEnum!) { promotionTranslate(id: $id, input: $input, languageCode: $languageCode) { errors { field code message } ...
47
1,060
saleor
saleor/tests/e2e/promotions/utils/promotion_delete.py
.py
from ...utils import get_graphql_content PROMOTION_DELETE_MUTATION = """ mutation DeletePromotion($id:ID!) { promotionDelete(id: $id) { errors { code field message } promotion { id } } } """ def delete_promotion( staff_api_client, promotion_id, ): variables = {...
35
587
saleor
saleor/tests/e2e/promotions/utils/promotion_rule_update.py
.py
from ...utils import get_graphql_content PROMOTION_RULE_UPDATE_MUTATION = """ mutation promotionRuleCreate($id: ID!, $input: PromotionRuleUpdateInput!) { promotionRuleUpdate(id: $id, input: $input) { errors { field message code } promotionRule { id name description ...
61
1,132
saleor
saleor/tests/e2e/taxes/utils/tax_class_update.py
.py
from ...utils import get_graphql_content TAX_CLASS_UPDATE_MUTATION = """ mutation taxClassUpdate($id:ID!, $input:TaxClassUpdateInput!){ taxClassUpdate(id:$id, input:$input) { errors { field message } taxClass { id countries { country { code ...
41
885
saleor
saleor/tests/e2e/taxes/utils/query_tax_configurations.py
.py
from ...utils import get_graphql_content TAX_CONFIGURATIONS_QUERY = """ query TaxConfigurationsList($first: Int) { taxConfigurations(first: $first) { edges { node { id channel { id slug } displayGrossPrices pricesEnteredWithTax chargeTaxes...
35
664
saleor
saleor/tests/e2e/taxes/utils/__init__.py
.py
from .query_tax_configurations import get_tax_configurations from .tax_class_create import create_tax_class from .tax_class_update import update_tax_class from .tax_configuration_update import update_tax_configuration from .tax_country_configuration_update import update_country_tax_rates __all__ = [ "get_tax_confi...
14
446
saleor
saleor/tests/e2e/taxes/utils/tax_class_create.py
.py
from ...utils import get_graphql_content TAX_CLASS_CREATE_MUTATION = """ mutation TaxClassCreate($input: TaxClassCreateInput!) { taxClassCreate(input: $input) { errors { field message code } taxClass { id name countries { country { code } ...
45
893
saleor
saleor/tests/e2e/taxes/utils/tax_configuration_update.py
.py
from ...utils import get_graphql_content TAX_CONFIGURATION_UPDATE_MUTATION = """ mutation TaxConfigurationUpdate($id: ID!, $input: TaxConfigurationUpdateInput!) { taxConfigurationUpdate(id: $id, input: $input) { errors { field code message countryCodes } taxConfiguration { i...
75
1,962
saleor
saleor/tests/e2e/taxes/utils/tax_country_configuration_update.py
.py
from ...utils import get_graphql_content TAX_COUNTRY_CONFIGURATION_UPDATE_MUTATION = """ mutation TaxCountryConfigurationUpdate($countryCode: CountryCode!, $updateTaxClassRates: [TaxClassRateInput!]!) { taxCountryConfigurationUpdate( countryCode: $countryCode updateTaxClassRates: $updateTaxClassRates ) { ...
58
1,248
saleor
saleor/tests/e2e/payment/utils/__init__.py
.py
from .query_payment import get_payment __all__ = ["get_payment"]
4
66
saleor
saleor/tests/e2e/payment/utils/query_payment.py
.py
from ...utils import get_graphql_content PAYMENT_QUERY = """ query payment($id: ID!) { payment(id: $id) { id isActive checkout { token } } } """ def get_payment( api_client, payment_id, ): variables = {"id": payment_i...
26
472
saleor
saleor/tests/e2e/pages/test_create_page_with_all_attributes_types.py
.py
import datetime import json import pytest from django.conf import settings from ....tests.utils import dummy_editorjs from ..attributes.utils import prepare_all_attributes from ..pages.utils import create_page, create_page_type from ..product.utils.preparing_product import prepare_product from ..shop.utils.preparing_...
120
3,693
saleor
saleor/tests/e2e/pages/utils/page_create.py
.py
from ...utils import get_graphql_content PAGE_CREATE_MUTATION = """ mutation PageCreate($input: PageCreateInput!) { pageCreate(input: $input) { errors { field message code } page { id title slug isPublished publishedAt attributes{ attribute{ ...
80
1,420
saleor
saleor/tests/e2e/pages/utils/__init__.py
.py
from .page_create import create_page from .page_type_create import create_page_type __all__ = [ "create_page", "create_page_type", ]
8
142
saleor
saleor/tests/e2e/pages/utils/page_type_create.py
.py
from ...utils import get_graphql_content PAGE_TYPE_CREATE_MUTATION = """ mutation PageTypeCreate($input: PageTypeCreateInput!) { pageTypeCreate(input: $input) { errors { field message code } pageType { id name slug attributes{ id } } } } """ ...
46
825
saleor
saleor/tests/e2e/attributes/utils/prepare_attributes.py
.py
from .attribute_bulk_create import bulk_create_attributes from .create_attribute import attribute_create def prepare_all_attributes(e2e_staff_api_client, attribute_type, entity_type): # Dropdown values = [ {"name": "Freddy Torres"}, {"name": "Isabella Smith"}, {"name": "Hayden Blake"},...
294
7,435
saleor
saleor/tests/e2e/attributes/utils/create_attribute.py
.py
from ...utils import get_graphql_content ATTRIBUTE_CREATE_MUTATION = """ mutation AttributeCreate($input: AttributeCreateInput!) { attributeCreate(input: $input) { attribute { id name slug unit entityType referenceTypes { ... on ProductType { __typename...
84
1,757
saleor
saleor/tests/e2e/attributes/utils/__init__.py
.py
from .attribute_bulk_create import bulk_create_attributes from .create_attribute import attribute_create from .prepare_attributes import ( prepare_all_attributes, prepare_all_attributes_in_bulk, prepare_attributes_in_bulk, ) from .update_attribute import attribute_update __all__ = [ "attribute_create",...
18
479
saleor
saleor/tests/e2e/attributes/utils/attribute_bulk_create.py
.py
from ...utils import get_graphql_content ATTRIBUTE_BULK_CREATE_MUTATION = """ mutation AttributeBulkCreate($attributes: [AttributeCreateInput!]!) { attributeBulkCreate(attributes: $attributes) { results { errors { path message code } attribute { id name ...
62
1,211
saleor
saleor/tests/e2e/attributes/utils/update_attribute.py
.py
from ...utils import get_graphql_content ATTRIBUTE_UPDATE_MUTATION = """ mutation updateAttribute( $id: ID!, $input: AttributeUpdateInput! ) { attributeUpdate( id: $id, input: $input) { errors { field message code } ...
59
1,381
saleor
saleor/tests/e2e/checkout/test_checkout_complete_with_gift_card_recalculcates_status_for_other_checkout.py
.py
import pytest from ..gift_cards.utils import create_gift_card from ..product.utils.preparing_product import prepare_product from ..shop.utils import prepare_shop from ..utils import assign_permissions from .utils import ( checkout_add_promo_code, checkout_complete, checkout_create, checkout_delivery_me...
182
5,670
saleor
saleor/tests/e2e/checkout/test_logged_customer_is_unable_to_buy_more_products_than_the_limit_per_customer.py
.py
import pytest from ..product.utils import ( create_category, create_product, create_product_channel_listing, create_product_type, create_product_variant, create_product_variant_channel_listing, ) from ..shop.utils.preparing_shop import prepare_default_shop from ..utils import assign_permissions...
130
3,506
saleor
saleor/tests/e2e/checkout/test_checkout_complete_respect_saving_address_settings.py
.py
import pytest from .. import ADDRESS_DE from ..account.utils import get_own_data from ..product.utils.preparing_product import prepare_product from ..shop.utils.preparing_shop import prepare_default_shop from ..utils import assert_address_data, assign_permissions from .utils import ( checkout_complete, checkou...
133
4,343
saleor
saleor/tests/e2e/checkout/test_checkout_with_gift_promotion_updates.py
.py
"""E2E test for gift promotion with discount price expiration. This test verifies the complete flow of gift promotions with dynamic updates: 1. Create checkout with a product line 2. Create a gift promotion (order promotion with gift reward) 3. Update shipping - gift line should be added 4. Update gift promotion - cha...
336
10,822
saleor
saleor/tests/e2e/checkout/test_checkout_create_order_with_no_payment.py
.py
import pytest from ..product.utils.preparing_product import prepare_product from ..shop.utils import prepare_shop from ..utils import assign_permissions from .utils import ( checkout_create, checkout_delivery_method_update, raw_checkout_complete, ) @pytest.mark.e2e def test_should_be_able_to_create_order...
108
3,016
saleor
saleor/tests/e2e/checkout/test_checkout_complete_with_transaction_and_gift_card.py
.py
import pytest from ..gift_cards.utils import create_gift_card from ..orders.utils import order_query from ..product.utils.preparing_product import prepare_product from ..shop.utils import prepare_shop from ..transactions.utils import create_transaction from ..utils import assign_permissions from .utils import ( ch...
372
11,462
saleor
saleor/tests/e2e/checkout/test_guest_checkout_should_be_associated_with_user_account.py
.py
import pytest from ..account.utils import create_customer, get_user from ..product.utils.preparing_product import prepare_product from ..shop.utils.preparing_shop import prepare_default_shop from ..utils import assign_permissions from .utils import ( checkout_complete, checkout_create, checkout_delivery_me...
123
3,432
saleor
saleor/tests/e2e/checkout/test_checkout_complete_not_save_cc_address_in_customer_address_book.py
.py
import pytest from .. import ADDRESS_DE from ..account.utils import get_own_data from ..product.utils.preparing_product import prepare_product from ..shop.utils.preparing_shop import prepare_default_shop from ..utils import assert_address_data, assign_permissions from ..warehouse.utils import update_warehouse from .ut...
146
4,696
saleor
saleor/tests/e2e/checkout/test_checkout_create_from_order.py
.py
import pytest from ..orders.utils import draft_order_create, order_lines_create from ..product.utils.preparing_product import prepare_product from ..shop.utils.preparing_shop import prepare_default_shop from ..utils import assign_permissions from .utils import checkout_create_from_order @pytest.mark.e2e def test_che...
86
2,492
saleor
saleor/tests/e2e/checkout/test_unlogged_customer_should_be_able_to_buy_by_click_and_collect.py
.py
import pytest from ..product.utils.preparing_product import prepare_product from ..shop.utils.preparing_shop import prepare_default_shop from ..utils import assign_permissions from ..warehouse.utils import update_warehouse from .utils import ( checkout_complete, checkout_create, checkout_delivery_method_up...
97
2,764
saleor
saleor/tests/e2e/checkout/test_pay_for_part_of_checkout_with_gift_card.py
.py
import pytest from ..gift_cards.utils import create_gift_card from ..product.utils.preparing_product import prepare_product from ..shop.utils.preparing_shop import prepare_default_shop from ..utils import assign_permissions from .utils import ( checkout_add_promo_code, checkout_complete, checkout_create, ...
120
3,974
saleor
saleor/tests/e2e/checkout/test_checkout_create_order_transactions_and_inactive_payment.py
.py
import pytest from ..apps.utils import add_app from ..orders.utils import order_query from ..payment.utils import get_payment from ..product.utils.preparing_product import prepare_product from ..shop.utils.preparing_shop import prepare_default_shop from ..transactions.utils import transaction_initialize from ..utils i...
139
4,252
saleor
saleor/tests/e2e/checkout/test_logged_in_customer_should_be_able_to_order_physical_product.py
.py
import pytest from ..product.utils.preparing_product import prepare_product from ..shop.utils.preparing_shop import prepare_default_shop from ..utils import assign_permissions from .utils import ( checkout_complete, checkout_create, checkout_delivery_method_update, checkout_dummy_payment_create, ) @p...
95
2,756
saleor
saleor/tests/e2e/checkout/test_checkout_create_order_transactions_and_active_payment.py
.py
import pytest from ....payment.error_codes import PaymentErrorCode from ..apps.utils import add_app from ..product.utils.preparing_product import prepare_product from ..shop.utils.preparing_shop import prepare_default_shop from ..transactions.utils import transaction_initialize from ..utils import assign_permissions f...
121
3,523
saleor
saleor/tests/e2e/checkout/test_guest_checkout_should_be_assigned_to_user_after_creating_the_account.py
.py
import pytest from ....account.models import User from ....graphql.core.utils import to_global_id_or_none from ..account.utils import account_register, customer_update, get_user from ..product.utils.preparing_product import prepare_product from ..shop.utils.preparing_shop import prepare_shop from ..utils import assign...
151
4,311
saleor
saleor/tests/e2e/checkout/test_checkout_switch_from_cc_to_standard_delivery_method.py
.py
import pytest from ..product.utils.preparing_product import prepare_product from ..shop.utils.preparing_shop import prepare_default_shop from ..utils import assign_permissions from ..warehouse.utils import update_warehouse from .utils import ( checkout_complete, checkout_create, checkout_delivery_method_up...
120
3,730
saleor
saleor/tests/e2e/checkout/test_checkout_use_multiple_gift_cards.py
.py
import pytest from ..gift_cards.utils import bulk_create_gift_card from ..product.utils.preparing_product import prepare_product from ..shop.utils.preparing_shop import prepare_default_shop from ..utils import assign_permissions from .utils import ( checkout_add_promo_code, checkout_complete, checkout_crea...
173
5,732
saleor
saleor/tests/e2e/checkout/test_unlogged_customer_should_not_be_able_to_order_product_quantity_greater_than_stock.py
.py
import pytest from ..product.utils import ( create_category, create_product, create_product_channel_listing, create_product_type, create_product_variant_channel_listing, raw_create_product_variant, ) from ..shop.utils.preparing_shop import prepare_default_shop from ..utils import assign_permiss...
122
3,076
saleor
saleor/tests/e2e/checkout/test_unlogged_customer_should_not_be_able_to_buy_product_without_shipping_option.py
.py
import pytest from ..product.utils.preparing_product import prepare_product from ..shop.utils import prepare_shop from ..utils import assign_permissions from .utils import checkout_create, raw_checkout_dummy_payment_create @pytest.mark.e2e def test_unlogged_customer_unable_to_buy_product_without_shipping_option_CORE...
88
2,519
saleor
saleor/tests/e2e/checkout/test_checkout_should_be_able_to_remove_shipping_method.py
.py
import pytest from ..product.utils.preparing_product import prepare_product from ..shop.utils.preparing_shop import prepare_default_shop from ..utils import assign_permissions from .utils import checkout_create, checkout_delivery_method_update @pytest.mark.e2e def test_checkout_should_be_able_to_remove_shipping_meth...
89
2,942
saleor
saleor/tests/e2e/checkout/test_guest_user_can_complete_checkout_without_saving_addresses.py
.py
import pytest from .. import ADDRESS_DE from ..product.utils.preparing_product import prepare_product from ..shop.utils.preparing_shop import prepare_default_shop from ..utils import assert_address_data, assign_permissions from .utils import ( checkout_complete, checkout_create, checkout_delivery_method_up...
109
3,547
saleor
saleor/tests/e2e/checkout/test_checkout_add_gift_card_before_email.py
.py
import pytest from ..gift_cards.utils import create_gift_card from ..product.utils.preparing_product import prepare_product from ..shop.utils.preparing_shop import prepare_default_shop from ..utils import assign_permissions from .utils import ( checkout_add_promo_code, checkout_complete, checkout_create, ...
121
4,137
saleor
saleor/tests/e2e/checkout/test_checkout_create_partially_paid_order.py
.py
import pytest from ..product.utils.preparing_product import prepare_product from ..shop.utils import prepare_shop from ..transactions.utils import create_transaction from ..utils import assign_permissions from .utils import ( checkout_create, checkout_delivery_method_update, raw_checkout_complete, ) @pyt...
128
3,624
saleor
saleor/tests/e2e/checkout/test_unlogged_customer_is_unable_to_buy_unpublished_product.py
.py
import pytest from ..product.utils import ( create_category, create_product, create_product_type, create_product_variant, create_product_variant_channel_listing, raw_create_product_channel_listing, ) from ..shop.utils.preparing_shop import prepare_default_shop from ..utils import assign_permiss...
111
2,794
saleor
saleor/tests/e2e/checkout/test_buy_gift_card_in_the_checkout.py
.py
import pytest from ..account.utils import get_own_data from ..gift_cards.utils import get_gift_cards from ..orders.utils import order_query from ..product.utils import ( create_category, create_product, create_product_channel_listing, create_product_type, create_product_variant, create_product_...
166
4,539
saleor
saleor/tests/e2e/checkout/test_unlogged_customer_should_be_able_to_order_physical_product.py
.py
import pytest from ..product.utils.preparing_product import prepare_product from ..shop.utils.preparing_shop import prepare_default_shop from ..utils import assign_permissions from .utils import ( checkout_complete, checkout_create, checkout_delivery_method_update, checkout_dummy_payment_create, ch...
106
3,056
saleor
saleor/tests/e2e/checkout/test_checkout_unable_to_make_purchase_with_no_payment.py
.py
import pytest from ..product.utils.preparing_product import prepare_product from ..shop.utils.preparing_shop import prepare_default_shop from ..utils import assign_permissions from .utils import ( checkout_create, checkout_delivery_method_update, raw_checkout_complete, ) @pytest.mark.e2e def test_should_...
90
2,451
saleor
saleor/tests/e2e/checkout/test_logged_in_customer_should_not_be_able_to_buy_unavailable_product.py
.py
import pytest from ..product.utils import ( create_category, create_product, create_product_type, create_product_variant, create_product_variant_channel_listing, raw_create_product_channel_listing, ) from ..shop.utils.preparing_shop import prepare_default_shop from ..utils import assign_permiss...
119
3,044
saleor
saleor/tests/e2e/checkout/test_checkout_complete_store_address_in_customer_addresses_after_updating_the_address.py
.py
import pytest from .. import ADDRESS_DE, DEFAULT_ADDRESS from ..account.utils import get_own_data from ..product.utils.preparing_product import prepare_product from ..shop.utils.preparing_shop import prepare_default_shop from ..utils import assert_address_data, assign_permissions from .utils import ( checkout_comp...
141
4,641
saleor
saleor/tests/e2e/checkout/test_checkout_with_shipping_method_with_min_order_value.py
.py
import pytest from ..product.utils import ( create_product_variant, create_product_variant_channel_listing, ) from ..product.utils.preparing_product import prepare_product from ..shop.utils import prepare_shop from ..utils import assign_permissions from .utils import checkout_create, checkout_delivery_method_u...
127
3,509