Skip to content

Commit

Permalink
[Behat] Enable the rest of the admin order billing scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafikooo committed Nov 14, 2023
1 parent 49059f3 commit fc59875
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ Feature: Modifying a customer's billing address on an order with an applied coup
And I specify their new billing address as "Los Angeles", "Seaside Fwy", "90802", "United States" for "Lucifer Morningstar"
And I save my changes
Then I should be notified that it has been successfully edited
And the order should be billed to "Lucifer Morningstar", "Seaside Fwy", "90802", "Los Angeles", "United States"
And this order should have "Lucifer Morningstar", "Seaside Fwy", "90802", "Los Angeles", "United States" as its new billing address
And the order's total should still be "$350.00"
And the order's promotion total should still be "-$50.00"
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ Feature: Modifying a customer's billing address on an order with an applied prom
And I specify their new billing address as "Los Angeles", "Seaside Fwy", "90802", "United States" for "Lucifer Morningstar"
And I save my changes
Then I should be notified that it has been successfully edited
And the order should be billed to "Lucifer Morningstar", "Seaside Fwy", "90802", "Los Angeles", "United States"
And this order should have "Lucifer Morningstar", "Seaside Fwy", "90802", "Los Angeles", "United States" as its new billing address
And the order's total should still be "$350.00"
And the order's promotion total should still be "-$50.00"
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ Feature: Modifying a customer's billing address on an order with taxes
And I specify their new billing address as "Los Angeles", "Seaside Fwy", "90802", "United States" for "Lucifer Morningstar"
And I save my changes
Then I should be notified that it has been successfully edited
And the order should be billed to "Lucifer Morningstar", "Seaside Fwy", "90802", "Los Angeles", "United States"
And this order should have "Lucifer Morningstar", "Seaside Fwy", "90802", "Los Angeles", "United States" as its new billing address
And the order's total should still be "$480.00"
And the order's tax total should still be "$80.00"
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Feature: Modifying a customer's billing address validation
And the customer chose "Free" shipping method with "Cash on Delivery" payment
And I am logged in as an administrator

@api @ui
@ui @no-api
Scenario: Address an order without name, city and street
When I view the summary of the order "#00000001"
And I want to modify a customer's billing address of this order
Expand Down
2 changes: 2 additions & 0 deletions src/Sylius/Behat/Context/Api/Admin/ManagingOrdersContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,8 @@ public function theOrdersTotalShouldBe(int $total): void
*/
public function theOrdersPromotionTotalShouldBe(int $promotionTotal): void
{
$this->client->show(Resources::ORDERS, $this->sharedStorage->get('order')->getTokenValue());

Assert::same(
$this->responseChecker->getValue($this->client->getLastResponse(), 'orderPromotionTotal'),
$promotionTotal,
Expand Down

0 comments on commit fc59875

Please sign in to comment.