Skip to content

test: Automated tests verifying presence of typing indicator.#38488

Merged
kodiakhq[bot] merged 13 commits intodevelopfrom
typing-indicator
Feb 9, 2026
Merged

test: Automated tests verifying presence of typing indicator.#38488
kodiakhq[bot] merged 13 commits intodevelopfrom
typing-indicator

Conversation

@Harmeet221
Copy link
Contributor

@Harmeet221 Harmeet221 commented Feb 4, 2026

JIRA TASK: https://rocketchat.atlassian.net/browse/QA-110

Description:
This PR verifies that the typing indicator is correctly displayed for both agents and visitors when either party starts typing.

Proposed changes (including videos or screenshots)

Issue(s)

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Tests
    • Added end-to-end tests validating live chat typing indicators in both directions, including setup, interaction flows, visibility assertions, and cleanup.
  • New Features
    • Typing indicators gain explicit accessibility roles and localized, username-aware plural labels.
  • Localization
    • Removed legacy per-language typing keys and introduced a pluralized username typing string in English.
  • Bug Fixes
    • Improved upload error detection so error states are surfaced more reliably.

@Harmeet221 Harmeet221 requested a review from a team as a code owner February 4, 2026 07:48
@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Feb 4, 2026

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is targeting the wrong base branch. It should target 8.2.0, but it targets 8.1.0

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Feb 4, 2026

⚠️ No Changeset found

Latest commit: 3e39486

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 4, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds an E2E Playwright test for Omnichannel livechat typing indicators, exposes typing-indicator locators in page objects, makes typing indicators i18n-aware, moves relevant elements to role="status" for accessibility, and removes many per-locale typing keys from i18n files.

Changes

