Skip to content

Add Mock Integration Test Coverage for CustomizeCTA Component#8090

Open
Shikhartiwari967 wants to merge 3 commits into
JhaSourav07:mainfrom
Shikhartiwari967:test-customizecta-mock-integrations
Open

Add Mock Integration Test Coverage for CustomizeCTA Component#8090
Shikhartiwari967 wants to merge 3 commits into
JhaSourav07:mainfrom
Shikhartiwari967:test-customizecta-mock-integrations

Conversation

@Shikhartiwari967

Copy link
Copy Markdown
Contributor

Description

Fixes #6826

Added a dedicated test suite for CustomizeCTA to verify asynchronous service layer mocking and integration behavior.

Changes

  • Added CustomizeCTA.mock-integrations.test.tsx
  • Mocked Next.js Link integration
  • Mocked TranslationContext
  • Mocked Framer Motion
  • Verified component renders correctly using mocked integrations
  • Added five isolated Vitest test cases

Pillar

  • 🎨 Pillar 1 — New Theme Design
  • 📐 Pillar 2 — Geometric SVG Improvement
  • 🕐 Pillar 3 — Timezone Logic Optimization
  • 🛠️ Other (Testing)

Visual Preview

N/A (Test-only changes)

Checklist before requesting a review:

  • I have read the CONTRIBUTING.md file.
  • I have tested these changes locally.
  • I have run npm run lint locally.
  • My commit follows the Conventional Commits format.
  • I have updated README.md if required (not applicable).
  • I have starred the repository.
  • I have made sure that I have only one commit in this PR.
  • The new test suite passes locally.

Notes

Repository-wide typecheck failures, if any, originate from unrelated existing files outside the scope of this PR.

@vercel

vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

@Shikhartiwari967 is attempting to deploy a commit to the jhasourav07's projects Team on Vercel.

A member of the Team first needs to authorize it.

@retenta-bot

retenta-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown

This PR introduces a new test suite for the CustomizeCTA component, which enhances our testing coverage by mocking various integrations. This approach is similar to previous decisions made for other components, such as the SuccessGuide and CommitPulseSection, where we emphasized the importance of testing under different scenarios without relying on real network calls. It's great to see this focus on robust testing practices! Looking forward to your feedback.

@retenta-bot retenta-bot Bot changed the title test(CustomizeCTA): add mock integration test coverage Add Mock Integration Test Coverage for CustomizeCTA Component Jul 15, 2026
@github-actions github-actions Bot added the status:blocked This PR is blocked due to a failing CI check. label Jul 15, 2026
@Shikhartiwari967

Copy link
Copy Markdown
Contributor Author

Hi @Aamod007 Sir,

The new CustomizeCTA.mock-integrations.test.tsx test suite passes locally and the component-specific tests complete successfully.

The current CI failure appears to originate from existing repository-wide TypeScript issues in:

app/generator/components/EditorPanel.type-compiler.test.tsx
app/generator/components/PreviewPanel.type-compiler.test.tsx

These files are outside the scope of this PR, which only adds mock integration test coverage for CustomizeCTA.

Please let me know if any changes are required from my side. Thank you!

@Aamod007 Aamod007 added level:beginner Small changes Usually isolated fixes or simple UI/text updates. quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. type:testing Adding, updating, or fixing tests mentor:Aamod007 labels Jul 17, 2026

@Aamod007 Aamod007 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great job adding mock integration tests for the CustomizeCTA component. However, this PR is blocked by a failing CI check. Please resolve the issues and rerun the CI pipeline.

@github-actions github-actions Bot removed the status:blocked This PR is blocked due to a failing CI check. label Jul 17, 2026
@Shikhartiwari967

Copy link
Copy Markdown
Contributor Author

Hi @Aamod007 sir , please review and merge it.

@github-actions

Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Size Report (Gzipped Sizes)

Asset PR Size Base Size Difference Status
static/chunks/1915-[hash].js 15.54 KB - +15.54 KB (++100%) 🆕 New
static/chunks/4200-[hash].js - 10.25 KB -10.25 KB (-100.00%) 🗑️ Deleted
static/chunks/4305-[hash].js - 16.27 KB -16.27 KB (-100.00%) 🗑️ Deleted
static/chunks/5285-[hash].js 10.08 KB - +10.08 KB (++100%) 🆕 New
static/chunks/6297-[hash].js - 52.11 KB -52.11 KB (-100.00%) 🗑️ Deleted
static/chunks/9389-[hash].js 7.06 KB 7.08 KB -0.02 KB (-0.28%) 🟢 Improvement
static/chunks/9425-[hash].js 52.20 KB - +52.20 KB (++100%) 🆕 New
static/chunks/app/burnout-analyzer/page-[hash].js 9.33 KB 9.81 KB -0.47 KB (-4.82%) 🟢 Improvement
static/css/[hash].css 40.63 KB 40.96 KB -0.32 KB (-0.79%) 🟢 Improvement

📊 Summary of Totals

Category PR Size Base Size Difference
Total JS 3960.49 KB 3966.23 KB -5.75 KB (-0.14%)
Total CSS 327.71 KB 330.26 KB -2.55 KB (-0.77%)

@Aamod007 Aamod007 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Solid test suite. The mocks are well put together, and using \�i.fn()\ to spy on translation keys is good practice. LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

level:beginner Small changes Usually isolated fixes or simple UI/text updates. mentor:Aamod007 quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. type:testing Adding, updating, or fixing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(CustomizeCTA-mock-integrations): verify Asynchronous Service Layer Mocking & Local Cache Stubs (Variation 9)

2 participants