diff --git a/tests/screenobjects/UplinkMainScreen.ts b/tests/screenobjects/UplinkMainScreen.ts index 4dfd6b17b6..74a94ff5c3 100644 --- a/tests/screenobjects/UplinkMainScreen.ts +++ b/tests/screenobjects/UplinkMainScreen.ts @@ -1,6 +1,11 @@ require("module-alias/register"); import AppScreen from "@screenobjects/AppScreen"; -import { hoverOnMacOS, hoverOnWindows } from "@helpers/commands"; +import { + hoverOnMacOS, + hoverOnWindows, + leftClickOnMacOS, + leftClickOnWindows, +} from "@helpers/commands"; import { MACOS_DRIVER, WINDOWS_DRIVER } from "@helpers/constants"; let SELECTORS = {}; @@ -260,8 +265,13 @@ export default class UplinkMainScreen extends AppScreen { } async goToMainScreen() { - const button = await this.chatsButton; - await button.click(); + const chatsButton = await this.chatsButton; + const currentDriver = await this.getCurrentDriver(); + if (currentDriver === MACOS_DRIVER) { + await leftClickOnMacOS(chatsButton); + } else if (currentDriver === WINDOWS_DRIVER) { + await leftClickOnWindows(chatsButton); + } } async goToSettings() { diff --git a/tests/screenobjects/friends/FriendsScreen.ts b/tests/screenobjects/friends/FriendsScreen.ts index d66b4077cf..c635708c6e 100644 --- a/tests/screenobjects/friends/FriendsScreen.ts +++ b/tests/screenobjects/friends/FriendsScreen.ts @@ -5,6 +5,8 @@ import UplinkMainScreen from "@screenobjects/UplinkMainScreen"; import { getClipboardMacOS, keyboardShortcutPaste, + leftClickOnMacOS, + leftClickOnWindows, rightClickOnMacOS, rightClickOnWindows, } from "@helpers/commands"; @@ -677,6 +679,16 @@ export default class FriendsScreen extends UplinkMainScreen { await this.blockedListButton.click(); } + async goToChatWithFriend() { + const chatWithFriendButton = await this.chatWithFriendButton; + const currentDriver = await this.getCurrentDriver(); + if (currentDriver === MACOS_DRIVER) { + await leftClickOnMacOS(chatWithFriendButton); + } else if (currentDriver === WINDOWS_DRIVER) { + await leftClickOnWindows(chatWithFriendButton); + } + } + async goToPendingFriendsList() { await browser.pause(1000); await this.pendingFriendsButton.waitForExist(); diff --git a/tests/specs/reusable-accounts/01-create-accounts-and-friends.spec.ts b/tests/specs/reusable-accounts/01-create-accounts-and-friends.spec.ts index efc6d2e6ae..d8e4320bc8 100644 --- a/tests/specs/reusable-accounts/01-create-accounts-and-friends.spec.ts +++ b/tests/specs/reusable-accounts/01-create-accounts-and-friends.spec.ts @@ -162,7 +162,7 @@ export default async function createChatAccountsTests() { await friendsScreen.validateAllFriendsListIsNotEmpty(); // Go to Chat with User B - await friendsScreen.chatWithFriendButton.click(); + await friendsScreen.goToChatWithFriend(); }); it("Chat User B - Validate friend request was accepted", async () => { diff --git a/tests/specs/reusable-accounts/07-quick-profile.spec.ts b/tests/specs/reusable-accounts/07-quick-profile.spec.ts index 8139f311e0..425f6ddbfc 100644 --- a/tests/specs/reusable-accounts/07-quick-profile.spec.ts +++ b/tests/specs/reusable-accounts/07-quick-profile.spec.ts @@ -37,7 +37,7 @@ export default async function quickProfileTests() { it("Chat User A - Click on Edit Profile", async () => { // Click on Edit Profile from Quick Profile await chatsQuickProfile.clickOnEditProfile(); - await settingsProfile.validateSettingsProfileIsShown(); + await settingsProfile.waitForIsShown(true); await settingsProfile.goToMainScreen(); });