Skip to content

Commit f21f370

Browse files
committed
MC-3413: Update Google Maps API Key & Unskip Maps Tests
- Fixing tests that switch tabs
1 parent 6d3478c commit f21f370

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -631,13 +631,14 @@
631631
<!-- Save Page -->
632632
<comment userInput="Save Page" stepKey="commentSavePage"/>
633633
<switchToPreviousTab stepKey="switchToPreviousTab"/>
634+
<reloadPage stepKey="reloadPage"/>
635+
<waitForPageLoad stepKey="waitForPageLoad"/>
634636
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage2"/>
635637
<!-- Storefront: Validate Map Style Changed -->
636638
<comment userInput="Storefront: Validate Map Style Changed" stepKey="commentValidate2"/>
637639
<switchToNextTab stepKey="switchToNextTab"/>
638-
<actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront3">
639-
<argument name="contentType" value="PageBuilderMapContentType"/>
640-
</actionGroup>
640+
<reloadPage stepKey="reloadPage2"/>
641+
<waitForPageLoad stepKey="waitForPageLoad2"/>
641642
<executeJS function="return decodeURIComponent(JSON.parse('&quot;' + document.evaluate('//body//script[contains(.,\'Magento_PageBuilder/js/utils/map\')]', document, null, XPathResult.STRING_TYPE, null).stringValue.match(/(?&lt;=style:\s').+(?=')/)[0].replace(/\\&quot;/g, '\\\\&quot;') + '&quot;'))" stepKey="mapStyle2"/>
642643
<assertEquals stepKey="assertMapStyle2">
643644
<actualResult type="variable">$mapStyle2</actualResult>

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

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,8 @@
365365
<!-- Switch Back To Backend -->
366366
<comment userInput="Switch Back To Backend" stepKey="commentSwitchToBackend"/>
367367
<switchToNextTab stepKey="switchToNextTab"/>
368+
<reloadPage stepKey="reloadPage"/>
369+
<waitForPageLoad stepKey="waitForPageLoad"/>
368370
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
369371
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage">
370372
<argument name="contentType" value="PageBuilderMapContentType"/>
@@ -431,9 +433,8 @@
431433
<!-- Storefront: Verify Pin Location Moved -->
432434
<comment userInput="Storefront: Verify Pin Location Moved" stepKey="commentVerifyPinMoveStorefront"/>
433435
<switchToNextTab stepKey="switchToNextTab2"/>
434-
<actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront2">
435-
<argument name="contentType" value="PageBuilderMapContentType"/>
436-
</actionGroup>
436+
<reloadPage stepKey="reloadPage2"/>
437+
<waitForPageLoad stepKey="waitForPageLoad2"/>
437438
<actionGroup ref="verifyPinLocationNotEqual" stepKey="verifyPinLocationStorefront">
438439
<argument name="page" value="MapOnStorefront"/>
439440
<argument name="comparedPinLocation" value="initialPinLocationStorefront"/>
@@ -503,6 +504,8 @@
503504
<!-- Switch Back To Backend -->
504505
<comment userInput="Switch Back To Backend" stepKey="commentSwitchToBackend"/>
505506
<switchToNextTab stepKey="switchToNextTab"/>
507+
<reloadPage stepKey="reloadPage"/>
508+
<waitForPageLoad stepKey="waitForPageLoad"/>
506509
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
507510
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage">
508511
<argument name="contentType" value="PageBuilderMapContentType"/>
@@ -555,9 +558,8 @@
555558
<!-- Storefront: Verify Pin Location Moved -->
556559
<comment userInput="Storefront: Verify Pin Location Moved" stepKey="commentVerifyPinMoveStorefront"/>
557560
<switchToNextTab stepKey="switchToNextTab2"/>
558-
<actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront2">
559-
<argument name="contentType" value="PageBuilderMapContentType"/>
560-
</actionGroup>
561+
<reloadPage stepKey="reloadPage2"/>
562+
<waitForPageLoad stepKey="waitForPageLoad2"/>
561563
<actionGroup ref="verifyPinLocationNotEqual" stepKey="verifyPinLocationStorefront">
562564
<argument name="page" value="MapOnStorefront"/>
563565
<argument name="comparedPinLocation" value="initialPinLocationStorefront"/>
@@ -627,6 +629,8 @@
627629
<!-- Switch Back To Backend -->
628630
<comment userInput="Switch Back To Backend" stepKey="commentSwitchToBackend"/>
629631
<switchToNextTab stepKey="switchToNextTab"/>
632+
<reloadPage stepKey="reloadPage"/>
633+
<waitForPageLoad stepKey="waitForPageLoad"/>
630634
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
631635
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage">
632636
<argument name="contentType" value="PageBuilderMapContentType"/>
@@ -677,9 +681,8 @@
677681
<!-- Storefront: Verify Pin Location Moved -->
678682
<comment userInput="Storefront: Verify Pin Location Moved" stepKey="commentVerifyPinMoveStorefront"/>
679683
<switchToNextTab stepKey="switchToNextTab2"/>
680-
<actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront2">
681-
<argument name="contentType" value="PageBuilderMapContentType"/>
682-
</actionGroup>
684+
<reloadPage stepKey="reloadPage2"/>
685+
<waitForPageLoad stepKey="waitForPageLoad2"/>
683686
<actionGroup ref="verifyPinLocationNotEqual" stepKey="verifyPinLocationStorefront">
684687
<argument name="page" value="MapOnStorefront"/>
685688
<argument name="comparedPinLocation" value="initialPinLocationStorefront"/>
@@ -749,6 +752,8 @@
749752
<!-- Switch Back To Backend -->
750753
<comment userInput="Switch Back To Backend" stepKey="commentSwitchToBackend"/>
751754
<switchToNextTab stepKey="switchToNextTab"/>
755+
<reloadPage stepKey="reloadPage"/>
756+
<waitForPageLoad stepKey="waitForPageLoad"/>
752757
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
753758
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage">
754759
<argument name="contentType" value="PageBuilderMapContentType"/>
@@ -799,9 +804,8 @@
799804
<!-- Storefront: Verify Pin Location Moved -->
800805
<comment userInput="Storefront: Verify Pin Location Moved" stepKey="commentVerifyPinMoveStorefront"/>
801806
<switchToNextTab stepKey="switchToNextTab2"/>
802-
<actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront2">
803-
<argument name="contentType" value="PageBuilderMapContentType"/>
804-
</actionGroup>
807+
<reloadPage stepKey="reloadPage2"/>
808+
<waitForPageLoad stepKey="waitForPageLoad2"/>
805809
<actionGroup ref="verifyPinLocationNotEqual" stepKey="verifyPinLocationStorefront">
806810
<argument name="page" value="MapOnStorefront"/>
807811
<argument name="comparedPinLocation" value="initialPinLocationStorefront"/>

0 commit comments

Comments
 (0)