Skip to content

Conversation

@asanehisa
Copy link
Contributor

@asanehisa asanehisa commented Dec 18, 2025

Updates the FAQsSection screenshot to use the full page and adds two additional tests for version 35 slotified FAQsSection.

@asanehisa asanehisa marked this pull request as ready for review December 18, 2025 23:43
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 18, 2025

Walkthrough

The test file for FAQsSection was updated to include test coverage for version 35 of the FAQ component. A new test data constant version35FaqData was added containing two FAQ entries. Two test cases were introduced: one testing FAQ version 35 with entity-backed data and heading text with slot configurations and user interactions, and another combining constant values with entity-backed data. Additionally, screenshot assertion configuration was modified to enable full-page rendering for initial screenshots.

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding additional tests for the FAQsSection component, which aligns with the actual file modifications.
Description check ✅ Passed The description is directly related to the changeset, explaining both the screenshot update and the addition of two new version 35 tests for FAQsSection.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-faq-tests

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 03d05fb and d90e0c2.

⛔ Files ignored due to path filters (30)
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[desktop] version 35 with constant values and entity values (after interactions).png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[desktop] version 35 with constant values and entity values.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[desktop] version 35 with entity value for FAQs and Heading (after interactions).png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[desktop] version 35 with entity value for FAQs and Heading.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[mobile] default props with document data.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[mobile] default props with empty document.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[mobile] version 10 props with constant value (after interactions).png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[mobile] version 10 props with constant value.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[mobile] version 10 props with entity values (after interactions).png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[mobile] version 10 props with entity values.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[mobile] version 10 props with no data.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[mobile] version 35 with constant values (after interactions).png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[mobile] version 35 with constant values and entity values (after interactions).png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[mobile] version 35 with constant values and entity values.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[mobile] version 35 with constant values.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[mobile] version 35 with entity value for FAQs and Heading (after interactions).png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[mobile] version 35 with entity value for FAQs and Heading.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[tablet] default props with document data.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[tablet] default props with empty document.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[tablet] version 10 props with constant value (after interactions).png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[tablet] version 10 props with constant value.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[tablet] version 10 props with entity values (after interactions).png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[tablet] version 10 props with entity values.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[tablet] version 10 props with no data.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[tablet] version 35 with constant values (after interactions).png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[tablet] version 35 with constant values and entity values (after interactions).png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[tablet] version 35 with constant values and entity values.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[tablet] version 35 with constant values.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[tablet] version 35 with entity value for FAQs and Heading (after interactions).png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/FAQsSection/[tablet] version 35 with entity value for FAQs and Heading.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
📒 Files selected for processing (1)
  • packages/visual-editor/src/components/pageSections/FAQsSection/FAQsSection.test.tsx (3 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
packages/visual-editor/src/components/pageSections/FAQsSection/FAQsSection.test.tsx (1)
packages/visual-editor/src/components/testing/componentTests.setup.ts (1)
  • delay (121-122)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: call_unit_test / unit_tests (20.x)
🔇 Additional comments (4)
packages/visual-editor/src/components/pageSections/FAQsSection/FAQsSection.test.tsx (4)

53-76: LGTM! Well-structured test data.

The new version35FaqData constant follows the established pattern and provides appropriate test data for version 35 FAQ testing.


332-523: Verify the interaction between constantValue, constantValueEnabled, and parentData.

In the BodyTextSlot components for questions and answers (e.g., lines 385-406), constantValueEnabled: true is set with a constantValue of "What is your return policy?", but parentData provides different content from version35FaqData (e.g., "How does version 35 work?").

The test interaction (line 516) expects "How does version 35 work?" to be rendered, which suggests that parentData takes precedence over constantValue, or that the migration logic transforms this structure. Please verify this is the intended behavior and that the test will pass as written.


524-636: LGTM! Good test coverage for mixed data sources.

This test case correctly demonstrates the combination of constant values and entity-backed data, with proper field bindings and interactions.


690-708: Verify screenshot configuration consistency.

Line 693 adds useFullPage: true to the initial screenshot, but the post-interaction screenshot (lines 700-705) does not include this option.

Please confirm this is intentional. If interactions can cause changes throughout the full page, consider adding useFullPage: true to the post-interaction screenshot as well for consistency.


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.

@asanehisa asanehisa merged commit 2564686 into main Dec 19, 2025
16 checks passed
@asanehisa asanehisa deleted the add-faq-tests branch December 19, 2025 17:06
@coderabbitai coderabbitai bot mentioned this pull request Dec 19, 2025
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.

4 participants