Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Fix messaging flaky e2e test #32429

Merged
merged 2 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -259,7 +259,7 @@ test.describe.serial('channel-management', () => {
await expect(page.getByRole('navigation')).toBeVisible();
});

test('should info contextualbar when clicking on roomName', async ({ page }) => {
test('should open room info when clicking on roomName', async ({ page }) => {
await poHomeChannel.sidenav.openChat(targetChannel);
await page.getByRole('button', { name: targetChannel }).first().focus();
await page.keyboard.press('Space');
Expand Down
4 changes: 2 additions & 2 deletions apps/meteor/tests/e2e/messaging.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ test.describe.serial('Messaging', () => {
await expect(page.locator('[data-qa-type="message"]').last()).not.toBeFocused();
});

test('should focus on the recent message when moving the focus on the list and theres no previous focus', async ({ page }) => {
test('should focus the latest message when moving the focus on the list and theres no previous focus', async ({ page }) => {
await poHomeChannel.sidenav.openChat(targetChannel);
await page.getByRole('button', { name: targetChannel }).first().focus();

Expand All @@ -115,7 +115,7 @@ test.describe.serial('Messaging', () => {
await page.keyboard.press('Tab');
await expect(page.locator('[data-qa-type="message"]').last()).toBeFocused();

await page.getByRole('button', { name: targetChannel }).first().click();
await page.getByRole('button', { name: targetChannel }).first().focus();

// move focus to the list again
await page.keyboard.press('Tab');
Expand Down
Loading