Skip to content

Commit

Permalink
Fix pr reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
shashwatahalder01 committed Nov 1, 2024
1 parent 79424a0 commit 74793f1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/e2e_api_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ env:
CUSTOMER2: customer2
USER_PASSWORD: 01dokan01
GMAP: ${{secrets.GMAP}}
TALKJS_APP_ID: ${{secrets.TALKJS_APP_ID}}
TALKJS_APP_SECRET: ${{secrets.TALKJS_APP_SECRET}}
BASE_URL: http://localhost:9999
CI: true
FORCE_COLOR: 1
Expand Down
10 changes: 6 additions & 4 deletions tests/pw/pages/liveChatPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class LiveChatPage extends BasePage {
await this.toBeVisibleFrameLocator(liveChatVendor.liveChatIframe, liveChatVendor.sendButton);
}

// vendor send message to vendor customer
// vendor send message to customer
async sendMessageToCustomer(chatPerson: string, message: string): Promise<void> {
await this.goIfNotThere(data.subUrls.frontend.vDashboard.inbox);
await this.clickFrameSelector(liveChatVendor.liveChatIframe, liveChatVendor.chatPerson(chatPerson));
Expand All @@ -47,7 +47,7 @@ export class LiveChatPage extends BasePage {

// customer

// customer send message to vendor customer
// customer send message to vendor
async sendMessageToVendor(storename: string, message: string): Promise<void> {
await this.gotoSingleStore(storename, true);
await this.click(singleStoreCustomer.storeTabs.chatNow);
Expand All @@ -57,7 +57,8 @@ export class LiveChatPage extends BasePage {
await this.toBeVisibleFrameLocator(liveChatCustomer.liveChatIframe, liveChatCustomer.sentMessage(message));
}

async viewLiveChatButtonOnStore(storename: string, disable = false) {
// view chat button on vendor page
async viewLiveChatButtonOnStore(storename: string, disable = false): Promise<void> {
await this.gotoSingleStore(storename, true);
if (!disable) {
await this.toBeVisible(singleStoreCustomer.storeTabs.chatNow);
Expand All @@ -66,7 +67,8 @@ export class LiveChatPage extends BasePage {
}
}

async viewLiveChatButtonOnProduct(productName: string, option: string) {
// view chat button on product page
async viewLiveChatButtonOnProduct(productName: string, option: 'above-tab' | 'inside-tab' | 'dont-show'): Promise<void> {
await this.goToProductDetails(productName, true);

switch (option) {
Expand Down
2 changes: 1 addition & 1 deletion tests/pw/pages/productsPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ export class ProductsPage extends AdminPage {
await this.hover(productsVendor.productCell(productName));
await this.clickAndWaitForLoadState(productsVendor.view(productName));
await expect(this.page).toHaveURL(data.subUrls.frontend.productDetails(helpers.slugify(productName)) + '/');
const { quantity, addToCart, viewCart, euComplianceData, productAddedSuccessMessage, productWithQuantityAddedSuccessMessage, ...productDetails } = selector.customer.cSingleProduct.productDetails;
const { quantity, addToCart, viewCart, chatNow, euComplianceData, productAddedSuccessMessage, productWithQuantityAddedSuccessMessage, ...productDetails } = selector.customer.cSingleProduct.productDetails;
await this.multipleElementVisible(productDetails);
}

Expand Down
1 change: 0 additions & 1 deletion tests/pw/pages/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2418,7 +2418,6 @@ export const selector = {
// Live Chat
liveChat: {
enableLiveChat: '//label[@for="dokan_live_chat[enable]"]',

chatProvider: (provider: string) => `//label[contains(@for,'${provider}-provider')]`,

// Fb
Expand Down
1 change: 1 addition & 0 deletions tests/pw/tests/e2e/liveChat.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ test.describe('Live chat test', () => {

test.afterAll(async () => {
await dbUtils.setOptionValue(dbData.dokan.optionName.liveChat, dbData.dokan.liveChatSettings);
await vPage.close();
await cPage.close();
});

Expand Down

0 comments on commit 74793f1

Please sign in to comment.