Skip to content

Commit

Permalink
Remove: pro-banner test (getdokan#2541)
Browse files Browse the repository at this point in the history
  • Loading branch information
shashwatahalder01 authored Jan 30, 2025
1 parent 6485eb5 commit e743934
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 33 deletions.
2 changes: 0 additions & 2 deletions tests/pw/pages/menuManagerPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ export class MenuManagerPage extends BasePage {
await this.click(settingsAdmin.menus.menuManager);
}



// update menu status
async updateMenuStatus(menu: string, action: string, menuLink: string) {
await this.gotoUntilNetworkidle(data.subUrls.backend.dokan.settings, { waitUntil: 'networkidle' }, true);
Expand Down
11 changes: 0 additions & 11 deletions tests/pw/pages/noticeAndPromotionPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,6 @@ export class NoticeAndPromotionPage extends AdminPage {

// dokan pro promotion
async dokanProPromotionRenderProperly() {
// dokan promo banner
await this.goIfNotThere(data.subUrls.backend.dokan.dokan);

const isProPromotionVisible = await this.isVisible(selector.admin.dokan.promoBanner.promoBanner);
if (isProPromotionVisible) {
// promo banner elements are visible
await this.multipleElementVisible(selector.admin.dokan.promoBanner);
} else {
console.log('No Pro promotion exists');
}

// dokan lite modules
await this.goIfNotThere(data.subUrls.backend.dokan.liteModules);

Expand Down
24 changes: 10 additions & 14 deletions tests/pw/pages/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,15 +250,6 @@ export const selector = {
paragraph2: '//a[@class="dokan-insights-data-we-collect"]/../..//p[@class="description"]',
},

// promo banner
promoBanner: {
promoBanner: '.dokan-promo-banner',
bannerThumbnail: '.dokan-promo-banner .thumbnail',
promoContent: '.dokan-promo-banner .content',
upgradeToPremium: '.btn-upgrade',
closePromoBanner: '.close-banner',
},

//table loader
loader: 'div.table-loader',

Expand Down Expand Up @@ -2584,11 +2575,16 @@ export const selector = {
editField: (blockName: string, fieldName: string) => `(//h3[contains(@class,'block-header-title') and normalize-space(text())="${blockName}"]/../../../../..//h3[normalize-space(text())='${fieldName}']/../..//button[contains(@class,'field-edit-button')])[last()]`,

fieldContents: {
label: (blockName: string, fieldName: string) => `//h3[contains(@class,'block-header-title') and normalize-space(text())="${blockName}"]/../../../../..//h3[normalize-space(text())='${fieldName}']/../../..//div[@class="field-form-control-wrapper"]//input[@id="field-input-label"]`,
type: (blockName: string, fieldName: string) => `//h3[contains(@class,'block-header-title') and normalize-space(text())="${blockName}"]/../../../../..//h3[normalize-space(text())='${fieldName}']/../../..//div[@class="field-form-control-wrapper"]//select[@id="field-input-type"]`,
placeholder: (blockName: string, fieldName: string) => `//h3[contains(@class,'block-header-title') and normalize-space(text())="${blockName}"]/../../../../..//h3[normalize-space(text())='${fieldName}']/../../..//div[@class="field-form-control-wrapper"]//input[@id='input-placeholder']`,
helpContent: (blockName: string, fieldName: string) => `//h3[contains(@class,'block-header-title') and normalize-space(text())="${blockName}"]/../../../../..//h3[normalize-space(text())='${fieldName}']/../../..//div[@class="field-form-control-wrapper"]//input[@id='input-help-content']`,
cancel: (blockName: string, fieldName: string) => `//h3[contains(@class,'block-header-title') and normalize-space(text())="${blockName}"]/../../../../..//h3[normalize-space(text())='${fieldName}']/../../..//div[@class="field-form-control-wrapper"]//button[@id="input-Cancel"]`,
label: (blockName: string, fieldName: string) =>
`//h3[contains(@class,'block-header-title') and normalize-space(text())="${blockName}"]/../../../../..//h3[normalize-space(text())='${fieldName}']/../../..//div[@class="field-form-control-wrapper"]//input[@id="field-input-label"]`,
type: (blockName: string, fieldName: string) =>
`//h3[contains(@class,'block-header-title') and normalize-space(text())="${blockName}"]/../../../../..//h3[normalize-space(text())='${fieldName}']/../../..//div[@class="field-form-control-wrapper"]//select[@id="field-input-type"]`,
placeholder: (blockName: string, fieldName: string) =>
`//h3[contains(@class,'block-header-title') and normalize-space(text())="${blockName}"]/../../../../..//h3[normalize-space(text())='${fieldName}']/../../..//div[@class="field-form-control-wrapper"]//input[@id='input-placeholder']`,
helpContent: (blockName: string, fieldName: string) =>
`//h3[contains(@class,'block-header-title') and normalize-space(text())="${blockName}"]/../../../../..//h3[normalize-space(text())='${fieldName}']/../../..//div[@class="field-form-control-wrapper"]//input[@id='input-help-content']`,
cancel: (blockName: string, fieldName: string) =>
`//h3[contains(@class,'block-header-title') and normalize-space(text())="${blockName}"]/../../../../..//h3[normalize-space(text())='${fieldName}']/../../..//div[@class="field-form-control-wrapper"]//button[@id="input-Cancel"]`,
done: (blockName: string, fieldName: string) => `//h3[contains(@class,'block-header-title') and normalize-space(text())="${blockName}"]/../../../../..//h3[normalize-space(text())='${fieldName}']/../../..//div[@class="field-form-control-wrapper"]//button[@id="input-submit"]`,
},

Expand Down
3 changes: 1 addition & 2 deletions tests/pw/tests/e2e/productFormManager.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ import { payloads } from '@utils/payloads';
import { dbUtils } from '@utils/dbUtils';
import { dbData } from '@utils/dbData';


test.describe('Product functionality test', () => {
test.skip(true, 'feature not merged yet')
test.skip(true, 'feature not merged yet');
let admin: ProductFormManager;
let aPage: Page;
let apiUtils: ApiUtils;
Expand Down
2 changes: 0 additions & 2 deletions tests/pw/tests/e2e/vendorDeliveryTime.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { test, Page, request } from '@playwright/test';
import { VendorDeliveryTimePage } from '@pages/vendorDeliveryTimePage';
import { ApiUtils } from '@utils/apiUtils';
import { payloads } from '@utils/payloads';
import { dbUtils } from '@utils/dbUtils';
import { dbData } from '@utils/dbData';
import { data } from '@utils/testData';

test.describe('Vendor delivery time test', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/pw/utils/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1564,7 +1564,7 @@ export interface productAdvertisement {
};
}

// product form manager
// product form manager

export interface block {
currentLabel: string;
Expand Down
2 changes: 1 addition & 1 deletion tests/pw/utils/mergeSummaryReport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const mergeReports = (reportPaths: string[]): TestReport => {
};

// Main script execution
const reportsFolder = './all-reports';
const reportsFolder = './all-reports';
const reportPaths: string[] = [];

// Collect all reports.json files
Expand Down

0 comments on commit e743934

Please sign in to comment.