Skip to content

Commit 760e889

Browse files
dthampycpartica
authored andcommitted
MAGETWO-92247: Verify that product price is displayed on additional storefront if product is disabled for default store view
1 parent f8b1e47 commit 760e889

14 files changed

+374
-2
lines changed

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductFormSection.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
<section name="AdminProductFormSection">
1111
<element name="productName" type="input" selector=".admin__field[data-index=name] input"/>
1212
<element name="productSku" type="input" selector=".admin__field[data-index=sku] input"/>
13+
<element name="enableProduct" type="checkbox" selector="input[name='product[status]']"/>
14+
<element name="enableProductLabel" type="checkbox" selector="input[name='product[status]']+label"/>
15+
<element name="productStatusUseDefault" type="checkbox" selector="input[name='use_default[status]']"/>
1316
<element name="productPrice" type="input" selector=".admin__field[data-index=price] input"/>
1417
<element name="advancedPricingLink" type="button" selector="button[data-index='advanced_pricing_button']"/>
1518
<element name="categoriesDropdown" type="multiselect" selector="div[data-index='category_ids']"/>
@@ -31,6 +34,11 @@
3134
<element name="visibility" type="select" selector="//select[@name='product[visibility]']"/>
3235
<element name="visibilityUseDefault" type="checkbox" selector="//input[@name='use_default[visibility]']"/>
3336
</section>
37+
<section name="ProductInWebsitesSection">
38+
<element name="sectionHeader" type="button" selector="div[data-index='websites']" timeout="30"/>
39+
<!--<element name="websites" type="checkbox" selector="input[name='product[website_ids][{{var1}}]']" parameterized="true"/>-->
40+
<element name="website" type="checkbox" selector="//label[contains(text(), '{{var1}}')]/parent::div//input[@type='checkbox']" parameterized="true"/>
41+
</section>
3442
<section name="ProductDesignSection">
3543
<element name="DesignTab" type="button" selector="//strong[@class='admin__collapsible-title']//span[text()='Design']"/>
3644
<element name="LayoutDropdown" type="select" selector="select[name='product[page_layout]']"/>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="EnableWebUrlOptions">
12+
<amOnPage url="{{WebConfigurationPage.url}}" stepKey="navigateToWebConfigurationPage"/>
13+
<waitForPageLoad stepKey="waitForPageLoad"/>
14+
<conditionalClick selector="{{WebSection.UrlOptionsTab}}" dependentSelector="{{WebSection.CheckIfUrlOptionsTabExpand}}" visible="true" stepKey="expandUrlSectionTab"/>
15+
<waitForElementVisible selector="{{UrlOptionsSection.addStoreCodeToUrl}}" stepKey="seeAddStoreCodeToUrl"/>
16+
<uncheckOption selector="{{UrlOptionsSection.systemValueForStoreCode}}" stepKey="uncheckUseSystemValue"/>
17+
<selectOption selector="{{UrlOptionsSection.addStoreCodeToUrl}}" userInput="Yes" stepKey="enableStoreCode"/>
18+
<click selector="{{WebSection.UrlOptionsTab}}" stepKey="collapseUrlOptions"/>
19+
<click selector="{{ContentManagementSection.Save}}" stepKey="saveConfig" />
20+
</actionGroup>
21+
<actionGroup name="ResetWebUrlOptions">
22+
<amOnPage url="{{WebConfigurationPage.url}}" stepKey="navigateToWebConfigurationPagetoReset"/>
23+
<waitForPageLoad stepKey="waitForPageLoad2"/>
24+
<conditionalClick selector="{{WebSection.UrlOptionsTab}}" dependentSelector="{{WebSection.CheckIfUrlOptionsTabExpand}}" visible="true" stepKey="closeUrlSectionTab"/>
25+
<waitForElementVisible selector="{{UrlOptionsSection.addStoreCodeToUrl}}" stepKey="seeAddStoreCodeToUrl2"/>
26+
<!--<uncheckOption selector="{{UrlOptionsSection.systemValueForStoreCode}}" stepKey="uncheckUseSystemValue"/>-->
27+
<selectOption selector="{{UrlOptionsSection.addStoreCodeToUrl}}" userInput="No" stepKey="enableStoreCode"/>
28+
<checkOption selector="{{UrlOptionsSection.systemValueForStoreCode}}" stepKey="checkUseSystemValue"/>
29+
<click selector="{{WebSection.UrlOptionsTab}}" stepKey="collapseUrlOptions"/>
30+
<click selector="{{ContentManagementSection.Save}}" stepKey="saveConfig"/>
31+
</actionGroup>
32+
</actionGroups>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/Section/GeneralSection.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,16 @@
2020
<section name="WebSection">
2121
<element name="DefaultLayoutsTab" type="button" selector="#web_default_layouts-head"/>
2222
<element name="CheckIfTabExpand" type="button" selector="#web_default_layouts-head:not(.open)"/>
23+
<element name="UrlOptionsTab" type="button" selector="#web_url-head"/>
24+
<element name="CheckIfUrlOptionsTabExpand" type="button" selector="#web_url-head:not(.open)"/>
2325
</section>
2426
<section name="DefaultLayoutsSection">
2527
<element name="productLayout" type="select" selector="#web_default_layouts_default_product_layout"/>
2628
<element name="categoryLayout" type="select" selector="#web_default_layouts_default_category_layout"/>
2729
<element name="pageLayout" type="select" selector="#web_default_layouts_default_cms_layout"/>
2830
</section>
31+
<section name="UrlOptionsSection">
32+
<element name="addStoreCodeToUrl" type="select" selector="#web_url_use_store"/>
33+
<element name="systemValueForStoreCode" type="checkbox" selector="#web_url_use_store_inherit"/>
34+
</section>
2935
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Data/ProductConfigurableAttributeData.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,17 @@
2929
<data key="name" unique="suffix">Orange</data>
3030
<data key="price">99.99</data>
3131
</entity>
32+
<entity name="colorDefaultProductAttribute" type="product_attribute">
33+
<data key="default_label">Color</data>
34+
<data key="input_type">Dropdown</data>
35+
<data key="attribute_quantity">2</data>
36+
</entity>
37+
<entity name="colorDefaultProductAttribute1" type="product_attribute">
38+
<data key="name">Green</data>
39+
<data key="price">4.00</data>
40+
</entity>
41+
<entity name="colorDefaultProductAttribute2" type="product_attribute">
42+
<data key="name">Black</data>
43+
<data key="price">5.00</data>
44+
</entity>
3245
</entities>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Section/AdminCreateProductConfigurationsPanelSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
<element name="attributeCheckboxByIndex" type="input" selector="li.attribute-option:nth-of-type({{var1}}) input" parameterized="true"/>
2525

