|
1359 | 1359 | <expectedResult type="variable">productActionsWidthFrontend</expectedResult>
|
1360 | 1360 | </assertGreaterThan>
|
1361 | 1361 | </test>
|
| 1362 | + <test name="ProductFromDifferentWebsiteInsideBlockShowsOnStage"> |
| 1363 | + <annotations> |
| 1364 | + <features value="PageBuilder"/> |
| 1365 | + <stories value="Products"/> |
| 1366 | + <title value="Product from Different Website Shows on Stage"/> |
| 1367 | + <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"/> |
| 1368 | + <severity value="CRITICAL"/> |
| 1369 | + <useCaseId value="MC-5373"/> |
| 1370 | + <testCaseId value="MC-11890"/> |
| 1371 | + <group value="pagebuilder"/> |
| 1372 | + <group value="pagebuilder-products"/> |
| 1373 | + <group value="pagebuilder-block"/> |
| 1374 | + <group value="pagebuilder-storeView"/> |
| 1375 | + </annotations> |
| 1376 | + <before> |
| 1377 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 1378 | + <createData entity="customWebsite" stepKey="createCustomWebsite"/> |
| 1379 | + <createData entity="_defaultBlock" stepKey="createPreReqBlock" /> |
| 1380 | + <createData entity="SimpleSubCategory" stepKey="createCategory"/> |
| 1381 | + <actionGroup ref="AdminStoreGroupCreateActionGroup" stepKey="createNewStore"> |
| 1382 | + <argument name="Website" value="customWebsite"/> |
| 1383 | + <argument name="storeGroup" value="customStoreGroup"/> |
| 1384 | + </actionGroup> |
| 1385 | + <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createCustomStoreView"> |
| 1386 | + <argument name="StoreGroup" value="customStoreGroup"/> |
| 1387 | + <argument name="customStore" value="customStore"/> |
| 1388 | + </actionGroup> |
| 1389 | + </before> |
| 1390 | + <after> |
| 1391 | + <actionGroup ref="DeleteCustomWebsiteActionGroup" stepKey="deleteWebsite"> |
| 1392 | + <argument name="websiteName" value="$createCustomWebsite.website[name]$"/> |
| 1393 | + </actionGroup> |
| 1394 | + <deleteData createDataKey="createPreReqBlock" stepKey="deletePreReqBlock" /> |
| 1395 | + <actionGroup ref="DeleteCategory" stepKey="deleteCategory"> |
| 1396 | + <argument name="categoryEntity" value="SimpleSubCategory"/> |
| 1397 | + </actionGroup> |
| 1398 | + <actionGroup ref="deleteProductBySku" stepKey="deleteProduct"> |
| 1399 | + <argument name="sku" value="{{SimpleProduct.sku}}"/> |
| 1400 | + </actionGroup> |
| 1401 | + <actionGroup ref="logout" stepKey="logoutOfAdmin"/> |
| 1402 | + </after> |
| 1403 | + <!-- Create product and assign to store view --> |
| 1404 | + <comment userInput="Create product and assign to store view" stepKey="commentCreateProductAndAssignToStoreView"/> |
| 1405 | + <actionGroup ref="FillAdminSimpleProductForm" stepKey="createProduct"> |
| 1406 | + <argument name="category" value="SimpleSubCategory"/> |
| 1407 | + <argument name="simpleProduct" value="SimpleProduct"/> |
| 1408 | + </actionGroup> |
| 1409 | + <actionGroup ref="SelectProductInWebsitesActionGroup" stepKey="setWebsite2"> |
| 1410 | + <argument name="website" value="$createCustomWebsite.website[name]$"/> |
| 1411 | + </actionGroup> |
| 1412 | + <uncheckOption selector="{{ProductInWebsitesSection.website('Main Website')}}" stepKey="uncheckMainWebsite"/> |
| 1413 | + <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveProduct"/> |
| 1414 | + <waitForPageLoad stepKey="waitForProductToSave"/> |
| 1415 | + <see userInput="You saved the product." stepKey="seeSuccessfulProductSaveMessage"/> |
| 1416 | + <!-- Create block with product inside --> |
| 1417 | + <comment userInput="Create block with product inside" stepKey="commentCreateBlockWithProductInside"/> |
| 1418 | + <actionGroup ref="navigateToCreatedCMSBlockPage" stepKey="navigateToCreatedCMSBlockPage"> |
| 1419 | + <argument name="CMSBlockPage" value="$$createPreReqBlock$$"/> |
| 1420 | + </actionGroup> |
| 1421 | + <selectOption selector="{{BlockNewPageBasicFieldsSection.storeView}}" userInput="All Store Views" stepKey="assignAllStoreViewsToBlock" /> |
| 1422 | + <actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroup"> |
| 1423 | + <argument name="group" value="PageBuilderProductsContentType"/> |
| 1424 | + </actionGroup> |
| 1425 | + <actionGroup ref="dragContentTypeToStage" stepKey="dragContentTypeToStage"> |
| 1426 | + <argument name="contentType" value="PageBuilderProductsContentType"/> |
| 1427 | + </actionGroup> |
| 1428 | + <actionGroup ref="openPageBuilderEditPanel" stepKey="openEditAfterDrop"> |
| 1429 | + <argument name="contentType" value="PageBuilderProductsContentType"/> |
| 1430 | + </actionGroup> |
| 1431 | + <actionGroup ref="addCategoryConditionToProductsBlock" stepKey="addCategory"> |
| 1432 | + <argument name="page" value="ProductsContentTypeForm"/> |
| 1433 | + <argument name="category" value="$$createCategory.id$$"/> |
| 1434 | + </actionGroup> |
| 1435 | + <actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/> |
| 1436 | + <actionGroup ref="validateProductCountInProducts" stepKey="validateProductsCountStage"> |
| 1437 | + <argument name="page" value="ProductsOnStage"/> |
| 1438 | + <argument name="count" value="1"/> |
| 1439 | + </actionGroup> |
| 1440 | + <actionGroup ref="validateProductInProductsOnStage" stepKey="validateProductsStage"> |
| 1441 | + <argument name="page" value="ProductsOnStage"/> |
| 1442 | + <argument name="product" value="SimpleProduct"/> |
| 1443 | + </actionGroup> |
| 1444 | + <click selector="{{BlockNewPagePageActionsSection.expandSplitButton}}" stepKey="expandSplitButton"/> |
| 1445 | + <click selector="{{BlockNewPagePageActionsSection.saveAndClose}}" stepKey="clickSaveBlock"/> |
| 1446 | + <!-- Add block with product inside to CMS Page --> |
| 1447 | + <comment userInput="Add block with product inside to CMS Page" stepKey="commentAddBlockWithProductInsideToCmsPage"/> |
| 1448 | + <actionGroup ref="navigateToAPageWithPageBuilder" stepKey="navigateToAPageWithPageBuilder"/> |
| 1449 | + <actionGroup ref="addPageBuilderPageTitle" stepKey="enterPageTitle"> |
| 1450 | + <argument name="contentType" value="PageBuilderProductsContentType"/> |
| 1451 | + </actionGroup> |
| 1452 | + <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage" /> |
| 1453 | + <actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroup2"> |
| 1454 | + <argument name="group" value="PageBuilderBlockContentType"/> |
| 1455 | + </actionGroup> |
| 1456 | + <actionGroup ref="dragContentTypeToStage" stepKey="dragBlockContentTypeToStage"> |
| 1457 | + <argument name="contentType" value="PageBuilderBlockContentType"/> |
| 1458 | + </actionGroup> |
| 1459 | + <actionGroup ref="openPageBuilderEditPanel" stepKey="openEditAfterDrop2"> |
| 1460 | + <argument name="contentType" value="PageBuilderBlockContentType"/> |
| 1461 | + </actionGroup> |
| 1462 | + <actionGroup ref="searchBlockInGrid" stepKey="searchBlockInGrid"> |
| 1463 | + <argument name="block" value="$$createPreReqBlock$$"/> |
| 1464 | + </actionGroup> |
| 1465 | + <actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings2"/> |
| 1466 | + <!-- Validate Stage --> |
| 1467 | + <comment userInput="Validate Stage" stepKey="commentValidateStage"/> |
| 1468 | + <actionGroup ref="validateProductCountInProducts" stepKey="validateProductsCountStage2"> |
| 1469 | + <argument name="page" value="ProductsOnStorefront"/> |
| 1470 | + <argument name="count" value="1"/> |
| 1471 | + </actionGroup> |
| 1472 | + <actionGroup ref="validateProductInProductsOnStage" stepKey="validateProductsStage2"> |
| 1473 | + <argument name="page" value="ProductsOnStorefront"/> |
| 1474 | + <argument name="product" value="SimpleProduct"/> |
| 1475 | + </actionGroup> |
| 1476 | + <actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage2"/> |
| 1477 | + <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage2"/> |
| 1478 | + <!-- Validate Stage After Save --> |
| 1479 | + <comment userInput="Validate Stage After Save" stepKey="commentValidateStageAfterSave"/> |
| 1480 | + <actionGroup ref="validateProductCountInProducts" stepKey="validateProductsCountStage3"> |
| 1481 | + <argument name="page" value="ProductsOnStorefront"/> |
| 1482 | + <argument name="count" value="1"/> |
| 1483 | + </actionGroup> |
| 1484 | + <actionGroup ref="validateProductInProductsOnStage" stepKey="validateProductsStage3"> |
| 1485 | + <argument name="page" value="ProductsOnStorefront"/> |
| 1486 | + <argument name="product" value="SimpleProduct"/> |
| 1487 | + </actionGroup> |
| 1488 | + <!-- Validate Storefront with incorrect store view --> |
| 1489 | + <comment userInput="Validate Storefront with incorrect Store View does not show product" stepKey="commentValidateStorefrontWithIncorrectStoreView"/> |
| 1490 | + <actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront"> |
| 1491 | + <argument name="contentType" value="PageBuilderProductsContentType"/> |
| 1492 | + </actionGroup> |
| 1493 | + <grabMultiple selector="{{ProductsOnStorefront.product('1')}}" stepKey="grabStorefrontProducts"/> |
| 1494 | + <assertCount stepKey="assertStorefrontCountIs0"> |
| 1495 | + <expectedResult type="int">0</expectedResult> |
| 1496 | + <actualResult type="variable">$grabStorefrontProducts</actualResult> |
| 1497 | + </assertCount> |
| 1498 | + <!-- Validate Storefront with correct store view --> |
| 1499 | + <comment userInput="Validate Storefront with correct Store View shows product" stepKey="commentValidateStorefrontWithCorrectStoreView"/> |
| 1500 | + <actionGroup ref="navigateToStoreFrontWithStoreView" stepKey="navigateToStoreFrontWithStoreView"> |
| 1501 | + <argument name="contentType" value="PageBuilderProductsContentType"/> |
| 1502 | + <argument name="storeView" value="customStore"/> |
| 1503 | + </actionGroup> |
| 1504 | + <grabMultiple selector="{{ProductsOnStorefront.product('1')}}" stepKey="grabStorefrontProducts2"/> |
| 1505 | + <assertCount stepKey="assertStorefrontCountIs1"> |
| 1506 | + <expectedResult type="int">1</expectedResult> |
| 1507 | + <actualResult type="variable">$grabStorefrontProducts2</actualResult> |
| 1508 | + </assertCount> |
| 1509 | + </test> |
1362 | 1510 | <test name="ProductFromDifferentWebsiteShowsOnStage">
|
1363 | 1511 | <annotations>
|
1364 | 1512 | <features value="PageBuilder"/>
|
|
0 commit comments