Skip to content

Commit dd56c98

Browse files
authored
test: Enforce exact match for button locators in team modal (RocketChat#40104)
1 parent cd79677 commit dd56c98

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

apps/meteor/tests/e2e/page-objects/fragments/flextabs/channels-flextab.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class AddExistingChannelModal extends Modal {
1515
}
1616

1717
get btnAdd(): Locator {
18-
return this.root.getByRole('button', { name: 'Add' });
18+
return this.root.getByRole('button', { name: 'Add', exact: true });
1919
}
2020

2121
async confirmAdd() {
@@ -42,11 +42,11 @@ export class ChannelsFlexTab extends FlexTab {
4242
}
4343

4444
get btnAddExisting(): Locator {
45-
return this.root.getByRole('button', { name: 'Add Existing' });
45+
return this.root.getByRole('button', { name: 'Add Existing', exact: true });
4646
}
4747

4848
get btnCreateNew(): Locator {
49-
return this.root.getByRole('button', { name: 'Create new' });
49+
return this.root.getByRole('button', { name: 'Create new', exact: true });
5050
}
5151

5252
get channelsList(): Locator {

0 commit comments

Comments
 (0)