Skip to content
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

[CatalogPromotion][UI][Shop] Fixed label displaying after option change #13604

Merged
merged 2 commits into from
Feb 10, 2022
Merged

[CatalogPromotion][UI][Shop] Fixed label displaying after option change #13604

merged 2 commits into from
Feb 10, 2022

Conversation

Rafikooo
Copy link
Contributor

@Rafikooo Rafikooo commented Feb 6, 2022

Q A
Branch? 1.11
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
License MIT

Displaying a proper catalog promotion labels while switching product's variants

@Rafikooo Rafikooo requested a review from a team as a code owner February 6, 2022 00:29
@probot-autolabeler probot-autolabeler bot added the Shop ShopBundle related issues and PRs. label Feb 6, 2022
@@ -124,7 +123,7 @@ public function getCatalogPromotionName(): string

public function hasCatalogPromotionApplied(string $name): bool
{
$catalogPromotions = $this->getDocument()->findAll('css', '.promotion_label');
$catalogPromotions = $this->getDocument()->findAll('css', '.column .promotion_label');
Copy link
Contributor Author

@Rafikooo Rafikooo Feb 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added that cascade class, to distinguish the add to cart section with Lastest products, which was giving a false positive with a visible label
image

Comment on lines +34 to +36
Assert::eq(
count($productOptionValues),
1,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Assert::eq(
count($productOptionValues),
1,
Assert::count(
$productOptionValues,
1,

Assert::eq(
count($productOptionValues),
1,
sprintf('%d product option values has been found with name "%s" but should be only one.', count($productOptionValues), $code)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sprintf('%d product option values has been found with name "%s" but should be only one.', count($productOptionValues), $code)
sprintf('%d product option values have been found with name "%s" but should be only one.', count($productOptionValues), $code)

@@ -410,6 +410,14 @@ public function iShouldSeeProductNotDiscountedOnTheList(string $productName): vo
Assert::null($originalPrice);
}

/**
* @Then /^I should see this product is not discounted$/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @Then /^I should see this product is not discounted$/
* @Then I should see this product is not discounted

@GSadee GSadee merged commit 8a5db0f into Sylius:1.11 Feb 10, 2022
@GSadee
Copy link
Member

GSadee commented Feb 10, 2022

Thank you, Rafał! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Shop ShopBundle related issues and PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants