diff --git a/playwright/PageObjects/ChatsMain.ts b/playwright/PageObjects/ChatsElements/ChatsMain.ts similarity index 97% rename from playwright/PageObjects/ChatsMain.ts rename to playwright/PageObjects/ChatsElements/ChatsMain.ts index ac76798..ffd4045 100644 --- a/playwright/PageObjects/ChatsMain.ts +++ b/playwright/PageObjects/ChatsElements/ChatsMain.ts @@ -1,4 +1,4 @@ -import MainPage from "./MainPage"; +import MainPage from "../MainPage"; import { expect, type Locator, type Page } from "@playwright/test"; const fs = require("fs"); @@ -44,12 +44,6 @@ export class ChatsMainPage extends MainPage { readonly contextMenuOptionUnpinMessage: Locator; readonly contextMenuOptionUpload: Locator; readonly contextMenuSidebarChat: Locator; - readonly createGroupButton: Locator; - readonly createGroupModal: Locator; - readonly createGroupInputGroupName: Locator; - readonly createGroupLabelGroupMembers: Locator; - readonly createGroupLabelGroupName: Locator; - readonly createGroupLabelSelectMembers: Locator; readonly editMessageInput: Locator; readonly emojiButton: Locator; readonly emojiGroup: Locator; @@ -220,20 +214,6 @@ export class ChatsMainPage extends MainPage { this.contextMenuOptionUnpinMessage = this.page.getByTestId( "context-menu-option-Unpin Message", ); - this.createGroupButton = this.page.getByTestId("button-create-group"); - this.createGroupModal = this.page.getByTestId("modal-create-group-chat"); - this.createGroupInputGroupName = this.page.getByTestId( - "input-create-group-name", - ); - this.createGroupLabelGroupMembers = this.page.getByTestId( - "label-create-group-members", - ); - this.createGroupLabelGroupName = this.page.getByTestId( - "label-create-group-name", - ); - this.createGroupLabelSelectMembers = this.page.getByTestId( - "label-create-group-select-members", - ); this.editMessageInput = this.page .getByTestId("message-bubble-content") .locator(".cm-editor") @@ -372,6 +352,10 @@ export class ChatsMainPage extends MainPage { await this.buttonChatCall.click(); } + async clickOnCreateGroupChat() { + await this.buttonCreateGroupChat.click(); + } + async clickOnFavoriteButton() { if (this.viewport === "mobile-chrome") { await this.clickOnHamburgerMobileButton(); diff --git a/playwright/PageObjects/ChatsElements/CreateGroupModal.ts b/playwright/PageObjects/ChatsElements/CreateGroupModal.ts new file mode 100644 index 0000000..c4fe89d --- /dev/null +++ b/playwright/PageObjects/ChatsElements/CreateGroupModal.ts @@ -0,0 +1,87 @@ +import MainPage from "../MainPage"; +import { type Locator, type Page, expect } from "@playwright/test"; + +export class CreateGroupModal extends MainPage { + readonly createGroupButton: Locator; + readonly createGroupModal: Locator; + readonly createGroupInputGroupName: Locator; + readonly createGroupLabelGroupMembers: Locator; + readonly createGroupLabelGroupName: Locator; + readonly createGroupLabelSelectMembers: Locator; + readonly createGroupUsersList: Locator; + readonly errorNameCreateGroupModal: Locator; + readonly errorUsersCreateGroupModal: Locator; + readonly singleUser: Locator; + readonly singleUserProfilePicture: Locator; + readonly singleUserProfilePictureIdenticon: Locator; + readonly singleUserProfilePictureImage: Locator; + readonly singleUserStatusIndicator: Locator; + readonly singleUserUserInfo: Locator; + readonly singleUserName: Locator; + readonly singleUserKey: Locator; + readonly singleUserCheckbox: Locator; + + constructor( + public readonly page: Page, + public readonly viewport: string, + ) { + super(page, viewport); + this.createGroupModal = this.page.getByTestId("modal-create-group-chat"); + this.createGroupButton = this.createGroupModal.getByTestId( + "button-create-group", + ); + this.createGroupInputGroupName = this.createGroupModal + .getByTestId("input-create-group-name") + .getByRole("textbox"); + this.createGroupLabelGroupMembers = this.createGroupModal.getByTestId( + "label-create-group-members", + ); + this.createGroupLabelGroupName = this.createGroupModal.getByTestId( + "label-create-group-name", + ); + this.createGroupLabelSelectMembers = this.createGroupModal.getByTestId( + "label-create-group-select-members", + ); + this.createGroupUsersList = this.createGroupModal.getByTestId( + "create-group-users-list", + ); + this.errorNameCreateGroupModal = this.createGroupModal + .locator(".error-message") + .locator("p"); + this.errorUsersCreateGroupModal = this.createGroupModal.getByTestId( + "text-error-create-group", + ); + this.singleUser = this.createGroupUsersList.getByTestId("single-user"); + this.singleUserProfilePicture; + this.singleUserProfilePictureIdenticon; + this.singleUserProfilePictureImage; + this.singleUserStatusIndicator; + this.singleUserUserInfo; + this.singleUserName; + this.singleUserKey; + this.singleUserCheckbox; + } + + async createGroupChat(name: string, users: string[]) { + await this.createGroupModal.waitFor({ state: "attached" }); + await this.createGroupInputGroupName.fill(name); + await this.selectUser(users); + await this.createGroupButton.click(); + } + + async exitCreateGroup(): Promise { + await this.page.mouse.click(0, 0); + } + + async selectUser(users: string[]) { + for (const user of users) { + const userCheckbox = this.page + .locator(`[data-cy="single-user-name"]`) + .filter({ hasText: user }) + .locator("xpath=..") + .locator("xpath=..") + .getByTestId("single-user-checkbox"); + await userCheckbox.click(); + } + } +} diff --git a/playwright/PageObjects/MainPage.ts b/playwright/PageObjects/MainPage.ts index db8106a..68b49fe 100644 --- a/playwright/PageObjects/MainPage.ts +++ b/playwright/PageObjects/MainPage.ts @@ -20,6 +20,9 @@ export default class MainPage { readonly chatPreviewPicture: Locator; readonly chatPreviewPictureIdenticon: Locator; readonly chatPreviewPictureImage: Locator; + readonly chatPreviewPictureMany: Locator; + readonly chatPreviewPictureSingle: Locator; + readonly chatPreviewPictureSingleImage: Locator; readonly chatPreviewStatusIndicator: Locator; readonly chatPreviewTimestamp: Locator; readonly favoriteCircle: Locator; @@ -72,6 +75,12 @@ export default class MainPage { this.chatPreviewPictureIdenticon = this.chatPreviewPicture.locator(".identicon img"); this.chatPreviewPictureImage = this.chatPreviewPicture.locator("img"); + this.chatPreviewPictureMany = this.page.getByTestId("profile-picture-many"); + this.chatPreviewPictureSingle = this.page.getByTestId( + "profile-picture-many-single-pic", + ); + this.chatPreviewPictureSingleImage = + this.chatPreviewPictureSingle.locator("img"); this.chatPreviewStatusIndicator = this.chatPreview.getByTestId("status-indicator"); this.chatPreviewTimestamp = this.page.getByTestId("chat-preview-timestamp"); @@ -230,6 +239,14 @@ export default class MainPage { await this.buttonSettings.first().click(); } + async goToSidebarChat(chatName: string) { + const chatPreviewLocator = this.page + .getByTestId("chat-preview-name") + .filter({ hasText: chatName }) + .locator("xpath=../../.."); + await chatPreviewLocator.click(); + } + async goToWallet() { await this.dismissAddSomeoneOnMobile(); await this.clickOnShowSidebarIfClosed(); @@ -346,7 +363,35 @@ export default class MainPage { .textContent(); const statusIndicator = chatPreviewLocator.getByTestId("status-indicator"); expect(text).toEqual(expectedText); - expect(timestamp).toEqual("just now"); + expect(timestamp).toMatch(/just now|1 minute ago/); expect(statusIndicator).toHaveClass(/.*\bonline\b.*/); } + + async validateChatPreviewMessageTextGroup( + chatName: string, + expectedText: string, + numberOfParticipants: number, + ) { + const chatPreviewLocator = this.page + .getByTestId("chat-preview-name") + .filter({ hasText: chatName }) + .locator("xpath=../../.."); + const text = await chatPreviewLocator + .getByTestId("chat-preview-last-message") + .textContent(); + const timestamp = await chatPreviewLocator + .getByTestId("chat-preview-timestamp") + .textContent(); + const profilePictureGroup = await chatPreviewLocator.getByTestId( + "profile-picture-many", + ); + const singleProfilePictures = await chatPreviewLocator.getByTestId( + "profile-picture-many-single-pic", + ); + const numberOfProfilePictures = await singleProfilePictures.count(); + expect(numberOfProfilePictures).toBe(numberOfParticipants); + expect(text).toEqual(expectedText); + expect(timestamp).toEqual("just now"); + await expect(profilePictureGroup).toBeVisible(); + } } diff --git a/playwright/fixtures/setup.ts b/playwright/fixtures/setup.ts index 1d639b5..d3c726b 100644 --- a/playwright/fixtures/setup.ts +++ b/playwright/fixtures/setup.ts @@ -5,7 +5,7 @@ import { type Page, } from "@playwright/test"; import { AuthNewAccount } from "../PageObjects/AuthNewAccount"; -import { ChatsMainPage } from "../PageObjects/ChatsMain"; +import { ChatsMainPage } from "../PageObjects/ChatsElements/ChatsMain"; import { CreateOrImportPage } from "../PageObjects/CreateOrImport"; import { LoginPinPage } from "../PageObjects/LoginPin"; import { SaveRecoverySeedPage } from "../PageObjects/SaveRecoverySeed"; @@ -32,6 +32,11 @@ type MyFixtures = { page: Page; viewport: string; }; + thirdUserContext: { + context: BrowserContext; + page: Page; + viewport: string; + }; }; // Extend base test by providing page object classes as fixtures. @@ -207,6 +212,51 @@ export const test = base.extend({ await context.clearPermissions(); await context.close(); }, + + thirdUserContext: async ({}, use, testInfo) => { + // Declare all constants required for the precondition steps + const browser = await chromium.launch(); + const context = await browser.newContext(); + const page = await context.newPage(); + const viewport = testInfo.project.name; + const createOrImport = new CreateOrImportPage(page, viewport); + const authNewAccount = new AuthNewAccount(page, viewport); + const loginPinPage = new LoginPinPage(page, viewport); + const saveRecoverySeed = new SaveRecoverySeedPage(page, viewport); + const username: string = "ChatUserC"; + const status: string = "status from third user"; + + // Start browser one + await createOrImport.navigateTo(); + + // Click on Create New Account + await createOrImport.clickCreateNewAccount(); + + // Enter username and Status and click on create account + await authNewAccount.validateLoadingHeader(); + await authNewAccount.typeOnUsername(username); + await authNewAccount.typeOnStatus(status); + await authNewAccount.clickOnCreateAccount(); + + // Enter Pin + await loginPinPage.waitUntilPageIsLoaded(); + await loginPinPage.enterDefaultPin(); + + // Click on I Saved It + await saveRecoverySeed.clickOnSavedIt(); + + // Pass the context, browser, and page to the test + await use({ + context, + page, + viewport, + }); + + // Close the context and browser after the test is done + await context.clearCookies(); + await context.clearPermissions(); + await context.close(); + }, }); export { expect } from "@playwright/test"; diff --git a/playwright/specs/01-pin-input.spec.ts b/playwright/specs/01-pin-input.spec.ts index d741050..be985ea 100644 --- a/playwright/specs/01-pin-input.spec.ts +++ b/playwright/specs/01-pin-input.spec.ts @@ -4,7 +4,7 @@ import { faker } from "@faker-js/faker"; import { AuthNewAccount } from "playwright/PageObjects/AuthNewAccount"; import { LoginPinPage } from "playwright/PageObjects/LoginPin"; import { SaveRecoverySeedPage } from "playwright/PageObjects/SaveRecoverySeed"; -import { ChatsMainPage } from "playwright/PageObjects/ChatsMain"; +import { ChatsMainPage } from "playwright/PageObjects/ChatsElements/ChatsMain"; import { SettingsProfile } from "playwright/PageObjects/Settings/SettingsProfile"; test.describe("Create Account and Login Tests", () => { diff --git a/playwright/specs/02-friends-one-instance.spec.ts b/playwright/specs/02-friends-one-instance.spec.ts index ced9505..b325906 100644 --- a/playwright/specs/02-friends-one-instance.spec.ts +++ b/playwright/specs/02-friends-one-instance.spec.ts @@ -1,4 +1,4 @@ -import { ChatsMainPage } from "playwright/PageObjects/ChatsMain"; +import { ChatsMainPage } from "playwright/PageObjects/ChatsElements/ChatsMain"; import { test, expect } from "../fixtures/setup"; import { FriendsScreen } from "playwright/PageObjects/FriendsScreen"; diff --git a/playwright/specs/03-friends-two-instances.spec.ts b/playwright/specs/03-friends-two-instances.spec.ts index 0911320..3d6f836 100644 --- a/playwright/specs/03-friends-two-instances.spec.ts +++ b/playwright/specs/03-friends-two-instances.spec.ts @@ -1,4 +1,4 @@ -import { ChatsMainPage } from "playwright/PageObjects/ChatsMain"; +import { ChatsMainPage } from "playwright/PageObjects/ChatsElements/ChatsMain"; import { FilesPage } from "playwright/PageObjects/FilesScreen"; import { FriendsScreen } from "playwright/PageObjects/FriendsScreen"; import { QuickProfile } from "playwright/PageObjects/QuickProfile"; @@ -12,9 +12,11 @@ import { GifPicker } from "playwright/PageObjects/ChatsElements/GifPicker"; import { StickerPicker } from "playwright/PageObjects/ChatsElements/StickerPicker"; import { CallScreen } from "playwright/PageObjects/CallElements/CallScreen"; import { IncomingCall } from "playwright/PageObjects/CallElements/IncomingCall"; +import { CreateGroupModal } from "playwright/PageObjects/ChatsElements/CreateGroupModal"; const username = "ChatUserA"; const usernameTwo = "ChatUserB"; +const usernameThree = "ChatUserC"; type reactionContainer = { emoji: string; count: string }[]; test.describe("Two instances tests - Friends and Chats", () => { @@ -1998,6 +2000,112 @@ test.describe("Two instances tests - Friends and Chats", () => { await chatsMainPageSecond.exitCallSettings(); await callScreenSecondUser.endCall(); }); + + test("Group Chats - Create a group with 3 people and send/receive text message flow", async ({ + firstUserContext, + secondUserContext, + thirdUserContext, + }) => { + // Declare constants required from the fixtures + const context1 = firstUserContext.context; + const context2 = secondUserContext.context; + const page1 = firstUserContext.page; + const page2 = secondUserContext.page; + const page3 = thirdUserContext.page; + const viewport = firstUserContext.viewport; + const friendsScreenFirst = new FriendsScreen(page1, viewport); + const friendsScreenSecond = new FriendsScreen(page2, viewport); + const friendsScreenThird = new FriendsScreen(page3, viewport); + const chatsMainPageFirst = new ChatsMainPage(page1, viewport); + const chatsMainPageSecond = new ChatsMainPage(page2, viewport); + const chatsMainPageThird = new ChatsMainPage(page3, viewport); + const createGroupThird = new CreateGroupModal(page3, viewport); + + // Setup accounts for testing + await setupThreeChats( + chatsMainPageFirst, + chatsMainPageSecond, + chatsMainPageThird, + context1, + context2, + friendsScreenFirst, + friendsScreenSecond, + friendsScreenThird, + page1, + page2, + ); + + // Click on Create Group Chat to open modal + await chatsMainPageThird.clickOnCreateGroupChat(); + + // Validate that group without members cannot be created + await createGroupThird.createGroupChat("", []); + await expect(createGroupThird.errorUsersCreateGroupModal).toBeVisible(); + await expect(createGroupThird.errorUsersCreateGroupModal).toHaveText( + "No members selected", + ); + + // Validate that group without name cannot be created + await createGroupThird.createGroupChat("", ["ChatUserA", "ChatUserB"]); + await expect(createGroupThird.errorNameCreateGroupModal).toBeVisible(); + await expect(createGroupThird.errorNameCreateGroupModal).toHaveText( + "Please insert group name", + ); + + await createGroupThird.selectUser(["ChatUserA", "ChatUserB"]); + + await createGroupThird.createGroupChat("Group Chat 1", [ + "ChatUserA", + "ChatUserB", + ]); + + // Validate sidebar previews + await chatsMainPageThird.validateChatPreviewMessageTextGroup( + "Group Chat 1", + "No messages sent yet.", + 3, + ); + + await chatsMainPageFirst.validateChatPreviewMessageTextGroup( + "Group Chat 1", + "No messages sent yet.", + 3, + ); + await chatsMainPageSecond.validateChatPreviewMessageTextGroup( + "Group Chat 1", + "No messages sent yet.", + 3, + ); + + // Send a message to the group + await chatsMainPageThird.sendMessage("Hello Group"); + await chatsMainPageThird.validateMessageIsSent("Hello Group"); + await chatsMainPageFirst.goToSidebarChat("Group Chat 1"); + await chatsMainPageFirst.validateMessageIsReceived("Hello Group"); + await chatsMainPageSecond.goToSidebarChat("Group Chat 1"); + await chatsMainPageSecond.validateMessageIsReceived("Hello Group"); + + // Validate sidebar previews after sending group message + await chatsMainPageThird.validateChatPreviewMessageTextGroup( + "Group Chat 1", + "Hello Group", + 3, + ); + + await chatsMainPageFirst.clickOnShowSidebarIfClosed(); + await chatsMainPageFirst.validateChatPreviewMessageTextGroup( + "Group Chat 1", + "Hello Group", + 3, + ); + + await chatsMainPageSecond.clickOnShowSidebarIfClosed(); + await chatsMainPageSecond.validateChatPreviewMessageTextGroup( + "Group Chat 1", + "Hello Group", + 3, + ); + }); }); async function setupChats( @@ -2047,3 +2155,92 @@ async function setupChats( await friendsScreenSecond.goToAllFriendsList(); await friendsScreenSecond.chatWithFriend(username); } + +async function setupThreeChats( + chatsMainPageFirst: ChatsMainPage, + chatsMainPageSecond: ChatsMainPage, + chatsMainPageThird: ChatsMainPage, + context1: BrowserContext, + context2: BrowserContext, + friendsScreenFirst: FriendsScreen, + friendsScreenSecond: FriendsScreen, + friendsScreenThird: FriendsScreen, + page1: Page, + page2: Page, +) { + // With both users go to Friends Screen + await chatsMainPageFirst.dismissDownloadAlert(); + await chatsMainPageSecond.dismissDownloadAlert(); + await chatsMainPageThird.dismissDownloadAlert(); + await chatsMainPageFirst.goToFriends(); + await chatsMainPageSecond.goToFriends(); + await chatsMainPageThird.goToFriends(); + + // On user one - Grant clipboard permissions, Copy DID and save it into a constant + await context1.grantPermissions(["clipboard-read", "clipboard-write"]); + await friendsScreenFirst.copyDIDFromContextMenu(); + const handleOne = await page1.evaluateHandle(() => + navigator.clipboard.readText(), + ); + const didKeyFirstUser = await handleOne.jsonValue(); + + // On user two - Grant clipboard permissions, Copy DID and save it into a constant + await context2.grantPermissions(["clipboard-read", "clipboard-write"]); + await friendsScreenSecond.copyDIDFromContextMenu(); + const handleTwo = await page2.evaluateHandle(() => + navigator.clipboard.readText(), + ); + const didKeySecondUser = await handleTwo.jsonValue(); + + // Steps to User C to add User A as a friend + // Now, add the first user as a friend + await friendsScreenThird.addFriend(didKeyFirstUser); + + // H6 - Toast Notification with Your request is making it's way! should appear after sending a friend request + await friendsScreenThird.validateToastRequestSent(); + await friendsScreenFirst.waitForToastNotificationToDisappear(); + await friendsScreenThird.waitForToastNotificationToDisappear(); + + // With First User, go to requests list and accept friend request + await friendsScreenFirst.goToRequestList(); + await friendsScreenFirst.validateIncomingRequestExists(); + await friendsScreenFirst.acceptFriendRequest(usernameThree); + + // With First User, go to All Friends and click on Chat Button + await friendsScreenFirst.goToAllFriendsList(); + await friendsScreenFirst.chatWithFriend(usernameThree); + + // With Third User, go to All Friends and click on Chat Button + await friendsScreenThird.goToRequestList(); + await friendsScreenThird.goToAllFriendsList(); + await friendsScreenThird.chatWithFriend(username); + + // Steps to User C to add User B as a friend + // Now, third user adds the first user as a friend + await chatsMainPageThird.goToFriends(); + await friendsScreenThird.addFriend(didKeySecondUser); + + // H6 - Toast Notification with Your request is making it's way! should appear after sending a friend request + await friendsScreenThird.validateToastRequestSent(); + await friendsScreenSecond.waitForToastNotificationToDisappear(); + await friendsScreenThird.waitForToastNotificationToDisappear(); + + // With Second User, go to requests list and accept friend request + await friendsScreenSecond.goToRequestList(); + await friendsScreenSecond.validateIncomingRequestExists(); + await friendsScreenSecond.acceptFriendRequest(usernameThree); + + // With Second User, go to All Friends and click on Chat Button + await friendsScreenSecond.goToAllFriendsList(); + await friendsScreenSecond.chatWithFriend(usernameThree); + + // With Second User, go to All Friends and click on Chat Button + await friendsScreenThird.goToRequestList(); + await friendsScreenThird.goToAllFriendsList(); + await friendsScreenThird.chatWithFriend(usernameTwo); + + // Show sidebar if closed + await chatsMainPageFirst.clickOnShowSidebarIfClosed(); + await chatsMainPageSecond.clickOnShowSidebarIfClosed(); + await chatsMainPageThird.clickOnShowSidebarIfClosed(); +} diff --git a/playwright/specs/04-friends-three-instances.spec.ts b/playwright/specs/04-friends-three-instances.spec.ts deleted file mode 100644 index 96dbba2..0000000 --- a/playwright/specs/04-friends-three-instances.spec.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { test } from "../fixtures/setup"; - -test.describe("Friends tests", () => { - /* - test.skip("H9 - Search Friends tests", async ({ - friendsScreenFirst, - friendsScreenSecond, - friendsScreenThird, - }) => { - // H9 - Highlighted border should appear when clicking into the Search Friends input box - }); - - test.skip("H11, H12, H13, H14 - Friend Lists are sorted alphabetically", async ({ - friendsScreenFirst, - friendsScreenSecond, - friendsScreenThird, - }) => { - // H11 - Friends should be listed in alphabetical order - // H12 - Incoming friend requests should be listed by Newest to Oldest - // H13 - Outgoing friend requests should be listed by last sent - // H14 - Blocked users should be displayed alphabetically - }); - */ -}); diff --git a/playwright/specs/05-chats-sidebar.spec.ts b/playwright/specs/05-chats-sidebar.spec.ts index 3b9049e..2df60b5 100644 --- a/playwright/specs/05-chats-sidebar.spec.ts +++ b/playwright/specs/05-chats-sidebar.spec.ts @@ -1,5 +1,6 @@ -import { ChatsMainPage } from "playwright/PageObjects/ChatsMain"; +import { ChatsMainPage } from "playwright/PageObjects/ChatsElements/ChatsMain"; import { test, expect } from "../fixtures/setup"; +import { CreateGroupModal } from "playwright/PageObjects/ChatsElements/CreateGroupModal"; test.describe("Chats Sidebar Tests", () => { test.beforeEach(async ({ singleUserContext }) => { @@ -15,20 +16,22 @@ test.describe("Chats Sidebar Tests", () => { const page = singleUserContext.page; const viewport = singleUserContext.viewport; const chatsMainPage = new ChatsMainPage(page, viewport); + const createGroupModal = new CreateGroupModal(page, viewport); - await chatsMainPage.buttonCreateGroupChat.click(); - await expect(chatsMainPage.createGroupLabelGroupName).toBeVisible(); - await expect(chatsMainPage.createGroupLabelGroupName).toHaveText( + await chatsMainPage.clickOnCreateGroupChat(); + + await expect(createGroupModal.createGroupLabelGroupName).toBeVisible(); + await expect(createGroupModal.createGroupLabelGroupName).toHaveText( "Group name:", ); - await expect(chatsMainPage.createGroupInputGroupName).toBeVisible(); - await expect(chatsMainPage.createGroupLabelGroupMembers).toHaveText( + await expect(createGroupModal.createGroupInputGroupName).toBeVisible(); + await expect(createGroupModal.createGroupLabelGroupMembers).toHaveText( "Group members:", ); - await expect(chatsMainPage.createGroupLabelSelectMembers).toHaveText( + await expect(createGroupModal.createGroupLabelSelectMembers).toHaveText( "Select member(s)", ); - await expect(chatsMainPage.createGroupButton).toBeVisible(); + await expect(createGroupModal.createGroupButton).toBeVisible(); }); test("C2 - Hovering over Create Chat should show tooltips", async ({ diff --git a/playwright/specs/07-settings-profile.spec.ts b/playwright/specs/07-settings-profile.spec.ts index a8c378d..ded6af2 100644 --- a/playwright/specs/07-settings-profile.spec.ts +++ b/playwright/specs/07-settings-profile.spec.ts @@ -1,4 +1,4 @@ -import { ChatsMainPage } from "playwright/PageObjects/ChatsMain"; +import { ChatsMainPage } from "playwright/PageObjects/ChatsElements/ChatsMain"; import { test, expect } from "../fixtures/setup"; import { SettingsProfile } from "playwright/PageObjects/Settings/SettingsProfile"; diff --git a/playwright/specs/08-settings-inventory.spec.ts b/playwright/specs/08-settings-inventory.spec.ts index 0fd4d29..f80c16b 100644 --- a/playwright/specs/08-settings-inventory.spec.ts +++ b/playwright/specs/08-settings-inventory.spec.ts @@ -1,6 +1,6 @@ import { SettingsProfile } from "playwright/PageObjects/Settings/SettingsProfile"; import { test, expect } from "../fixtures/setup"; -import { ChatsMainPage } from "playwright/PageObjects/ChatsMain"; +import { ChatsMainPage } from "playwright/PageObjects/ChatsElements/ChatsMain"; import { SettingsInventory } from "playwright/PageObjects/Settings/SettingsInventory"; test.describe("Settings Inventory Tests", () => { diff --git a/playwright/specs/09-settings-customizations.spec.ts b/playwright/specs/09-settings-customizations.spec.ts index 03f4b04..de98cea 100644 --- a/playwright/specs/09-settings-customizations.spec.ts +++ b/playwright/specs/09-settings-customizations.spec.ts @@ -1,4 +1,4 @@ -import { ChatsMainPage } from "playwright/PageObjects/ChatsMain"; +import { ChatsMainPage } from "playwright/PageObjects/ChatsElements/ChatsMain"; import { test, expect } from "../fixtures/setup"; import { SettingsProfile } from "playwright/PageObjects/Settings/SettingsProfile"; import { SettingsCustomizations } from "playwright/PageObjects/Settings/SettingsCustomizations"; diff --git a/playwright/specs/10-settings-messages.spec.ts b/playwright/specs/10-settings-messages.spec.ts index ca52b9d..e052cfd 100644 --- a/playwright/specs/10-settings-messages.spec.ts +++ b/playwright/specs/10-settings-messages.spec.ts @@ -1,4 +1,4 @@ -import { ChatsMainPage } from "playwright/PageObjects/ChatsMain"; +import { ChatsMainPage } from "playwright/PageObjects/ChatsElements/ChatsMain"; import { test, expect } from "../fixtures/setup"; import { SettingsProfile } from "playwright/PageObjects/Settings/SettingsProfile"; import { SettingsMessages } from "playwright/PageObjects/Settings/SettingsMessages"; diff --git a/playwright/specs/11-settings-audio-video.spec.ts b/playwright/specs/11-settings-audio-video.spec.ts index 684c268..2685ea0 100644 --- a/playwright/specs/11-settings-audio-video.spec.ts +++ b/playwright/specs/11-settings-audio-video.spec.ts @@ -1,4 +1,4 @@ -import { ChatsMainPage } from "playwright/PageObjects/ChatsMain"; +import { ChatsMainPage } from "playwright/PageObjects/ChatsElements/ChatsMain"; import { test, expect } from "../fixtures/setup"; import { SettingsProfile } from "playwright/PageObjects/Settings/SettingsProfile"; import { SettingsAudio } from "playwright/PageObjects/Settings/SettingsAudio"; diff --git a/playwright/specs/12-settings-extensions.spec.ts b/playwright/specs/12-settings-extensions.spec.ts index f4137a5..db47aaa 100644 --- a/playwright/specs/12-settings-extensions.spec.ts +++ b/playwright/specs/12-settings-extensions.spec.ts @@ -1,6 +1,6 @@ import { SettingsProfile } from "playwright/PageObjects/Settings/SettingsProfile"; import { test, expect } from "../fixtures/setup"; -import { ChatsMainPage } from "playwright/PageObjects/ChatsMain"; +import { ChatsMainPage } from "playwright/PageObjects/ChatsElements/ChatsMain"; import { SettingsExtensions } from "playwright/PageObjects/Settings/SettingsExtensions"; test.describe("Settings Extensions Tests", () => { diff --git a/playwright/specs/13-settings-keybinds.spec.ts b/playwright/specs/13-settings-keybinds.spec.ts index c71832d..a0e18af 100644 --- a/playwright/specs/13-settings-keybinds.spec.ts +++ b/playwright/specs/13-settings-keybinds.spec.ts @@ -1,4 +1,4 @@ -import { ChatsMainPage } from "playwright/PageObjects/ChatsMain"; +import { ChatsMainPage } from "playwright/PageObjects/ChatsElements/ChatsMain"; import { test, expect } from "../fixtures/setup"; import { SettingsProfile } from "playwright/PageObjects/Settings/SettingsProfile"; import { SettingsKeybinds } from "playwright/PageObjects/Settings/SettingsKeybinds"; diff --git a/playwright/specs/14-settings-gamepad.spec.ts b/playwright/specs/14-settings-gamepad.spec.ts index 53b35e6..6d9dbc8 100644 --- a/playwright/specs/14-settings-gamepad.spec.ts +++ b/playwright/specs/14-settings-gamepad.spec.ts @@ -1,4 +1,4 @@ -import { ChatsMainPage } from "playwright/PageObjects/ChatsMain"; +import { ChatsMainPage } from "playwright/PageObjects/ChatsElements/ChatsMain"; import { test, expect } from "../fixtures/setup"; import { SettingsProfile } from "playwright/PageObjects/Settings/SettingsProfile"; diff --git a/playwright/specs/15-settings-accessibility.spec.ts b/playwright/specs/15-settings-accessibility.spec.ts index 0b49086..09102b0 100644 --- a/playwright/specs/15-settings-accessibility.spec.ts +++ b/playwright/specs/15-settings-accessibility.spec.ts @@ -1,4 +1,4 @@ -import { ChatsMainPage } from "playwright/PageObjects/ChatsMain"; +import { ChatsMainPage } from "playwright/PageObjects/ChatsElements/ChatsMain"; import { test, expect } from "../fixtures/setup"; import { SettingsProfile } from "playwright/PageObjects/Settings/SettingsProfile"; import { SettingsAccessibility } from "playwright/PageObjects/Settings/SettingsAccessibility"; diff --git a/playwright/specs/16-settings-notifications.spec.ts b/playwright/specs/16-settings-notifications.spec.ts index df93fec..3926c3b 100644 --- a/playwright/specs/16-settings-notifications.spec.ts +++ b/playwright/specs/16-settings-notifications.spec.ts @@ -1,4 +1,4 @@ -import { ChatsMainPage } from "playwright/PageObjects/ChatsMain"; +import { ChatsMainPage } from "playwright/PageObjects/ChatsElements/ChatsMain"; import { test, expect } from "../fixtures/setup"; import { SettingsProfile } from "playwright/PageObjects/Settings/SettingsProfile"; import { SettingsNotifications } from "playwright/PageObjects/Settings/SettingsNotifications"; diff --git a/playwright/specs/17-settings-network.spec.ts b/playwright/specs/17-settings-network.spec.ts index a454801..79a37a8 100644 --- a/playwright/specs/17-settings-network.spec.ts +++ b/playwright/specs/17-settings-network.spec.ts @@ -1,4 +1,4 @@ -import { ChatsMainPage } from "playwright/PageObjects/ChatsMain"; +import { ChatsMainPage } from "playwright/PageObjects/ChatsElements/ChatsMain"; import { test } from "../fixtures/setup"; import { SettingsProfile } from "playwright/PageObjects/Settings/SettingsProfile"; diff --git a/playwright/specs/18-settings-about.spec.ts b/playwright/specs/18-settings-about.spec.ts index de48ba2..7881c85 100644 --- a/playwright/specs/18-settings-about.spec.ts +++ b/playwright/specs/18-settings-about.spec.ts @@ -1,4 +1,4 @@ -import { ChatsMainPage } from "playwright/PageObjects/ChatsMain"; +import { ChatsMainPage } from "playwright/PageObjects/ChatsElements/ChatsMain"; import { test, expect } from "../fixtures/setup"; import { SettingsProfile } from "playwright/PageObjects/Settings/SettingsProfile"; import { SettingsAbout } from "playwright/PageObjects/Settings/SettingsAbout"; diff --git a/playwright/specs/19-settings-licenses.spec.ts b/playwright/specs/19-settings-licenses.spec.ts index 08422fc..e8b3d6d 100644 --- a/playwright/specs/19-settings-licenses.spec.ts +++ b/playwright/specs/19-settings-licenses.spec.ts @@ -1,4 +1,4 @@ -import { ChatsMainPage } from "playwright/PageObjects/ChatsMain"; +import { ChatsMainPage } from "playwright/PageObjects/ChatsElements/ChatsMain"; import { test, expect } from "../fixtures/setup"; import { SettingsProfile } from "playwright/PageObjects/Settings/SettingsProfile"; import { SettingsLicenses } from "playwright/PageObjects/Settings/SettingsLicenses"; diff --git a/playwright/specs/20-settings-developer.spec.ts b/playwright/specs/20-settings-developer.spec.ts index 5ce833a..4aad809 100644 --- a/playwright/specs/20-settings-developer.spec.ts +++ b/playwright/specs/20-settings-developer.spec.ts @@ -1,6 +1,6 @@ import { SettingsProfile } from "playwright/PageObjects/Settings/SettingsProfile"; import { test, expect } from "../fixtures/setup"; -import { ChatsMainPage } from "playwright/PageObjects/ChatsMain"; +import { ChatsMainPage } from "playwright/PageObjects/ChatsElements/ChatsMain"; import { SettingsAbout } from "playwright/PageObjects/Settings/SettingsAbout"; import { SettingsDeveloper } from "playwright/PageObjects/Settings/SettingsDeveloper"; diff --git a/playwright/specs/23-files-sidebar.spec.ts b/playwright/specs/23-files-sidebar.spec.ts index 5906b12..383c352 100644 --- a/playwright/specs/23-files-sidebar.spec.ts +++ b/playwright/specs/23-files-sidebar.spec.ts @@ -1,4 +1,4 @@ -import { ChatsMainPage } from "playwright/PageObjects/ChatsMain"; +import { ChatsMainPage } from "playwright/PageObjects/ChatsElements/ChatsMain"; import { test } from "../fixtures/setup"; test.describe("Files Sidebar Tests", () => { diff --git a/playwright/specs/24-files.spec.ts b/playwright/specs/24-files.spec.ts index 673c1f4..36b6e5f 100644 --- a/playwright/specs/24-files.spec.ts +++ b/playwright/specs/24-files.spec.ts @@ -1,4 +1,4 @@ -import { ChatsMainPage } from "playwright/PageObjects/ChatsMain"; +import { ChatsMainPage } from "playwright/PageObjects/ChatsElements/ChatsMain"; import { test, expect } from "../fixtures/setup"; import { FilesPage } from "playwright/PageObjects/FilesScreen"; import { SettingsProfile } from "playwright/PageObjects/Settings/SettingsProfile"; diff --git a/playwright/specs/25-wallet.spec.ts b/playwright/specs/25-wallet.spec.ts index 0df9d9b..449e398 100644 --- a/playwright/specs/25-wallet.spec.ts +++ b/playwright/specs/25-wallet.spec.ts @@ -1,4 +1,4 @@ -import { ChatsMainPage } from "playwright/PageObjects/ChatsMain"; +import { ChatsMainPage } from "playwright/PageObjects/ChatsElements/ChatsMain"; import { test } from "../fixtures/setup"; test.describe("Wallet Tests", () => {