Skip to content

Commit

Permalink
fix test selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
juliajforesti committed Mar 25, 2024
1 parent 3c9121f commit 91337de
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion apps/meteor/tests/e2e/channel-management.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ test.describe.serial('channel-management', () => {
await poHomeChannel.sidenav.openChat(targetChannel);
await poHomeChannel.content.btnMenuMoreActions.click();
await page.getByRole('menuitem', { name: 'Discussion' }).click();
await page.getByRole('textbox', { name: 'Discussion name' }).fill(discussionName);
await page.getByRole('textbox', { name: 'Name' }).fill(discussionName);
await page.getByRole('button', { name: 'Create' }).click();

await expect(page.getByRole('heading', { name: discussionName })).toBeVisible();
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/tests/e2e/create-direct.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ test.describe.serial('channel-direct-message', () => {
});

test('expect create a direct room', async ({ page }) => {
await poHomeChannel.sidenav.openNewByLabel('Direct messages');
await poHomeChannel.sidenav.openNewByLabel('Direct message');

await poHomeChannel.sidenav.inputDirectUsername.click();
await page.keyboard.type('rocket.cat');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class HomeFlextabRoom {
}

get checkboxReadOnly(): Locator {
return this.page.locator('label', { has: this.page.getByRole('checkbox', { name: 'Read Only' }) });
return this.page.locator('label', { has: this.page.getByRole('checkbox', { name: 'Read-only' }) });
}

get btnSave(): Locator {
Expand Down
4 changes: 2 additions & 2 deletions apps/meteor/tests/e2e/page-objects/fragments/home-sidenav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ export class HomeSidenav {
}

get checkboxEncryption(): Locator {
return this.page.locator('role=dialog[name="Create Channel"] >> label >> text="Encrypted"');
return this.page.locator('role=dialog[name="Create channel"] >> label >> text="Encrypted"');
}

get checkboxReadOnly(): Locator {
return this.page.locator('label', { has: this.page.getByRole('checkbox', { name: 'Read Only' }) });
return this.page.locator('label', { has: this.page.getByRole('checkbox', { name: 'Read-only' }) });
}

get inputChannelName(): Locator {
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/tests/e2e/page-objects/home-discussion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class HomeDiscussion {
}

get inputName(): Locator {
return this.page.locator('role=textbox[name="Discussion name"]');
return this.page.locator('role=textbox[name="Name"]');
}

get inputMessage(): Locator {
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/tests/e2e/page-objects/home-team.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ export class HomeTeam {
}

get textReadOnly(): Locator {
return this.page.locator('label', {has: this.page.getByRole('checkbox', {name: 'Read Only'})});
return this.page.locator('label', {has: this.page.getByRole('checkbox', {name: 'Read-only'})});
}
}

0 comments on commit 91337de

Please sign in to comment.