Skip to content

Commit b0e5303

Browse files
authored
Merge pull request #233 from Progi1984/boSearchPage
`boSearchPage` : Added method `clickRebuildEntireIndex`
2 parents 6ebd46f + 542b954 commit b0e5303

File tree

2 files changed

+16
-0
lines changed
  • src
    • interfaces/BO/shopParameters/search
    • versions/develop/pages/BO/shopParameters/search

2 files changed

+16
-0
lines changed

src/interfaces/BO/shopParameters/search/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export interface BOSearchPageInterface extends BOBasePagePageInterface {
1313
bulkSetStatus(page: Page, enable?: boolean): Promise<string>;
1414
deleteAlias(page: Page, row: number): Promise<string>;
1515
clickAddMissingProductsToIndex(page: Page): Promise<string>;
16+
clickRebuildEntireIndex(page: Page): Promise<string>;
1617
filterTable(page: Page, filterType: string, filterBy: string, value: string): Promise<void>;
1718
getAllRowsColumnContent(page: Page, columnName: string): Promise<string[]>;
1819
getBlacklistedWords(page: Page, idLang: number): Promise<string>;

src/versions/develop/pages/BO/shopParameters/search/index.ts

+15
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ class SearchPage extends BOBasePage implements BOSearchPageInterface {
112112

113113
private readonly addMissingProductsLink: string;
114114

115+
private readonly rebuildEntireIndexLink: string;
116+
115117
private readonly aliasForm: string;
116118

117119
private readonly searchWithinWordInput: (status: string) => string;
@@ -218,6 +220,8 @@ class SearchPage extends BOBasePage implements BOSearchPageInterface {
218220
this.indexedProducts = `${this.indexingForm} div p strong`;
219221
this.addMissingProductsLink = `${this.indexingForm} a.btn-link`
220222
+ '[href*="controller=AdminSearch&action=searchCron&ajax=1&token"]';
223+
this.rebuildEntireIndexLink = `${this.indexingForm} a.btn-link`
224+
+ '[href*="controller=AdminSearch&action=searchCron&ajax=1&full=1&token"]';
221225

222226
// Search form
223227
this.aliasForm = '#alias_fieldset_search';
@@ -600,6 +604,17 @@ class SearchPage extends BOBasePage implements BOSearchPageInterface {
600604
return this.getAlertSuccessBlockContent(page);
601605
}
602606

607+
/**
608+
* Click "Re-build the entire index"
609+
* @param page {Page} Browser tab
610+
* @returns {Promise<string>}
611+
*/
612+
async clickRebuildEntireIndex(page: Page): Promise<string> {
613+
await page.locator(this.rebuildEntireIndexLink).click();
614+
615+
return this.getAlertSuccessBlockContent(page);
616+
}
617+
603618
// Methods for search form
604619
/**
605620
* Returns if Search exact end match is checked

0 commit comments

Comments
 (0)