|
2470 | 2470 | </actionGroup>
|
2471 | 2471 | <actionGroup ref="clickProductAddToWishListInProductsOnStorefront" stepKey="clickProductAddToWishListInProductsOnStorefront"/>
|
2472 | 2472 | </test>
|
| 2473 | + <test name="BlockRenderMapThroughBlockContentType"> |
| 2474 | + <annotations> |
| 2475 | + <features value="PageBuilder"/> |
| 2476 | + <stories value="Block Content"/> |
| 2477 | + <title value="Render Map Through Block Content Type"/> |
| 2478 | + <description value="Verify that users are able to successfully render and use the Map content type through the Block content type."/> |
| 2479 | + <severity value="CRITICAL"/> |
| 2480 | + <testCaseId value="MC-15153"/> |
| 2481 | + <useCaseId value="MC-13769"/> |
| 2482 | + <group value="pagebuilder"/> |
| 2483 | + <group value="pagebuilder-block"/> |
| 2484 | + <group value="pagebuilder-block-content"/> |
| 2485 | + <group value="pagebuilder-map"/> |
| 2486 | + <group value="pagebuilder-mapMapSettings"/> |
| 2487 | + <group value="pagebuilder-requiresValidMapAPIKey"/> |
| 2488 | + </annotations> |
| 2489 | + <before> |
| 2490 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 2491 | + <createData entity="_emptyCmsPage" stepKey="createCMSPage"/> |
| 2492 | + <createData entity="_emptyCmsBlock" stepKey="createCMSBlock"/> |
| 2493 | + <actionGroup ref="navigateToCreatedCMSBlockPage" stepKey="navigateToCreatedCMSBlockPage1"> |
| 2494 | + <argument name="CMSBlockPage" value="$$createCMSBlock$$"/> |
| 2495 | + </actionGroup> |
| 2496 | + </before> |
| 2497 | + <after> |
| 2498 | + <deleteData createDataKey="createCMSBlock" stepKey="deleteCMSBlock"/> |
| 2499 | + <deleteData createDataKey="createCMSPage" stepKey="deleteCMSPage"/> |
| 2500 | + <actionGroup ref="logout" stepKey="logout"/> |
| 2501 | + </after> |
| 2502 | + <!-- Add Map --> |
| 2503 | + <comment userInput="Add Divider" stepKey="commentAddMap"/> |
| 2504 | + <actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandPageBuilderPanelMenuSectionMedia"> |
| 2505 | + <argument name="contentType" value="PageBuilderMapContentType"/> |
| 2506 | + </actionGroup> |
| 2507 | + <actionGroup ref="dragContentTypeToStage" stepKey="dragMapIntoStage"> |
| 2508 | + <argument name="contentType" value="PageBuilderMapContentType"/> |
| 2509 | + </actionGroup> |
| 2510 | + <!-- Edit Map --> |
| 2511 | + <comment userInput="Edit Map" stepKey="commentEditMap"/> |
| 2512 | + <actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuMap"> |
| 2513 | + <argument name="contentType" value="PageBuilderMapContentType"/> |
| 2514 | + </actionGroup> |
| 2515 | + <!-- Enter Height: 500 --> |
| 2516 | + <comment userInput="Enter Height: 500" stepKey="commentEnterHeight"/> |
| 2517 | + <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterHeight"> |
| 2518 | + <argument name="property" value="PageBuilderMapHeightProperty500px"/> |
| 2519 | + </actionGroup> |
| 2520 | + <!-- Add 1st Location --> |
| 2521 | + <comment userInput="Add 1st Location" stepKey="commentAddLocation1"/> |
| 2522 | + <actionGroup ref="clickAddLocationButton" stepKey="clickAddLocationButton"/> |
| 2523 | + <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterLocationName"> |
| 2524 | + <argument name="property" value="PageBuilderMapLocationName_TestLocation"/> |
| 2525 | + </actionGroup> |
| 2526 | + <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterLatitude"> |
| 2527 | + <argument name="property" value="PageBuilderMapLatitude_0"/> |
| 2528 | + </actionGroup> |
| 2529 | + <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterLongitude"> |
| 2530 | + <argument name="property" value="PageBuilderMapLongitude_0"/> |
| 2531 | + </actionGroup> |
| 2532 | + <actionGroup ref="saveLocationForm" stepKey="saveLocationForm"/> |
| 2533 | + <!-- Add 2nd Location --> |
| 2534 | + <comment userInput="Add 2nd Location" stepKey="commentAddLocation2"/> |
| 2535 | + <actionGroup ref="clickAddLocationButton" stepKey="clickAddLocationButton2"/> |
| 2536 | + <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterLocationName2"> |
| 2537 | + <argument name="property" value="PageBuilderMapLocationName_TestLocation"/> |
| 2538 | + </actionGroup> |
| 2539 | + <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterLatitude2"> |
| 2540 | + <argument name="property" value="PageBuilderMapLatitude_0"/> |
| 2541 | + </actionGroup> |
| 2542 | + <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterLongitude2"> |
| 2543 | + <argument name="property" value="PageBuilderMapLongitude_NegativeMax"/> |
| 2544 | + </actionGroup> |
| 2545 | + <actionGroup ref="saveLocationForm" stepKey="saveLocationForm2"/> |
| 2546 | + <actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettingsMap"/> |
| 2547 | + <!-- Save Block and Set Valid API Key --> |
| 2548 | + <comment userInput="Save Block and Set Valid API Key" stepKey="commentSaveBlockAndSetKey"/> |
| 2549 | + <magentoCLI command="config:set cms/pagebuilder/google_maps_api_key {{googleMapsAPIKey.valid}}" stepKey="setValidGoogleMapsAPIKey"/> |
| 2550 | + <actionGroup ref="saveCMSBlock" stepKey="saveCMSBlock"/> |
| 2551 | + <!-- Validate CMS Block Stage --> |
| 2552 | + <comment userInput="Validate CMS Block Stage" stepKey="commentValidateCMSBlockStage"/> |
| 2553 | + <seeElement selector="{{MapOnStage.height('1', PageBuilderMapHeightProperty500px.value)}}" stepKey="seeHeightMap1Stage"/> |
| 2554 | + <executeJS function="return document.querySelectorAll('{{MapOnStage.baseCSS}}')[0].getBoundingClientRect().height" stepKey="actualStageMap1Height"/> |
| 2555 | + <executeJS function="return Math.abs({$actualStageMap1Height}-{{PageBuilderMapHeightProperty500px.value}})" stepKey="actualStageMap1HeightDifference"/> |
| 2556 | + <assertLessThanOrEqual stepKey="assertStageMap1Height"> |
| 2557 | + <expectedResult type="int">2</expectedResult> |
| 2558 | + <actualResult type="variable">actualStageMap1HeightDifference</actualResult> |
| 2559 | + </assertLessThanOrEqual> |
| 2560 | + <!-- Validate 2 Pins on map --> |
| 2561 | + <comment userInput="Validate 2 Pins on map" stepKey="commentValidate2PinsOnMap"/> |
| 2562 | + <actionGroup ref="verifyNumberOfPinsOnMap" stepKey="verifyNumberOfPinsOnMapStage"> |
| 2563 | + <argument name="page" value="MapOnStage"/> |
| 2564 | + <argument name="count" value="2"/> |
| 2565 | + </actionGroup> |
| 2566 | + <!-- Add Block to CMS Page --> |
| 2567 | + <comment userInput="Add Block to CMS Page" stepKey="commentAddBlockToCMSPage"/> |
| 2568 | + <actionGroup ref="navigateToCreatedCMSPage" stepKey="navigateToCreatedCMSPage"> |
| 2569 | + <argument name="CMSPage" value="$$createCMSPage$$"/> |
| 2570 | + </actionGroup> |
| 2571 | + <actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandPanelAddContentMenuSection"> |
| 2572 | + <argument name="contentType" value="PageBuilderBlockContentType"/> |
| 2573 | + </actionGroup> |
| 2574 | + <actionGroup ref="dragContentTypeToStage" stepKey="dragBlockIntoStage"> |
| 2575 | + <argument name="contentType" value="PageBuilderBlockContentType"/> |
| 2576 | + </actionGroup> |
| 2577 | + <actionGroup ref="openPageBuilderEditPanel" stepKey="openEditAfterDropBlock"> |
| 2578 | + <argument name="contentType" value="PageBuilderBlockContentType"/> |
| 2579 | + </actionGroup> |
| 2580 | + <actionGroup ref="searchBlockInGrid" stepKey="searchBlockInGrid"> |
| 2581 | + <argument name="block" value="$$createCMSBlock$$"/> |
| 2582 | + </actionGroup> |
| 2583 | + <actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettingsBlock"/> |
| 2584 | + <!-- Validate CMS Page Stage --> |
| 2585 | + <comment userInput="Validate CMS Page Stage" stepKey="commentValidateCMSPageStage"/> |
| 2586 | + <seeElement selector="{{MapOnStorefront.height('1', PageBuilderMapHeightProperty500px.value)}}" stepKey="seeHeightMap1pageStage"/> |
| 2587 | + <executeJS function="return document.querySelectorAll('{{MapOnStage.baseCSS}}')[0].getBoundingClientRect().height" stepKey="pageStageMap1Height"/> |
| 2588 | + <executeJS function="return Math.abs({$pageStageMap1Height}-{{PageBuilderMapHeightProperty500px.value}})" stepKey="pageStageMap1HeightDifference"/> |
| 2589 | + <assertLessThanOrEqual stepKey="assertPageStageMap1Height"> |
| 2590 | + <expectedResult type="int">2</expectedResult> |
| 2591 | + <actualResult type="variable">pageStageMap1HeightDifference</actualResult> |
| 2592 | + </assertLessThanOrEqual> |
| 2593 | + <actionGroup ref="verifyNumberOfPinsOnMapNoClick" stepKey="verifyNumberOfPinsOnMapPageStage"> |
| 2594 | + <argument name="page" value="MapOnStorefront"/> |
| 2595 | + <argument name="count" value="2"/> |
| 2596 | + </actionGroup> |
| 2597 | + <actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/> |
| 2598 | + <!-- Validate CMS Page Storefront --> |
| 2599 | + <comment userInput="Validate CMS Page Storefront" stepKey="commentValidateCMSPageStorefront"/> |
| 2600 | + <actionGroup ref="navigateToStorefrontForCreatedPage" stepKey="navigateToStoreFront"> |
| 2601 | + <argument name="page" value="$$createCMSPage.identifier$$"/> |
| 2602 | + </actionGroup> |
| 2603 | + <seeElement selector="{{MapOnStorefront.height('1', PageBuilderMapHeightProperty500px.value)}}" stepKey="seeHeightMap1Storefront"/> |
| 2604 | + <executeJS function="return document.querySelectorAll('{{MapOnStage.baseCSS}}')[0].getBoundingClientRect().height" stepKey="actualStorefrontMap1Height"/> |
| 2605 | + <executeJS function="return Math.abs({$actualStorefrontMap1Height}-{{PageBuilderMapHeightProperty500px.value}})" stepKey="actualStorefrontMap1HeightDifference"/> |
| 2606 | + <assertLessThanOrEqual stepKey="assertStorefrontMap1Height"> |
| 2607 | + <expectedResult type="int">2</expectedResult> |
| 2608 | + <actualResult type="variable">actualStorefrontMap1HeightDifference</actualResult> |
| 2609 | + </assertLessThanOrEqual> |
| 2610 | + </test> |
2473 | 2611 | </tests>
|
0 commit comments