Skip to content

Commit 29cb41d

Browse files
authored
Merge pull request #5235 from magento-arcticfoxes/B2B-343-2
[arcticfoxes] B2B-343: Stabilize Community PR
2 parents f8c7333 + d5e89aa commit 29cb41d

File tree

3 files changed

+16
-27
lines changed

3 files changed

+16
-27
lines changed

app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontUpdateSearchTermEntityTest.xml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,23 @@
2525
<requiredEntity createDataKey="createCategory1"/>
2626
</createData>
2727

28+
<!-- Perform reindex and flush cache -->
29+
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
30+
<magentoCLI command="cache:flush" stepKey="flushCache"/>
2831
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnStorefrontPage1"/>
2932
<waitForPageLoad stepKey="waitForPageLoad1"/>
3033
</before>
3134
<after>
32-
<actionGroup ref="logout" stepKey="logoutOfAdmin1"/>
33-
3435
<deleteData createDataKey="createProduct1" stepKey="deleteSimpleProduct1"/>
3536
<deleteData createDataKey="createCategory1" stepKey="deleteCategory1"/>
37+
38+
<!-- Delete all search terms -->
39+
<amOnPage url="{{AdminCatalogSearchTermIndexPage.url}}" stepKey="openAdminCatalogSearchTermIndexPage"/>
40+
<waitForPageLoad stepKey="waitForAdminCatalogSearchTermIndexPageLoad"/>
41+
<comment userInput="Delete all search terms" stepKey="deleteAllSearchTermsComment"/>
42+
<actionGroup ref="AdminDeleteAllSearchTermsActionGroup" stepKey="deleteAllSearchTerms"/>
43+
44+
<actionGroup ref="logout" stepKey="logoutOfAdmin1"/>
3645
</after>
3746

3847
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchByProductName1">

app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductDescriptionTest.xml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,8 @@
1919
</annotations>
2020
<before>
2121
<!-- Login as admin -->
22-
<comment userInput="Login as admin" stepKey="loginAsAdminComment"/>
2322
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
24-
<!-- Go to the catalog search term page -->
25-
<comment userInput="Go to the catalog search term page" stepKey="goToSearchTermPageComment"/>
26-
<amOnPage url="{{AdminCatalogSearchTermIndexPage.url}}" stepKey="openAdminCatalogSearchTermIndexPage"/>
27-
<waitForPageLoad stepKey="waitForAdminCatalogSearchTermIndexPageLoad"/>
28-
<!-- Delete all search terms -->
29-
<comment userInput="Delete all search terms" stepKey="deleteAllSearchTermsComment"/>
30-
<actionGroup ref="AdminDeleteAllSearchTermsActionGroup" stepKey="deleteAllSearchTerms"/>
31-
<actionGroup ref="DeleteAllProductsUsingProductGridActionGroup" stepKey="deleteAllProducts"/>
3223
<!-- Create product with description -->
33-
<comment userInput="Create product with description" stepKey="createProductWithDescriptionComment"/>
3424
<createData entity="SimpleProductWithDescription" stepKey="simpleProduct"/>
3525

