|
56 | 56 | </actionGroup>
|
57 | 57 | <!-- Validate Storefront -->
|
58 | 58 | <comment userInput="Validate Storefront" stepKey="commentValidateStorefront"/>
|
59 |
| - <grabMultiple selector="{{ProductsOnStage.product('1')}}" stepKey="grabStorefrontProducts"/> |
| 59 | + <grabMultiple selector="{{ProductsOnStorefront.product('1')}}" stepKey="grabStorefrontProducts"/> |
60 | 60 | <assertCount expected="0" expectedType="int" actualType="variable" actual="grabStorefrontProducts" stepKey="assertStorefrontCountIs0" />
|
61 | 61 | </test>
|
62 | 62 | <test name="AdminPageBuilderProductsCanSaveConditionTest">
|
|
1359 | 1359 | <expectedResult type="variable">productActionsWidthFrontend</expectedResult>
|
1360 | 1360 | </assertGreaterThan>
|
1361 | 1361 | </test>
|
| 1362 | + <test name="ProductFromDifferentWebsiteShowsOnStage"> |
| 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 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-6294"/> |
| 1371 | + <group value="pagebuilder"/> |
| 1372 | + <group value="pagebuilder-products"/> |
| 1373 | + <group value="pagebuilder-storeView"/> |
| 1374 | + </annotations> |
| 1375 | + <before> |
| 1376 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 1377 | + <createData entity="customWebsite" stepKey="createCustomWebsite"/> |
| 1378 | + <createData entity="SimpleSubCategory" stepKey="createCategory"/> |
| 1379 | + <actionGroup ref="AdminStoreGroupCreateActionGroup" stepKey="createNewStore"> |
| 1380 | + <argument name="Website" value="customWebsite"/> |
| 1381 | + <argument name="storeGroup" value="customStoreGroup"/> |
| 1382 | + </actionGroup> |
| 1383 | + <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createCustomStoreView"> |
| 1384 | + <argument name="StoreGroup" value="customStoreGroup"/> |
| 1385 | + <argument name="customStore" value="customStore"/> |
| 1386 | + </actionGroup> |
| 1387 | + </before> |
| 1388 | + <after> |
| 1389 | + <actionGroup ref="DeleteCustomWebsiteActionGroup" stepKey="deleteWebsite"> |
| 1390 | + <argument name="websiteName" value="$createCustomWebsite.website[name]$"/> |
| 1391 | + </actionGroup> |
| 1392 | + <actionGroup ref="DeleteCategory" stepKey="deleteCategory"> |
| 1393 | + <argument name="categoryEntity" value="SimpleSubCategory"/> |
| 1394 | + </actionGroup> |
| 1395 | + <actionGroup ref="deleteProductBySku" stepKey="deleteProduct"> |
| 1396 | + <argument name="sku" value="{{SimpleProduct.sku}}"/> |
| 1397 | + </actionGroup> |
| 1398 | + <actionGroup ref="logout" stepKey="logoutOfAdmin"/> |
| 1399 | + </after> |
| 1400 | + <!-- Create product and assign to store view --> |
| 1401 | + <comment userInput="Create product and assign to store view" stepKey="createProductAndAssignToStoreView"/> |
| 1402 | + <actionGroup ref="FillAdminSimpleProductForm" stepKey="createProduct"> |
| 1403 | + <argument name="category" value="SimpleSubCategory"/> |
| 1404 | + <argument name="simpleProduct" value="SimpleProduct"/> |
| 1405 | + </actionGroup> |
| 1406 | + <actionGroup ref="SelectProductInWebsitesActionGroup" stepKey="setWebsite2"> |
| 1407 | + <argument name="website" value="$createCustomWebsite.website[name]$"/> |
| 1408 | + </actionGroup> |
| 1409 | + <uncheckOption selector="{{ProductInWebsitesSection.website('Main Website')}}" stepKey="uncheckMainWebsite"/> |
| 1410 | + <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveProduct"/> |
| 1411 | + <waitForPageLoad stepKey="waitForProductToSave"/> |
| 1412 | + <see userInput="You saved the product." stepKey="seeSuccessfulProductSaveMessage"/> |
| 1413 | + <!-- Create CMS Page with product --> |
| 1414 | + <comment userInput="Create CMS Page with product" stepKey="createCMSPageWithProduct"/> |
| 1415 | + <actionGroup ref="navigateToAPageWithPageBuilder" stepKey="navigateToAPageWithPageBuilder"/> |
| 1416 | + <actionGroup ref="addPageBuilderPageTitle" stepKey="enterPageTitle"> |
| 1417 | + <argument name="contentType" value="PageBuilderProductsContentType"/> |
| 1418 | + </actionGroup> |
| 1419 | + <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/> |
| 1420 | + <actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroup"> |
| 1421 | + <argument name="group" value="PageBuilderProductsContentType"/> |
| 1422 | + </actionGroup> |
| 1423 | + <actionGroup ref="dragContentTypeToStage" stepKey="dragContentTypeToStage"> |
| 1424 | + <argument name="contentType" value="PageBuilderProductsContentType"/> |
| 1425 | + </actionGroup> |
| 1426 | + <actionGroup ref="openPageBuilderEditPanel" stepKey="openEditAfterDrop"> |
| 1427 | + <argument name="contentType" value="PageBuilderProductsContentType"/> |
| 1428 | + </actionGroup> |
| 1429 | + <actionGroup ref="addCategoryConditionToProductsBlock" stepKey="addCategory"> |
| 1430 | + <argument name="page" value="ProductsContentTypeForm"/> |
| 1431 | + <argument name="category" value="$$createCategory.id$$"/> |
| 1432 | + </actionGroup> |
| 1433 | + <actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/> |
| 1434 | + <!-- Validate Stage --> |
| 1435 | + <comment userInput="Validate Stage" stepKey="commentValidateStage"/> |
| 1436 | + <actionGroup ref="validateProductCountInProducts" stepKey="validateProductsCountStage1"> |
| 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 | + <actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage2"/> |
| 1445 | + <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage2"/> |
| 1446 | + <!-- Validate Stage After Save --> |
| 1447 | + <comment userInput="Validate Stage After Save" stepKey="commentValidateStageAfterSave"/> |
| 1448 | + <actionGroup ref="validateProductCountInProducts" stepKey="validateProductsCountStage2"> |
| 1449 | + <argument name="page" value="ProductsOnStage"/> |
| 1450 | + <argument name="count" value="1"/> |
| 1451 | + </actionGroup> |
| 1452 | + <actionGroup ref="validateProductInProductsOnStage" stepKey="validateProductsStage2"> |
| 1453 | + <argument name="page" value="ProductsOnStage"/> |
| 1454 | + <argument name="product" value="SimpleProduct"/> |
| 1455 | + </actionGroup> |
| 1456 | + <!-- Validate Storefront with incorrect store view --> |
| 1457 | + <comment userInput="Validate Storefront with incorrect Store View does not show product" stepKey="commentValidateStorefrontWithIncorrectStoreView"/> |
| 1458 | + <actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront"> |
| 1459 | + <argument name="contentType" value="PageBuilderProductsContentType"/> |
| 1460 | + </actionGroup> |
| 1461 | + <grabMultiple selector="{{ProductsOnStorefront.product('1')}}" stepKey="grabStorefrontProducts"/> |
| 1462 | + <assertCount stepKey="assertStorefrontCountIs0"> |
| 1463 | + <expectedResult type="int">0</expectedResult> |
| 1464 | + <actualResult type="variable">$grabStorefrontProducts</actualResult> |
| 1465 | + </assertCount> |
| 1466 | + <!-- Validate Storefront with correct store view --> |
| 1467 | + <comment userInput="Validate Storefront with correct Store View shows product" stepKey="commentValidateStorefrontWithCorrectStoreView"/> |
| 1468 | + <actionGroup ref="navigateToStoreFrontWithStoreView" stepKey="navigateToStoreFrontWithStoreView"> |
| 1469 | + <argument name="contentType" value="PageBuilderProductsContentType"/> |
| 1470 | + <argument name="storeView" value="customStore"/> |
| 1471 | + </actionGroup> |
| 1472 | + <grabMultiple selector="{{ProductsOnStorefront.product('1')}}" stepKey="grabStorefrontProducts2"/> |
| 1473 | + <assertCount stepKey="assertStorefrontCountIs1"> |
| 1474 | + <expectedResult type="int">1</expectedResult> |
| 1475 | + <actualResult type="variable">$grabStorefrontProducts2</actualResult> |
| 1476 | + </assertCount> |
| 1477 | + </test> |
1362 | 1478 | </tests>
|
0 commit comments