-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
183 additions
and
4 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
templates/bundles/SyliusShopBundle/Checkout/Complete/_navigation.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace E2E\Checkout; | ||
|
||
use Tests\CommerceWeavers\SyliusTpayPlugin\E2E\E2ETestCase; | ||
use Tests\CommerceWeavers\SyliusTpayPlugin\E2E\Helper\Account\LoginShopUserTrait; | ||
use Tests\CommerceWeavers\SyliusTpayPlugin\E2E\Helper\Order\CartTrait; | ||
use Tests\CommerceWeavers\SyliusTpayPlugin\E2E\Helper\Order\TpayTrait; | ||
|
||
final class FreePaymentCheckoutTest extends E2ETestCase | ||
{ | ||
use CartTrait; | ||
use TpayTrait; | ||
use LoginShopUserTrait; | ||
|
||
private const FORM_ID = 'sylius_checkout_complete'; | ||
|
||
protected function setUp(): void | ||
{ | ||
parent::setUp(); | ||
|
||
$this->loadFixtures(['addressed_free_cart.yaml']); | ||
|
||
$this->loginShopUser('[email protected]', 'sylius'); | ||
// the cart is already addressed, so we go straight to selecting a shipping method | ||
$this->showSelectingShippingMethodStep(); | ||
$this->processWithDefaultShippingMethod(); | ||
} | ||
|
||
public function test_it_completes_the_checkout_if_order_total_is_0(): void | ||
{ | ||
// total is 0.00 so we do not choose payment method and go straight to complete | ||
$this->placeOrder(); | ||
|
||
$this->assertPageTitleContains('Thank you!'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
include: | ||
- common/channel.yaml | ||
- common/country.yaml | ||
- common/customer.yaml | ||
- common/payment_method.yaml | ||
- common/shipping_category.yaml | ||
- free_shipping_method.yaml | ||
- common/tax_category.yaml | ||
|
||
Sylius\Component\Core\Model\Product: | ||
product: | ||
fallbackLocale: en_US | ||
currentLocale: en | ||
code: 'MUG_SW' | ||
translations: | ||
- '@product_translation' | ||
|
||
Sylius\Component\Core\Model\ProductTranslation: | ||
product_translation: | ||
name: 'Mug' | ||
slug: 'mug' | ||
locale: 'en_US' | ||
translatable: '@product' | ||
|
||
Sylius\Component\Product\Model\ProductVariantTranslation: | ||
product_variant_translation: | ||
name: 'Mug' | ||
locale: en_US | ||
translatable: '@product_variant' | ||
|
||
Sylius\Component\Core\Model\ProductVariant: | ||
product_variant: | ||
code: 'MUG' | ||
version: 1 | ||
product: '@product' | ||
fallbackLocale: en_US | ||
currentLocale: en | ||
position: 1 | ||
optionValues: ['@product_option_value_color_blue'] | ||
channelPricings: | ||
channel_web: '@product_variant_channel_web_pricing' | ||
translations: | ||
- '@product_variant_translation' | ||
enabled: true | ||
tracked: true | ||
onHold: 0 | ||
onHand: 10 | ||
weight: 100.50 | ||
width: 100.50 | ||
height: 100.50 | ||
depth: 100.50 | ||
taxCategory: '@tax_category_default' | ||
shippingCategory: '@shipping_category_default' | ||
shippingRequired: true | ||
|
||
Sylius\Component\Core\Model\ChannelPricing: | ||
product_variant_channel_web_pricing: | ||
channelCode: 'WEB' | ||
price: 00 | ||
|
||
Sylius\Component\Product\Model\ProductOption: | ||
product_option_color: | ||
code: 'COLOR' | ||
currentLocale: 'en_US' | ||
translations: | ||
- '@product_option_translation_en_EN' | ||
|
||
Sylius\Component\Product\Model\ProductOptionTranslation: | ||
product_option_translation_en_EN: | ||
locale: 'en_US' | ||
name: 'Color' | ||
translatable: '@product_option_color' | ||
|
||
Sylius\Component\Product\Model\ProductOptionValue: | ||
product_option_value_color_blue: | ||
code: 'COLOR_BLUE' | ||
currentLocale: 'en_US' | ||
fallbackLocale: 'en_US' | ||
option: '@product_option_color' | ||
translations: | ||
- '@product_option_value_translation_blue' | ||
|
||
Sylius\Component\Product\Model\ProductOptionValueTranslation: | ||
product_option_value_translation_blue: | ||
locale: 'en_US' | ||
value: 'Blue' | ||
translatable: '@product_option_value_color_blue' | ||
|
||
App\Entity\Order: | ||
addressed_cart: | ||
channel: '@channel_web' | ||
currencyCode: 'USD' | ||
localeCode: 'en_US' | ||
customer: '@customer_tony' | ||
state: 'cart' | ||
checkoutState: 'addressed' | ||
createdByGuest: false | ||
shippingAddress: '@address_tony' | ||
billingAddress: '@address_tony' | ||
__calls: | ||
- addItem: ["@order_item"] | ||
|
||
Sylius\Component\Core\Model\OrderItem: | ||
order_item: | ||
variant: '@product_variant' | ||
|
||
Sylius\Component\Core\Model\OrderItemUnit: | ||
order_item_unit: | ||
__construct: ['@order_item'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Sylius\Component\Core\Model\ShippingMethod: | ||
shipping_method_free: | ||
code: 'FREE' | ||
enabled: true | ||
calculator: 'flat_rate' | ||
configuration: | ||
WEB: | ||
amount: 00 | ||
MOBILE: | ||
amount: 00 | ||
zone: '@zone_world' | ||
currentLocale: 'en_US' | ||
translations: ["@shipping_method_translation_free"] | ||
channels: ["@channel_web"] | ||
|
||
Sylius\Component\Shipping\Model\ShippingMethodTranslation: | ||
shipping_method_translation_free: | ||
name: 'FREE' | ||
locale: 'en_US' | ||
description: '<paragraph(2)>' | ||
translatable: '@shipping_method_free' | ||
|
||
Sylius\Component\Addressing\Model\ZoneMember: | ||
zone_member_{US, FR, DE}: | ||
code: '<current()>' | ||
|
||
Sylius\Component\Addressing\Model\Zone: | ||
zone_world: | ||
code: 'WORLD' | ||
name: 'World' | ||
type: 'country' | ||
members: ['@zone_member_US', '@zone_member_FR', '@zone_member_DE'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters