[go: up one dir, main page]

Skip to content

Commit

Permalink
[Behat] Updated context and pages implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafikooo authored and Zales0123 committed Aug 17, 2022
1 parent 56c411f commit 9596282
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
16 changes: 9 additions & 7 deletions tests/Behat/Context/Ui/Admin/ManagingInvoicesContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,34 +298,36 @@ public function shouldBeNotifiedThatEmailWasSentSuccessfully(): void
}

/**
* @Then it should have :quantity :name shipment with unit price :unitPrice, net value :netValue, tax total :taxTotal and total :total in :currencyCode currency
* @Then it should have :quantity :name shipment with original unit price :originalUnitPrice, unit price :unitPrice, net value :netValue, tax total :taxTotal and total :total in :currencyCode currency
*/
public function itShouldHaveShipmentWithUnitPriceNetValueTaxTotalAndTotalInCurrency(
public function itShouldHaveShipmentWithOriginalUnitPriceUnitPriceNetValueTaxTotalAndTotalInCurrency(
int $quantity,
string $name,
string $originalUnitPrice,
string $unitPrice,
string $netValue,
string $taxTotal,
string $total,
string $currencyCode
): void {
Assert::true($this->showPage->hasItemWithData($name, $unitPrice, $quantity, $taxTotal, $total, $currencyCode, $netValue));
Assert::true($this->showPage->hasItemWithData($name, $originalUnitPrice, $unitPrice, $quantity, $taxTotal, $total, $currencyCode, $netValue));
}

/**
* @Then it should have :quantity :name item with unit price :unitPrice, net value :netValue, tax total :taxTotal and total :total in :currencyCode currency
* @Then it should have :quantity :name items with unit price :unitPrice, net value :netValue, tax total :taxTotal and total :total in :currencyCode currency
* @Then it should have :quantity :name item with original unit price :originalUnitPrice, unit price :unitPrice, net value :netValue, tax total :taxTotal and total :total in :currencyCode currency
* @Then it should have :quantity :name items with original unit price :originalUnitPrice, unit price :unitPrice, net value :netValue, tax total :taxTotal and total :total in :currencyCode currency
*/
public function itShouldHaveItemsWithUnitPriceNetValueTaxTotalAndTotalInCurrency(
public function itShouldHaveItemsWithOriginalUnitPriceUnitPriceNetValueTaxTotalAndTotalInCurrency(
int $quantity,
string $name,
string $originalUnitPrice,
string $unitPrice,
string $netValue,
string $taxTotal,
string $total,
string $currencyCode
): void {
Assert::true($this->showPage->hasItemWithData($name, $unitPrice, $quantity, $taxTotal, $total, $currencyCode, $netValue));
Assert::true($this->showPage->hasItemWithData($name, $originalUnitPrice, $unitPrice, $quantity, $taxTotal, $total, $currencyCode, $netValue));
}

/**
Expand Down
2 changes: 2 additions & 0 deletions tests/Behat/Page/Admin/Invoice/ShowPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public function countItems(): int

public function hasItemWithData(
string $name,
string $originalUnitPrice,
string $unitPrice,
int $quantity,
string $taxTotal,
Expand All @@ -88,6 +89,7 @@ public function hasItemWithData(
): bool {
$row = $this->tableAccessor->getRowsWithFields($this->getElement('table'), [
'name' => $name,
'original_unit_price' => $originalUnitPrice,
'unit_price' => $unitPrice,
'quantity' => $quantity,
'tax_total' => $taxTotal,
Expand Down
1 change: 1 addition & 0 deletions tests/Behat/Page/Admin/Invoice/ShowPageInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public function countItems(): int;

public function hasItemWithData(
string $name,
string $originalUnitPrice,
string $unitPrice,
int $quantity,
string $taxTotal,
Expand Down

0 comments on commit 9596282

Please sign in to comment.