Skip to content

Commit e6e2bc9

Browse files
committed
MC-5373: Product couldn't be pulled to CMS Page when it was assigned to a specific website
Address feedback for ProductFromDifferentWebsiteInsideBlockShowsOnStage
1 parent beea7ec commit e6e2bc9

File tree

1 file changed

+14
-26
lines changed

1 file changed

+14
-26
lines changed

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderBlockTest.xml

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1848,8 +1848,8 @@
18481848
<test name="ProductFromDifferentWebsiteInsideBlockShowsOnStage">
18491849
<annotations>
18501850
<features value="PageBuilder"/>
1851-
<stories value="Products"/>
1852-
<title value="Product from Different Website Shows on Stage"/>
1851+
<stories value="Block"/>
1852+
<title value="Product from Different Website Inside Block Shows on Stage"/>
18531853
<description value="As a product manager I want to be able to see products from all store views rendered inside blocks on stage in admin so that I don't get worried that conditions are being applied incorrectly"/>
18541854
<severity value="CRITICAL"/>
18551855
<useCaseId value="MC-5373"/>
@@ -1872,33 +1872,29 @@
18721872
<argument name="StoreGroup" value="customStoreGroup"/>
18731873
<argument name="customStore" value="customStore"/>
18741874
</actionGroup>
1875+
<createData entity="SimpleProduct" stepKey="createProduct">
1876+
<requiredEntity createDataKey="createCategory"/>
1877+
</createData>
18751878
</before>
18761879
<after>
18771880
<actionGroup ref="DeleteCustomWebsiteActionGroup" stepKey="deleteWebsite">
18781881
<argument name="websiteName" value="$createCustomWebsite.website[name]$"/>
18791882
</actionGroup>
18801883
<deleteData createDataKey="createPreReqBlock" stepKey="deletePreReqBlock" />
1881-
<actionGroup ref="DeleteCategory" stepKey="deleteCategory">
1882-
<argument name="categoryEntity" value="SimpleSubCategory"/>
1883-
</actionGroup>
1884-
<actionGroup ref="deleteProductBySku" stepKey="deleteProduct">
1885-
<argument name="sku" value="{{SimpleProduct.sku}}"/>
1886-
</actionGroup>
1884+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
1885+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
18871886
<actionGroup ref="logout" stepKey="logoutOfAdmin"/>
18881887
</after>
1889-
<!-- Create product and assign to store view -->
1890-
<comment userInput="Create product and assign to store view" stepKey="commentCreateProductAndAssignToStoreView"/>
1891-
<actionGroup ref="FillAdminSimpleProductForm" stepKey="createProduct">
1892-
<argument name="category" value="SimpleSubCategory"/>
1893-
<argument name="simpleProduct" value="SimpleProduct"/>
1888+
<!-- Create product and assign to created store view -->
1889+
<comment userInput="Assign product to created store view" stepKey="commentAssignProductToCreatedStoreView"/>
1890+
<actionGroup ref="navigateToCreatedProductEditPage" stepKey="navigateToCreatedProductEditPage">
1891+
<argument name="product" value="$$createProduct$$"/>
18941892
</actionGroup>
18951893
<actionGroup ref="SelectProductInWebsitesActionGroup" stepKey="setWebsite2">
18961894
<argument name="website" value="$createCustomWebsite.website[name]$"/>
18971895
</actionGroup>
18981896
<uncheckOption selector="{{ProductInWebsitesSection.website('Main Website')}}" stepKey="uncheckMainWebsite"/>
1899-
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveProduct"/>
1900-
<waitForPageLoad stepKey="waitForProductToSave"/>
1901-
<see userInput="You saved the product." stepKey="seeSuccessfulProductSaveMessage"/>
1897+
<actionGroup ref="saveProductForm" stepKey="saveProductForm2" />
19021898
<!-- Create block with product inside -->
19031899
<comment userInput="Create block with product inside" stepKey="commentCreateBlockWithProductInside"/>
19041900
<actionGroup ref="navigateToCreatedCMSBlockPage" stepKey="navigateToCreatedCMSBlockPage">
@@ -1976,21 +1972,13 @@
19761972
<actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront">
19771973
<argument name="contentType" value="PageBuilderProductsContentType"/>
19781974
</actionGroup>
1979-
<grabMultiple selector="{{ProductsOnStorefront.product('1')}}" stepKey="grabStorefrontProducts"/>
1980-
<assertCount stepKey="assertStorefrontCountIs0">
1981-
<expectedResult type="int">0</expectedResult>
1982-
<actualResult type="variable">$grabStorefrontProducts</actualResult>
1983-
</assertCount>
1975+
<seeNumberOfElements selector="{{ProductsOnStorefront.product('1')}}" userInput="0" stepKey="seeZeroProducts" />
19841976
<!-- Validate Storefront with correct store view -->
19851977
<comment userInput="Validate Storefront with correct Store View shows product" stepKey="commentValidateStorefrontWithCorrectStoreView"/>
19861978
<actionGroup ref="navigateToStoreFrontWithStoreView" stepKey="navigateToStoreFrontWithStoreView">
19871979
<argument name="contentType" value="PageBuilderProductsContentType"/>
19881980
<argument name="storeView" value="customStore"/>
19891981
</actionGroup>
1990-
<grabMultiple selector="{{ProductsOnStorefront.product('1')}}" stepKey="grabStorefrontProducts2"/>
1991-
<assertCount stepKey="assertStorefrontCountIs1">
1992-
<expectedResult type="int">1</expectedResult>
1993-
<actualResult type="variable">$grabStorefrontProducts2</actualResult>
1994-
</assertCount>
1982+
<seeNumberOfElements selector="{{ProductsOnStorefront.product('1')}}" userInput="1" stepKey="seeOneProduct" />
19951983
</test>
19961984
</tests>

0 commit comments

Comments
 (0)