Skip to content

Commit

Permalink
[WIP] Cover seeing_order_with_different_promotions.feature scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubtobiasz committed Nov 29, 2023
1 parent b4bf64b commit 06c75fe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Feature: Seeing order with different promotions
And there is a customer "lucy@teamlucifer.com" that placed an order "#00000666"
And I am logged in as an administrator

@ui
@ui @api
Scenario: Seeing prices and discount prices of order item
Given the customer bought 2 "PHP T-Shirt" products
And the customer bought a single "Symfony Mug"
Expand Down
11 changes: 11 additions & 0 deletions src/Sylius/Behat/Context/Api/Admin/ManagingOrdersContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,17 @@ public function iShouldNotSeeInformationAboutShipping(): void
);
}

/**
* @Then the :productName product's unit price should be :price
*/
public function productUnitPriceShouldBe(string $productName, string $price): void
{
ray(
json_decode($this->client->getLastResponse()->getContent(), true),
json_decode($this->client->subResourceIndex(Resources::ORDERS, Resources::ADJUSTMENTS, $this->sharedStorage->get('order')->getTokenValue())->getContent(), true),
);
}

/**
* @param array<string, mixed> $address
*/
Expand Down

0 comments on commit 06c75fe

Please sign in to comment.