New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error on show product without pricing #11400
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello Olivier,
thanks a lot for your contribution. Can you, however, cover this case with behat, please? Just to avoid regression in the future
features/product/viewing_product_in_admin_panel/viewing_details_of_simple_product.feature
Outdated
Show resolved
Hide resolved
/** | ||
* @Then I should not see price for channel :channelName | ||
*/ | ||
public function iShouldNotSeePriceForChannel(string $channelName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing : void
@@ -22,6 +22,10 @@ public function getPriceForChannel(string $channelName): string | |||
/** @var NodeElement $priceForChannel */ | |||
$channelPriceRow = $this->getDocument()->find('css', sprintf('#pricing tr:contains("%s")', $channelName)); | |||
|
|||
if (null === $channelPriceRow) { | |||
return ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe null
? It clearly says that there is no price rather than there is something but empty 💃
@@ -37,6 +37,17 @@ public function hasChannel(string $channelName): bool | |||
return false; | |||
} | |||
|
|||
public function countChannels(): int | |||
{ | |||
if (! $this->hasElement('channels')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra space after !
The base of this pull-request was changed, you need fetch and reset your local branch Unless you added new commits (to this branch) locally that you did not push yet, Feel free to ask for assistance when you get stuck 👍 |
Thank you, @oallain! 🎉 |
Behat :
Before fix step
Then I should see product name "Iron shield"
throw error in cause of error 500 in page.After fix, all steps are green ✔️