Skip to content

[CC generated] Add unit tests for page build method#1567

Draft
maxschulz-COL wants to merge 1 commit intomainfrom
claude/test-page-build-method-FTplD
Draft

[CC generated] Add unit tests for page build method#1567
maxschulz-COL wants to merge 1 commit intomainfrom
claude/test-page-build-method-FTplD

Conversation

@maxschulz-COL
Copy link
Contributor

Description

This PR adds comprehensive unit tests for the Page.build() method and its related functionality in the vizro-core package. The tests cover:

  • Basic build method functionality (returns html.Div with correct structure)
  • Control panel structure and visibility logic:
    • Hidden when no controls are present
    • Visible when controls are added
    • Hidden when all controls are invisible
  • Page components structure and required child elements:
    • Store components for page load actions
    • Download component for file exports
    • Location component for URL handling
    • Notification container for user notifications
  • Integration tests with multiple components and custom layouts

These tests replace the TODO comments that were previously in the test file and provide full coverage of the page build method's behavior, ensuring the correct HTML structure is generated and all required Dash components are properly included.

Notice

  • I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":

    • I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.
    • I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorized to submit this contribution on behalf of the original creator(s) or their licensees.
    • I certify that the use of this contribution as authorized by the Apache 2.0 license does not violate the intellectual property rights of anyone else.
    • I have not referenced individuals, products or companies in any commits, directly or indirectly.
    • I have not added data or restricted code in any commits, directly or indirectly.

https://claude.ai/code/session_01UPzkjMSjupFnrZJz9tA4sA

Add comprehensive unit tests for the Page.build method covering:
- Return type verification (html.Div with two children)
- Control panel structure and visibility logic
- Page components container structure
- Verification of essential components (Store, Download, Location, NotificationContainer)
- Multiple components and custom layout configurations

This removes the TODO comments that were requesting these tests.

https://claude.ai/code/session_01UPzkjMSjupFnrZJz9tA4sA
@maxschulz-COL maxschulz-COL changed the title Add unit tests for page build method [CC generated] Add unit tests for page build method Feb 3, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

View the example dashboards of the current commit live on PyCafe ☕ 🚀

Updated on: 2026-02-03 15:19:42 UTC
Commit: 0ce7c4b

Compare the examples using the commit's wheel file vs the latest released version:

vizro-core/examples/scratch_dev

View with commit's wheel vs View with latest release

vizro-core/examples/dev/

View with commit's wheel vs View with latest release

vizro-core/examples/visual-vocabulary/

View with commit's wheel vs View with latest release

vizro-core/examples/tutorial/

View with commit's wheel vs View with latest release

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.

2 participants