2626
<element name="applyUniquePricesByAttributeToEachSku" type="radio" selector=".admin__field-label[for='apply-unique-prices-radio']"/>
27+
<element name="applySinglePriceToAllSkus" type="radio" selector=".admin__field-label[for='apply-single-price-radio']"/>
28+
<element name="singlePrice" type="input" selector="#apply-single-price-input"/>
2729
<element name="selectAttribute" type="select" selector="#select-each-price" timeout="30"/>
2830
<element name="attribute1" type="input" selector="#apply-single-price-input-0"/>
2931
<element name="attribute2" type="input" selector="#apply-single-price-input-1"/>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Section/AdminProductFormConfigurationsSection.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,16 @@
1616
<element name="currentVariationsPriceCells" type="textarea" selector=".admin__control-fields[data-index='price_container']"/>
1717
<element name="currentVariationsQuantityCells" type="textarea" selector=".admin__control-fields[data-index='quantity_container']"/>
1818
<element name="currentVariationsAttributesCells" type="textarea" selector=".admin__control-fields[data-index='attributes']"/>
19+
<element name="currentVariationsStatusCells" type="textarea" selector="._no-header[data-index='status']"/>
1920
<element name="actionsBtn" type="button" selector="(//button[@class='action-select']/span[contains(text(), 'Select')])[{{var1}}]" parameterized="true"/>
2021
<element name="removeProductBtn" type="button" selector="//a[text()='Remove Product']"/>
2122
<element name="disableProductBtn" type="button" selector="//a[text()='Disable Product']"/>
23+
<element name="enableProductBtn" type="button" selector="//a[text()='Enable Product']"/>
2224
</section>
2325
<section name="AdminConfigurableProductFormSection">
2426
<element name="productWeight" type="input" selector=".admin__control-text[name='product[weight]']"/>
2527
<element name="productQuantity" type="input" selector=".admin__control-text[name='product[quantity_and_stock_status][qty]']"/>
26-
<element name="currentVariationsQuantityCells" type="button" selector="td[data-index='quantity_per_source_container']"/>
28+
<element name="currentVariationsQuantityCells" type="button" selector="td[data-index='quantity_container']"/>
2729
<element name="rowByCode" type="textarea" selector="//span[contains(text(), '{{var1}}-{{var2}}')]//ancestor-or-self::tr" parameterized="true"/>
2830
</section>
2931
<section name="AdminConfigurableProductSelectAttributesSlideOut">

0 commit comments

Comments
 (0)