-
Notifications
You must be signed in to change notification settings - Fork 9.4k
#26583 Tier pricing save percent showing logic updated in product detail page #26584
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
Merged
magento-engcom-team
merged 8 commits into
magento:2.4-develop
from
srsathish92:bug/26583-pdp-tier-price-save-percent
Feb 21, 2020
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
9c11369
#26583 tier pricing save percent showing logic updated
srsathish92 00317ef
Static tests fix
srsathish92 ecc4ef5
add mftf test
engcom-Charlie 24b3fba
fix mftf
engcom-Charlie 62f8c6c
added cron running
engcom-Charlie 0110496
Merge branch '2.4-develop' into bug/26583-pdp-tier-price-save-percent
engcom-Charlie 4680f70
fix mftf
engcom-Charlie 0216e5e
fix integration test
engcom-Charlie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
.../Catalog/Test/Mftf/ActionGroup/AssertStorefrontProductDetailPageFinalPriceActionGroup.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AssertStorefrontProductDetailPageFinalPriceActionGroup"> | ||
<arguments> | ||
<argument name="finalProductPrice" type="string"/> | ||
</arguments> | ||
<grabTextFrom selector="{{StorefrontProductInfoMainSection.price}}" stepKey="productPriceText"/> | ||
<assertEquals stepKey="assertProductPriceOnProductPage"> | ||
<expectedResult type="string">${{finalProductPrice}}</expectedResult> | ||
<actualResult type="variable">productPriceText</actualResult> | ||
</assertEquals> | ||
</actionGroup> | ||
</actionGroups> |
20 changes: 20 additions & 0 deletions
20
...agento/Catalog/Test/Mftf/ActionGroup/AssertStorefrontProductDetailPageNameActionGroup.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AssertStorefrontProductDetailPageNameActionGroup"> | ||
<arguments> | ||
<argument name="productName" type="string"/> | ||
</arguments> | ||
<grabTextFrom selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="productNameText"/> | ||
<assertEquals stepKey="assertProductNameOnProductPage"> | ||
<expectedResult type="string">{{productName}}</expectedResult> | ||
<actualResult type="variable">productNameText</actualResult> | ||
</assertEquals> | ||
</actionGroup> | ||
</actionGroups> |
22 changes: 22 additions & 0 deletions
22
...o/Catalog/Test/Mftf/ActionGroup/AssertStorefrontProductDetailPageTierPriceActionGroup.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AssertStorefrontProductDetailPageTierPriceActionGroup"> | ||
<arguments> | ||
<argument name="tierProductPriceDiscountQuantity" type="string"/> | ||
<argument name="productPriceWithAppliedTierPriceDiscount" type="string"/> | ||
<argument name="productSavedPricePercent" type="string"/> | ||
</arguments> | ||
<grabTextFrom selector="{{StorefrontProductInfoMainSection.tierPriceText}}" stepKey="tierPriceText"/> | ||
<assertEquals stepKey="assertTierPriceTextOnProductPage"> | ||
<expectedResult type="string">Buy {{tierProductPriceDiscountQuantity}} for ${{productPriceWithAppliedTierPriceDiscount}} each and save {{productSavedPricePercent}}%</expectedResult> | ||
<actualResult type="variable">tierPriceText</actualResult> | ||
</assertEquals> | ||
</actionGroup> | ||
</actionGroups> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
...nto/Catalog/Test/Mftf/Test/StoreFrontSimpleProductWithSpecialAndTierDiscountPriceTest.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="StoreFrontSimpleProductWithSpecialAndTierDiscountPriceTest"> | ||
<annotations> | ||
<features value="Catalog"/> | ||
<title value="Apply discount tier price and custom price values for simple product"/> | ||
<description value="Apply discount tier price and custom price values for simple product"/> | ||
<severity value="MAJOR"/> | ||
<group value="Catalog"/> | ||
</annotations> | ||
<before> | ||
<createData entity="_defaultCategory" stepKey="createCategory"/> | ||
|
||
<createData entity="ApiSimpleProduct" stepKey="createProduct"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
<field key="price">100.00</field> | ||
</createData> | ||
|
||
<createData entity="tierProductPriceDiscount" stepKey="addTierPrice"> | ||
<requiredEntity createDataKey="createProduct"/> | ||
</createData> | ||
</before> | ||
<after> | ||
<deleteData createDataKey="createProduct" stepKey="deleteSimpleProduct"/> | ||
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/> | ||
</after> | ||
|
||
<actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> | ||
|
||
<actionGroup ref="GoToProductPageViaIDActionGroup" stepKey="openAdminProductEditPage"> | ||
<argument name="productId" value="$createProduct.id$"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="AddSpecialPriceToProductActionGroup" stepKey="addSpecialPriceToProduct"> | ||
<argument name="price" value="65.00"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductForm"/> | ||
|
||
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage"> | ||
<argument name="productUrl" value="$createProduct.custom_attributes[url_key]$"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="AssertStorefrontProductDetailPageNameActionGroup" stepKey="assertProductNameText"> | ||
<argument name="productName" value="$createProduct.name$"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="AssertStorefrontProductDetailPageTierPriceActionGroup" stepKey="assertProductTierPriceText"> | ||
<argument name="tierProductPriceDiscountQuantity" value="{{tierProductPriceDiscount.quantity}}"/> | ||
<argument name="productPriceWithAppliedTierPriceDiscount" value="64.00"/> | ||
<argument name="productSavedPricePercent" value="2"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="AssertStorefrontProductDetailPageFinalPriceActionGroup" stepKey="assertProductFinalPriceText"> | ||
<argument name="finalProductPrice" value="65.00"/> | ||
</actionGroup> | ||
</test> | ||
</tests> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.