Skip to content

Commit b34ba25

Browse files
committed
refactor: rename menu item accessors for E2E encryption in toolbar and page objects
1 parent 214ec07 commit b34ba25

3 files changed

Lines changed: 5 additions & 9 deletions

File tree

apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ test.describe('E2EE Encrypted Channels', () => {
5252
await toastMessages.dismissToast();
5353

5454
await poHomeChannel.roomToolbar.openMoreOptions();
55-
await poHomeChannel.roomToolbar.menuItemDisabledE2EEncryption.click();
55+
await poHomeChannel.roomToolbar.menuItemDisableE2EEncryption.click();
5656
await expect(page.getByRole('dialog', { name: 'Disable encryption' })).toBeVisible();
5757
await page.getByRole('button', { name: 'Disable encryption' }).click();
5858
await poHomeChannel.toastMessage.dismissToast();

apps/meteor/tests/e2e/page-objects/encrypted-room.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ export class EncryptedRoomPage extends HomeContent {
3232
const enableRoomEncryptionModal = new EnableRoomEncryptionModal(this.page);
3333

3434
await this.toolbar.openMoreOptions();
35-
await this.toolbar.btnEnableE2EEncryption.click();
35+
await this.toolbar.menuItemEnableE2EEncryption.click();
3636
await enableRoomEncryptionModal.enable();
3737
}
3838

3939
async disableEncryption() {
4040
const disableRoomEncryptionModal = new DisableRoomEncryptionModal(this.page);
4141

4242
await this.toolbar.openMoreOptions();
43-
await this.toolbar.menuItemDisabledE2EEncryption.click();
43+
await this.toolbar.menuItemDisableE2EEncryption.click();
4444
await disableRoomEncryptionModal.disable();
4545
}
4646

apps/meteor/tests/e2e/page-objects/fragments/toolbar.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export class RoomToolbar extends Toolbar {
8787
return this.menu.getMenuItem('Notifications Preferences');
8888
}
8989

90-
get menuItemDisabledE2EEncryption(): Locator {
90+
get menuItemDisableE2EEncryption(): Locator {
9191
return this.menu.getMenuItem('Disable E2E encryption');
9292
}
9393

@@ -142,11 +142,7 @@ export class TeamToolbar extends RoomToolbar {
142142
}
143143
}
144144

145-
export class EncryptedRoomToolbar extends RoomToolbar {
146-
get btnEnableE2EEncryption(): Locator {
147-
return this.root.getByRole('button', { name: 'Enable E2E encryption' });
148-
}
149-
}
145+
export class EncryptedRoomToolbar extends RoomToolbar {}
150146

151147
export class OmnichannelRoomToolbar extends RoomToolbar {
152148
private get btnContactInfo(): Locator {

0 commit comments

Comments
 (0)