mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-05 20:57:12 +00:00
Fix behats
This commit is contained in:
parent
eab7b8d0b5
commit
dd988e3802
2 changed files with 21 additions and 1 deletions
|
|
@ -47,7 +47,7 @@ Feature: Statistics
|
||||||
And 4 more new customers have paid 5 orders placed for total of "$5,000.37"
|
And 4 more new customers have paid 5 orders placed for total of "$5,000.37"
|
||||||
And 2 more new customers have paid 2 orders placed for total of "$5,000.37"
|
And 2 more new customers have paid 2 orders placed for total of "$5,000.37"
|
||||||
When I view statistics for "United States" channel and previous year split by month
|
When I view statistics for "United States" channel and previous year split by month
|
||||||
And I view statistics for "United States" channel and next year split by month
|
And I view statistics for "United States" channel and next year
|
||||||
Then I should see 6 new customers
|
Then I should see 6 new customers
|
||||||
And I should see 7 paid orders
|
And I should see 7 paid orders
|
||||||
And there should be total sales of "$10,000.74"
|
And there should be total sales of "$10,000.74"
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,26 @@ final class DashboardContext implements Context
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @When /^I view statistics for ("[^"]+" channel) and (previous|next) year$/
|
||||||
|
*
|
||||||
|
* @throws UnexpectedPageException
|
||||||
|
*/
|
||||||
|
public function iViewStatisticsForPreviousPeriod(
|
||||||
|
ChannelInterface $channel,
|
||||||
|
string $period,
|
||||||
|
): void {
|
||||||
|
if (!$this->dashboardPage->isOpen(['channel' => $channel->getCode()])) {
|
||||||
|
$this->dashboardPage->open(['channel' => $channel->getCode()]);
|
||||||
|
}
|
||||||
|
|
||||||
|
match ($period) {
|
||||||
|
'previous' => $this->dashboardPage->choosePreviousPeriod(),
|
||||||
|
'next' => $this->dashboardPage->chooseNextPeriod(),
|
||||||
|
default => null,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @When I choose :channelName channel
|
* @When I choose :channelName channel
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue