def METHOD_NAME(
    staff_api_client,
    permission_group_manage_orders,
    channel_PLN,
    channel_USD,
    product,
    shipping_method,
    graphql_address_data,
):
    """Ensure that staff user is able to create and complete the draft order
    in the channel he has access to."""
    # given
    permission_group_manage_orders.restricted_access_to_channels = True
    permission_group_manage_orders.save(update_fields=["restricted_access_to_channels"])
    permission_group_manage_orders.channels.add(channel_USD)
    permission_group_manage_orders.user_set.add(staff_api_client.user)
    # when
    # create order
    draft_order_create_variables = {
        "input": {
            "userEmail": "test@example.com",
            "billingAddress": graphql_address_data,
            "shippingAddress": graphql_address_data,
            "channelId": graphene.Node.to_global_id("Channel", channel_USD.id),
        }
    }
    response = staff_api_client.post_graphql(
        DRAFT_ORDER_CREATE_MUTATION, draft_order_create_variables
    )
    draft_order_id = get_graphql_content(response)["data"]["draftOrderCreate"]["order"][
        "id"
    ]
    # add lines to order
    variant = product.variants.first()
    order_lines_create_variables = {
        "orderId": draft_order_id,
        "variantId": graphene.Node.to_global_id("ProductVariant", variant.id),
        "quantity": 2,
    }
    staff_api_client.post_graphql(
        ORDER_LINES_CREATE_MUTATION, order_lines_create_variables
    )
    # update order with available product and shipping method
    draft_order_update_variables = {
        "id": draft_order_id,
        "input": {
            "shippingMethod": graphene.Node.to_global_id(
                "ShippingMethod", shipping_method.id
            ),
        },
    }
    staff_api_client.post_graphql(
        DRAFT_ORDER_UPDATE_MUTATION, draft_order_update_variables
    )
    # complete order
    staff_api_client.post_graphql(DRAFT_ORDER_COMPLETE_MUTATION, {"id": draft_order_id})
    # then
    # query created order
    response = staff_api_client.post_graphql(QUERY_ORDER_BY_ID, {"id": draft_order_id})
    content = get_graphql_content(response)
    order_data = content["data"]["order"]
    assert order_data["status"] == OrderStatus.UNFULFILLED.upper()