Skip to content

Commit 57d3630

Browse files
committed
ACQE-7447: Apply Catalog Storefront configuration settings
- Used waitForElementVisible in test file
1 parent 82c4da0 commit 57d3630

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

app/code/Magento/Catalog/Test/Mftf/Helper/ProductApiHelper.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function createProduct(
6565
'quantity' => $quantity // Override the default quantity (100) with our value
6666
];
6767

68-
// THIS IS YOUR VISION: Use actual entity object as dependent object!
68+
// Use actual entity object as dependent object!
6969
$dependentObjects = [];
7070
$categoryEntityObject = $this->getCategoryEntity($categoryStepKey);
7171
if ($categoryEntityObject !== null) {
@@ -89,9 +89,7 @@ public function createProduct(
8989
} else {
9090
$createdSkus[] = $uniqueSku; // Fallback to our generated SKU
9191
}
92-
9392
usleep(100000);
94-
9593
} catch (\Exception $e) {
9694
// Log error and continue with fallback SKU
9795
error_log("Product creation failed : " . $e->getMessage());

app/code/Magento/Catalog/Test/Mftf/Test/StorefrontAssertProductCountInListAndGridViewTest.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@
6565
<waitForElementClickable selector="{{AdminChecksListAndGridModeSection.listView}}" stepKey="waitToClickListMode"/>
6666
<click selector="{{AdminChecksListAndGridModeSection.listView}}" stepKey="clickListMode"/>
6767
<waitForPageLoad stepKey="waitForListMode"/>
68-
<seeElement selector="{{StorefrontCategoryMainSection.productLink}}" stepKey="seeAnyProductOnPage"/>
68+
<waitForElementVisible selector="{{StorefrontCategoryMainSection.productLink}}" stepKey="seeAnyProductOnPage"/>
6969
<seeOptionIsSelected userInput="{{CustomStoreFrontProductsSortBy.value}}" selector="{{StorefrontCategoryTopToolbarSection.sortByDropdown}}" after="seeAnyProductOnPage" stepKey="selectSortBy"/>
7070
<waitForElementClickable selector="{{AdminChecksListAndGridModeSection.productsPerPage}}" stepKey="waitToClickProductsPerPageButtonInListMode"/>
7171
<click selector="{{AdminChecksListAndGridModeSection.productsPerPage}}" stepKey="clickProductsPerPageButtonInListMode"/>
7272
<waitForPageLoad stepKey="waitForProductsPerPage"/>
73-
<seeElement selector="{{AdminChecksListAndGridModeSection.pageOptions('1')}}" stepKey="seeLimiterOption1"/>
74-
<seeElement selector="{{AdminChecksListAndGridModeSection.pageOptions('2')}}" stepKey="seeLimiterOption2"/>
75-
<seeElement selector="{{AdminChecksListAndGridModeSection.pageOptions('3')}}" stepKey="seeLimiterOption3"/>
73+
<waitForElementVisible selector="{{AdminChecksListAndGridModeSection.pageOptions('1')}}" stepKey="seeLimiterOption1"/>
74+
<waitForElementVisible selector="{{AdminChecksListAndGridModeSection.pageOptions('2')}}" stepKey="seeLimiterOption2"/>
75+
<waitForElementVisible selector="{{AdminChecksListAndGridModeSection.pageOptions('3')}}" stepKey="seeLimiterOption3"/>
7676
<waitForElementVisible selector="{{AdminChecksListAndGridModeSection.allButton}}" stepKey="seeAllButton"/>
7777
<click selector="{{AdminChecksListAndGridModeSection.allButton}}" stepKey="selectAllButton"/>
7878
<waitForPageLoad stepKey="waitForSelectAll"/>
@@ -89,9 +89,9 @@
8989
<waitForElementClickable selector="{{AdminChecksListAndGridModeSection.productsPerPage}}" stepKey="waitToClickProductsPerPageButtonInGridMode"/>
9090
<click selector="{{AdminChecksListAndGridModeSection.productsPerPage}}" stepKey="clickProductsPerPageButtonInGridMode"/>
9191
<waitForPageLoad stepKey="waitForProductsPerPageOpen"/>
92-
<seeElement selector="{{AdminChecksListAndGridModeSection.pageOptions('1')}}" stepKey="seeLimiterOption1Grid"/>
93-
<seeElement selector="{{AdminChecksListAndGridModeSection.pageOptions('2')}}" stepKey="seeLimiterOption2Grid"/>
94-
<seeElement selector="{{AdminChecksListAndGridModeSection.pageOptions('3')}}" stepKey="seeLimiterOption3Grid"/>
92+
<waitForElementVisible selector="{{AdminChecksListAndGridModeSection.pageOptions('1')}}" stepKey="seeLimiterOption1Grid"/>
93+
<waitForElementVisible selector="{{AdminChecksListAndGridModeSection.pageOptions('2')}}" stepKey="seeLimiterOption2Grid"/>
94+
<waitForElementVisible selector="{{AdminChecksListAndGridModeSection.pageOptions('3')}}" stepKey="seeLimiterOption3Grid"/>
9595
<waitForElementVisible selector="{{AdminChecksListAndGridModeSection.allButton}}" stepKey="seeAllBtn"/>
9696
<!-- Step 6: Open the same category again from navigation menu. Switch to Grid mode. -->
9797
<actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="navigateToCategoryPage2">

0 commit comments

Comments
 (0)