3626
<!-- Perform reindex and flush cache -->
@@ -39,51 +29,40 @@
3929
</before>
4030
<after>
4131
<!-- Delete created product -->
42-
<comment userInput="Delete created product" stepKey="deleteCreatedProductComment"/>
4332
<deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/>
4433
<!-- Go to the catalog search term page -->
45-
<comment userInput="Go to the catalog search term page" stepKey="goToSearchTermPageComment2"/>
4634
<amOnPage url="{{AdminCatalogSearchTermIndexPage.url}}" stepKey="openAdminCatalogSearchTermIndexPage"/>
4735
<waitForPageLoad stepKey="waitForAdminCatalogSearchTermIndexPageLoad"/>
4836
<!-- Filter the search term -->
49-
<comment userInput="Filter search term" stepKey="filterSearchTermComment"/>
5037
<actionGroup ref="AdminSearchTermFilterBySearchQueryActionGroup" stepKey="filterByThirdSearchQuery">
5138
<argument name="searchQuery" value="{{ApiProductDescription.value}}"/>
5239
</actionGroup>
5340
<!-- Delete created below search terms -->
54-
<comment userInput="Delete created below search terms" stepKey="deleteCreatedBelowSearchTermsComment"/>
5541
<actionGroup ref="AdminDeleteSearchTermActionGroup" stepKey="deleteSearchTerms"/>
5642
<actionGroup ref="logout" stepKey="logout"/>
5743
</after>
5844
<!-- Go to storefront home page -->
59-
<comment userInput="Go to storefront home page" stepKey="goToStorefrontHomePageComment"/>
6045
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="openStoreFrontHomePage"/>
6146
<!-- Storefront quick search by product name -->
62-
<comment userInput="Storefront quick search by product name" stepKey="storefrontQuickSearchByProductNameComment"/>
6347
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchByProductName">
6448
<argument name="phrase" value="{{ApiProductDescription.value}}"/>
6549
</actionGroup>
6650
<!-- Verify search suggestions and select the suggestion from dropdown options -->
67-
<comment userInput="Verify search suggestions and select the suggestion from dropdown options" stepKey="verifySearchSuggestionsComment"/>
6851
<actionGroup ref="StoreFrontSelectDropDownSearchSuggestionActionGroup" stepKey="seeDropDownSearchSuggestion">
6952
<argument name="searchQuery" value="{{ApiProductDescription.value}}"/>
7053
</actionGroup>
7154
<!-- Assert Product storefront main page -->
72-
<comment userInput="See product name" stepKey="seeProductNameComment"/>
7355
<actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeProductName">
7456
<argument name="productName" value="$$simpleProduct.name$$"/>
7557
</actionGroup>
7658
<!-- Go to the catalog search term page -->
77-
<comment userInput="Go to the catalog search term page" stepKey="goToSearchTermPageComment3"/>
7859
<amOnPage url="{{AdminCatalogSearchTermIndexPage.url}}" stepKey="openAdminCatalogSearchTermIndexPage"/>
7960
<waitForPageLoad stepKey="waitForAdminCatalogSearchTermIndexPageLoad"/>
8061
<!-- Filter the search term -->
81-
<comment userInput="Filter search term" stepKey="filterSearchTermComment2"/>
8262
<actionGroup ref="AdminSearchTermFilterBySearchQueryActionGroup" stepKey="filterByThirdSearchQuery">
8363
<argument name="searchQuery" value="{{ApiProductDescription.value}}"/>
8464
</actionGroup>
8565
<!-- Assert Search Term in grid -->
86-
<comment userInput="Check is search term in grid or not" stepKey="isSearchTermInGridComment"/>
8766
<see stepKey="seeSearchTermInGrid" selector="{{AdminCatalogSearchTermIndexSection.gridRow}}" userInput="{{ApiProductDescription.value}}" />
8867
<see selector="{{AdminCatalogSearchTermIndexSection.numberOfSearchTermResults}}" userInput="1" stepKey="seeNumberOfSearchTermResultInGrid"/>
8968
</test>

lib/web/requirejs/domReady.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ define(function () {
7878
}
7979
}
8080

81-
//Check if document already complete, and if so, just trigger page load
81+
//Check if document is no longer loading, and if so, just trigger page load
8282
//listeners. Latest webkit browsers also use "interactive", and
8383
//will fire the onDOMContentLoaded before "interactive" but not after
8484
//entering "interactive" or "complete". More details:
@@ -89,8 +89,9 @@ define(function () {
8989
//so removing the || document.readyState === "interactive" test.
9090
//There is still a window.onload binding that should get fired if
9191
//DOMContentLoaded is missed.
92-
if (document.readyState === "complete") {
93-
pageLoaded();
92+
if (document.readyState !== "loading") {
93+
// Handle it asynchronously to allow scripts the opportunity to delay ready
94+
setTimeout(pageLoaded);
9495
}
9596
}
9697

@@ -126,4 +127,4 @@ define(function () {
126127
/** END OF PUBLIC API **/
127128

128129
return domReady;
129-
});
130+
});

0 commit comments

Comments
 (0)