-
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
1 parent
1d4859a
commit 7c0c57a
Showing
2 changed files
with
4 additions
and
16 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -26,38 +26,26 @@ protected function setUp(): void | |
|
||
$this->loadFixtures(['addressed_cart.yaml']); | ||
|
||
// the cart is already addressed, so we go straight to selecting a shipping method | ||
$this->loginShopUser('[email protected]', 'sylius'); | ||
$this->showSelectingShippingMethodStep(); | ||
$this->processWithDefaultShippingMethod(); | ||
} | ||
|
||
public function test_it_completes_the_checkout_using_credit_card(): void | ||
{ | ||
$this->loginShopUser('[email protected]', 'sylius'); | ||
|
||
$this->processWithPaymentMethod('tpay_card'); | ||
$this->fillCardData(self::FORM_ID, self::CARD_NUMBER, '123', '01', '2029'); | ||
$this->placeOrder(); | ||
|
||
$this->assertPageTitleContains('Thank you!'); | ||
$this->assertPageTitleContains('Waiting for payment'); | ||
} | ||
|
||
public function test_it_completes_the_checkout_using_credit_card_and_saves_the_card(): void | ||
{ | ||
$this->loginShopUser('[email protected]', 'sylius'); | ||
|
||
$this->processWithPaymentMethod('tpay_card'); | ||
$this->fillCardData(self::FORM_ID, self::CARD_NUMBER, '123', '01', '2029', true); | ||
$this->placeOrder(); | ||
|
||
$this->assertPageTitleContains('Thank you!'); | ||
} | ||
|
||
public function test_it_forbids_card_saving_for_not_logged_in_users(): void | ||
{ | ||
$this->expectException(NoSuchElementException::class); | ||
|
||
$this->processWithPaymentMethod('tpay_card'); | ||
$this->fillCardData(self::FORM_ID, self::CARD_NUMBER, '123', '01', '2029', true); | ||
$this->assertPageTitleContains('Waiting for payment'); | ||
} | ||
} |
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