diff --git a/apps/meteor/tests/e2e/page-objects/fragments/home-flextab-room.ts b/apps/meteor/tests/e2e/page-objects/fragments/home-flextab-room.ts index 61d5ca5945d5..dff205812555 100644 --- a/apps/meteor/tests/e2e/page-objects/fragments/home-flextab-room.ts +++ b/apps/meteor/tests/e2e/page-objects/fragments/home-flextab-room.ts @@ -7,28 +7,20 @@ export class HomeFlextabRoom { this.page = page; } - get roomInfoTab(): Locator { - return this.page.getByRole('dialog', { exact: true }); - } - get btnEdit(): Locator { return this.page.locator('role=button[name="Edit"]'); } - get btnMore(): Locator { - return this.page.locator('role=button[name="More"]'); - } - get btnLeave(): Locator { - return this.roomInfoTab.locator('role=button[name="Leave"]'); + return this.page.locator('role=button[name="Leave"]'); } - get btnDelete(): Locator { - return this.roomInfoTab.locator('role=button[name="Delete"]'); + get btnMore(): Locator { + return this.page.locator('role=button[name="More"]'); } getMoreOption(option: string) { - return this.roomInfoTab.locator(`role=menuitem[name="${option}"]`); + return this.page.locator(`role=menuitem[name="${option}"]`); } get confirmLeaveModal(): Locator { diff --git a/apps/meteor/tests/e2e/team-management.spec.ts b/apps/meteor/tests/e2e/team-management.spec.ts index 8f365a84558c..8883defab7ef 100644 --- a/apps/meteor/tests/e2e/team-management.spec.ts +++ b/apps/meteor/tests/e2e/team-management.spec.ts @@ -378,7 +378,8 @@ test.describe.serial('teams-management', () => { test('should delete targetTeamNonPrivate', async () => { await poHomeTeam.sidenav.openChat(targetTeamNonPrivate); await poHomeTeam.tabs.btnRoomInfo.click(); - await poHomeTeam.tabs.room.btnDelete.click(); + await poHomeTeam.tabs.room.btnMore.click(); + await poHomeTeam.tabs.room.getMoreOption('Delete').click(); await expect(poHomeTeam.tabs.room.confirmDeleteTeamModal).toBeVisible(); await poHomeTeam.tabs.room.confirmDeleteTeam(); @@ -406,11 +407,11 @@ test.describe.serial('teams-management', () => { await expect(poHomeTeam.tabs.members.memberOption('user1')).not.toBeVisible(); }); - test('should convert team into a channel', async ({ page }) => { + test('should convert team into a channel', async () => { await poHomeTeam.sidenav.openChat(targetTeam); await poHomeTeam.tabs.btnRoomInfo.click(); await poHomeTeam.tabs.room.btnMore.click(); - await page.getByRole('listbox', { exact: true }).getByRole('option', { name: 'Convert to Channel' }).click(); + await poHomeTeam.tabs.room.getMoreOption('Convert to Channel').click(); await expect(poHomeTeam.tabs.room.confirmConvertModal).toBeVisible(); await poHomeTeam.tabs.room.confirmConvert();