Cohort / File(s) Summary
E2E test spec
apps/meteor/tests/e2e/omnichannel/omnichannel-livechat-typing-indicator.spec.ts
New serial Playwright test that creates an agent, sets up visitor/agent contexts, and asserts typing-indicator visibility in both directions (visitor→agent and agent→visitor).
E2E page objects
apps/meteor/tests/e2e/page-objects/omnichannel/omnichannel-livechat.ts, apps/meteor/tests/e2e/page-objects/fragments/composer.ts, apps/meteor/tests/e2e/page-objects/home-channel.ts
Added getters returning Locators for typing indicators (typingIndicatorForVisitor, typingIndicator); renamed/narrowed upload status selector to statusUploadError.
Livechat UI components
packages/livechat/src/components/Messages/TypingDots/index.tsx, packages/livechat/src/components/Messages/MessageList/index.js, apps/meteor/client/views/room/composer/ComposerUserActionIndicator/ComposerUserActionIndicator.tsx
TypingDots and composer indicator now use role="status" (removed aria-live); MessageList builds an i18n-aware typing label and passes it as text to the typing indicator.
Tests adjusted
apps/meteor/tests/e2e/image-upload.spec.ts
Replaced assertion to use the narrowed statusUploadError visibility check instead of reading text from the broader indicator locator.
i18n locales (many)
packages/i18n/src/locales/*.i18n.json
Removed per-locale are_typing and is_typing keys in many locale files; English adds a pluralized __count____username___typing entry and a Date_range_presets key. See locales for specifics.

Sequence Diagram(s)

sequenceDiagram
  participant Visitor as Visitor Widget
  participant Backend as Server/API
  participant AgentHome as Omnichannel Home (Agent)
  participant AgentComposer as Agent Composer

  Visitor->>Backend: send message / typing events
  Backend->>AgentHome: deliver message & typing event
  AgentHome->>AgentComposer: render message + show i18n label
  AgentComposer->>Backend: agent typing events
  Backend->>Visitor: relay typing indicator
  Visitor->>Visitor: render typing indicator (role="status")
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I wiggle whiskers at the dots that play,
A visitor types, the agent hears the sway,
Labels chosen gently, singular or more,
Status sings aloud so screens and readers score,
Hopping happy — typing lights the way.

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning Multiple out-of-scope changes detected: removal of 'are_typing' and 'is_typing' keys from 57+ i18n locale files, architectural changes to typing indicator components (role attributes), and page object refactoring unrelated to adding the test spec itself. Separate i18n string removals and component refactoring into dedicated PRs. Keep this PR focused on the test spec implementation as indicated in the title.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main focus of the PR: adding automated tests for typing indicator presence, matching the primary changes in the spec file.
Linked Issues check ✅ Passed The PR implements automated tests verifying typing indicator display for both agents and visitors QA-110, with test logic covering both directions and visibility assertions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Harmeet221 Harmeet221 changed the title Automated tests verifying presence of typing indicator. test: Automated tests verifying presence of typing indicator. Feb 4, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 3 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="apps/meteor/tests/e2e/page-objects/fragments/home-content.ts">

<violation number="1" location="apps/meteor/tests/e2e/page-objects/fragments/home-content.ts:77">
P3: Avoid element-based selectors for scoping; use an accessible role-based locator instead to reduce fragility.</violation>
</file>

Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Ask questions if you need clarification on any suggestion

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.43%. Comparing base (13433b1) to head (3e39486).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #38488      +/-   ##
===========================================
+ Coverage    70.39%   70.43%   +0.03%     
===========================================
  Files         3162     3162              
  Lines       110650   110650              
  Branches     19862    19886      +24     
===========================================
+ Hits         77891    77933      +42     
+ Misses       30727    30692      -35     
+ Partials      2032     2025       -7     
Flag Coverage Δ
e2e 60.38% <ø> (+0.04%) ⬆️
e2e-api 48.82% <ø> (+1.00%) ⬆️
unit 71.41% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

📦 Docker Image Size Report

➡️ Changes

Service Current Baseline Change Percent
sum of all images 0B 0B 0B
account-service 0B 0B 0B
authorization-service 0B 0B 0B
ddp-streamer-service 0B 0B 0B
omnichannel-transcript-service 0B 0B 0B
presence-service 0B 0B 0B
queue-worker-service 0B 0B 0B
rocketchat 0B 0B 0B

📊 Historical Trend

---
config:
  theme: "dark"
  xyChart:
    width: 900
    height: 400
---
xychart
  title "Image Size Evolution by Service (Last 30 Days + This PR)"
  x-axis ["11/18 22:53", "11/19 23:02", "11/21 16:49", "11/24 17:34", "11/27 22:32", "11/28 19:05", "12/01 23:01", "12/02 21:57", "12/03 21:00", "12/04 18:17", "12/05 21:56", "12/08 20:15", "12/09 22:17", "12/10 23:26", "12/11 21:56", "12/12 22:45", "12/13 01:34", "12/15 22:31", "12/16 22:18", "12/17 21:04", "12/18 23:12", "12/19 23:27", "12/20 21:03", "12/22 18:54", "12/23 16:16", "12/24 19:38", "12/25 17:51", "12/26 13:18", "12/29 19:01", "12/30 20:52", "02/09 18:43 (PR)"]
  y-axis "Size (GB)" 0 --> 0.5
  line "account-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.00]
  line "authorization-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.00]
  line "ddp-streamer-service" [0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.00]
  line "omnichannel-transcript-service" [0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.00]
  line "presence-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.00]
  line "queue-worker-service" [0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.00]
  line "rocketchat" [0.35, 0.35, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.00]
Loading

Statistics (last 30 days):

  • 📊 Average: 1.5GiB
  • ⬇️ Minimum: 1.4GiB
  • ⬆️ Maximum: 1.6GiB
  • 🎯 Current PR: 0B
ℹ️ About this report

This report compares Docker image sizes from this build against the develop baseline.

  • Tag: pr-38488
  • Baseline: develop
  • Timestamp: 2026-02-09 18:43:34 UTC
  • Historical data points: 30

Updated: Mon, 09 Feb 2026 18:43:34 GMT

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="apps/meteor/tests/e2e/page-objects/fragments/home-content.ts">

<violation number="1" location="apps/meteor/tests/e2e/page-objects/fragments/home-content.ts:77">
P2: Scope this text locator to a specific container (e.g., footer) to follow the project’s locator guidelines and avoid matching unrelated "typing" text elsewhere on the page.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@Harmeet221 Harmeet221 requested a review from a team as a code owner February 4, 2026 16:28
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@packages/livechat/src/components/Messages/TypingDots/index.tsx`:
- Around line 12-20: Replace the hardcoded DEFAULT_TYPING_LABEL with the i18n
translation key in the TypingDots component: obtain the t function from the
livechat i18n setup (e.g., useTranslation or the project's i18n util) and use
t('Agent_is_typing') as the default for aria-label in TypingDots (referencing
DEFAULT_TYPING_LABEL and the TypingDots component) so the fallback respects the
user's locale; update imports to include the i18n accessor and remove the plain
string constant.

@aleksandernsilva aleksandernsilva added this to the 8.2.0 milestone Feb 6, 2026
@aleksandernsilva aleksandernsilva added the stat: QA assured Means it has been tested and approved by a company insider label Feb 6, 2026
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Feb 6, 2026
juliajforesti
juliajforesti previously approved these changes Feb 9, 2026
@aleksandernsilva aleksandernsilva marked this pull request as draft February 9, 2026 15:51
@juliajforesti juliajforesti marked this pull request as ready for review February 9, 2026 18:35
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 8 files

@kodiakhq kodiakhq bot merged commit f6bfda3 into develop Feb 9, 2026
74 of 78 checks passed
@kodiakhq kodiakhq bot deleted the typing-indicator branch February 9, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants