Skip to content

test(SDK-5618): add unit tests for timer template chronometer enhancements#984

Merged
deeksha-rgb merged 3 commits into
task/release/8.1.0from
task/SDK-5618-timer-template-tests
Apr 7, 2026
Merged

test(SDK-5618): add unit tests for timer template chronometer enhancements#984
deeksha-rgb merged 3 commits into
task/release/8.1.0from
task/SDK-5618-timer-template-tests

Conversation

@deeksha-rgb
Copy link
Copy Markdown
Contributor

Summary

Adds unit test coverage for the Timer Template chronometer enhancements introduced in SDK-5618.

TemplateDataFactoryTest.kt

  • Chronometer border radius — default 6f, custom value, invalid string fallback
  • Chronometer border width — null, custom value, invalid string fallback
  • Chronometer gradient direction — default 90.0, custom value, invalid string fallback
  • Chronometer style (ButtonStyle) — SOLID, GRADIENT_LINEAR, GRADIENT_RADIAL, null default, unknown string default
  • Chronometer colors — borderColor, bgColor, gradientColor1, gradientColor2 from colorMap
  • renderTerminal — true, false

NotificationBitmapUtilsTest.kt

  • createSolidBitmap — with/without border, null borderWidth, explicit borderWidth
  • createLinearGradientBitmap — with/without border, custom direction angle, explicit borderWidth
  • createRadialBitmap — with/without border, explicit borderWidth

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 6, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • \b(master|main|develop)(_\w*)?

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 6f9caac6-3c2b-487d-9b01-1479cca918f8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch task/SDK-5618-timer-template-tests

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.

@francispereira
Copy link
Copy Markdown

francispereira commented Apr 6, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copy link
Copy Markdown
Collaborator

@CTLalit CTLalit left a comment

Choose a reason for hiding this comment

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

No bitmap recycle after the test in teardown?

@CTLalit CTLalit force-pushed the task/SDK-5618-timer-template-tests branch from 34c004d to aca5bda Compare April 7, 2026 09:58
@deeksha-rgb deeksha-rgb merged commit 114ed7c into task/release/8.1.0 Apr 7, 2026
4 checks passed
@Anush-Shand Anush-Shand deleted the task/SDK-5618-timer-template-tests branch April 7, 2026 10:09
deeksha-rgb added a commit that referenced this pull request Apr 13, 2026
…ements (#984)

* add unit tests for timer template chronometer enhancements

* add unit tests for NotificationBitmapUtils

* recycle bitmaps in teardown to prevent memory leaks

(cherry picked from commit 114ed7c)
Anush-Shand added a commit that referenced this pull request Apr 13, 2026
* task(SDK-5545) - Vertical Template Implementation (#965)

* task(SDK-5545) - Vertical Template Implementation

* task(SDK-5618) - Fixes button layout_width

* task(SDK-5545) - Improves layout

* task(SDK-5545) - Default Alt Text Fix

* task(SDK-5545) - Adds tests for Vertical Template

* task(SDK-5545) - Adds default colours

* task(SDK-5545) - Rounded corners by default

* task(SDK-5545) - Adds pt_ prefix

* task(SDK-5545) - Code reuse

* task(SDK-5545) - Improves signature of VerticalImageButtonData

* task(SDK-5545) - Adds log for early return

* task(SDK-5545) - Accepts gradient direction in degrees for linear gradient

* task(SDK-5545) - Allows null deeplink to navigate to app by default

(cherry picked from commit e730050)

* Merge pull request #967 from CleverTap/task/SDK-5618/timer-template-d

   feat(SDK-5618): Timer Template chronometer enhancements
  - Added configurable border radius for chronometer box (pt_chrono_border_radius)
  - Added configurable border width for chronometer box (pt_chrono_border_width)
  - Added gradient support for chronometer background (pt_chrono_style, pt_chrono_grad_clr1, pt_chrono_grad_clr2, pt_chrono_grad_dir)
  - Added solid border color support (pt_chrono_border_clr)
  - Fixed border overlap bug for solid and gradient styles
  - Improved null safety (replaced !! with elvis operator for timer_end)
  - Removed unnecessary timer_container wrapper layout
  - Segmented HRS/MIN/SEC design deferred to future release (preserved on task/SDK-5618/segmented-timer-design)

(cherry picked from commit 5307b0e)

* fixed test issues

(cherry picked from commit 58b02b1)

* chore/pt - Removes api-23-checks (#975)

* chore/pt - Removes api-23-checks

* task(SDK-5658) - Vertical Template Button Click

* task(SDK-5658) - Vertical Template Button Click fix for notification clicked event

(cherry picked from commit b95190c)

* task(SDK-5544) - Adds tracking of wzrk_c2a for vertical template

(cherry picked from commit 3b597b8)

* task(SDK-5544) - PR comments

(cherry picked from commit 9be3a54)

* task(SDK-5544) - Fixes a test

(cherry picked from commit cc4310f)

* test(SDK-5618): add unit tests for timer template chronometer enhancements (#984)

* add unit tests for timer template chronometer enhancements

* add unit tests for NotificationBitmapUtils

* recycle bitmaps in teardown to prevent memory leaks

(cherry picked from commit 114ed7c)

* task(CMS-1607) - Makes border radius and border width configurable

(cherry picked from commit c834cbd)

* task(CMS-1607) - Adds tests

(cherry picked from commit b7169b5)

* chore(pt): bump version to 2.4.0 and update changelogs                                       - Bump push templates SDK version 2.3.0 → 2.4. - Add v2.4.0 entry to PT changelog (Image with CTA template, Timer enhancements)
 - Update integration doc with new PT version
 - Add release date entry to root CHANGELOG.md

---------

Co-authored-by: Anush-Shand <[email protected]>
Co-authored-by: deeksha-rgb <[email protected]>
Co-authored-by: anush <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants