-
Notifications
You must be signed in to change notification settings - Fork 582
V1: More integration tests for themes and controls #5632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
+1,307
−99
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Improved DataTable decoration handling in datatable.dart by using type-safe casting and fallback logic. Updated integration tests to use per-test app instances, added a new themed DataTable test, and replaced golden images for macOS DataTable screenshots.
Simplified theme color logic in Dart by removing primarySwatch and related properties. Updated Python Theme dataclass to remove primary_swatch and added documentation for color_scheme_seed.
Refactored Dart theme parsing to use a local colorScheme variable and set shadowColor from colorScheme. Improved Python Theme class documentation for color_scheme and chip_theme, and removed unused color attributes.
Refactored Dart theme parsing to use DividerThemeData for divider color and theme assignment. Added docstrings to Python Theme class for divider_theme, clarifying its usage and affected widgets.
Updated integration tests for Divider and DataTable to cover theme properties and added new golden images for Divider tests. Also removed unused divider_color from Theme.
Set the 'text' property to 'Select a color' for the dropdown in the test_dropdown.py integration test. Updated golden images to reflect this UI change.
Updated dropdown integration tests to use function-scoped async fixtures and split basic and theme tests. Added new golden images for macOS dropdown control states. Also removed redundant screenshot enabling in data table and divider tests.
Added support for specifying a custom MenuStyle for Dropdown controls, allowing configuration of background color, elevation, and width. Updated theme parsing to use 'dropdown_theme' for DropdownMenuTheme. Adjusted integration test golden images to reflect new styling options. Improved documentation for menu_style in Python Dropdown and DropdownTheme classes.
Eliminated appending the Tester service to the page's services list in FletTestApp. This may be part of a refactor or cleanup to simplify test app setup.
Introduces an integration test for button theme customization, including a golden image for macOS. Also adds a docstring to the Theme.button_theme property to clarify its purpose.
Uncommented the text_style property in the button theme integration test and updated the golden image to reflect the new button appearance.
Introduces an integration test for OutlinedButton theme, including a golden image for macOS. Also adds a docstring to the outlined_button_theme property in Theme to clarify its purpose.
Introduced a new integration test for TextButton theme, including a golden image for macOS. Added a docstring to the Theme class for text_button_theme to clarify its purpose. Minor comment update in button theme test for color usage.
Introduces an integration test for FilledButton theme customization, including a golden image for macOS. Also adds a docstring to the filled_button_theme property in Theme to clarify its purpose.
Introduces icon_button_theme to the Theme class for customizing IconButton appearance. Adds an integration test and golden image to verify IconButton theming on macOS.
Renamed and added new golden images for ExpansionTile tests on macOS, updated test function names and added a new test for ExpansionTile properties. Also improved documentation for expansion_tile_theme in Theme class.
Commented out the 'leading' icon, changed 'affinity' from TRAILING to LEADING, and updated the corresponding golden image for the ExpansionTile properties test on macOS.
Replaces the properties1.png screenshot with closed.png and expanded.png for macOS golden images. Refactors test_expansion_tile.py to use per-test flet_app instances, removes the properties1 test, and adds a new expanded state test with updated screenshot logic.
Renamed 'closed' screenshot to 'collapsed' in ExpansionTile tests for consistency. Added new integration tests and golden images for ExpansionTileTheme on macOS, including both collapsed and expanded states. Fixed clipBehavior parsing in ExpansionTileControl.
The text_style property was commented out in button theme integration tests, due to issue #5620. Corresponding golden images were updated to reflect this change.
Added new integration tests for FloatingActionButton with center top and end top locations, including corresponding golden images. Improved documentation for floating_action_button_theme in Theme to clarify its purpose. Renamed basic screenshot for consistency.
Introduces new integration tests for FloatingActionButton properties, including visual states for elevation, focus, and disabled. Adds corresponding golden images for macOS to validate screenshot outputs.
Introduced a new integration test to verify the hover state of FloatingActionButton on macOS, including screenshot comparison. Additional properties related to hover and feedback were set for more comprehensive coverage.
Renamed 'extended_text_style' to 'text_style' and 'extended_icon_label_spacing' to 'icon_label_spacing' in both Dart and Python implementations for consistency. Updated related documentation and integration tests, and added golden images for macOS FloatingActionButton theme states.
Renamed and expanded ListTile integration tests for better coverage, including new tests for selected, focus, hover, and disabled states. Updated and added corresponding golden images for macOS. Improved docstrings in FloatingActionButtonTheme and Theme to clarify icon and content terminology and added missing docstrings for theme properties.
Expanded ListTile property coverage in integration tests by adding cases for custom shapes, dense tiles, and content padding. Updated golden images to reflect new test scenarios and improved property combinations for more comprehensive visual validation.
Replaced 'bgcolor_activated' with 'splash_color' in ListTile control for both Dart and Python implementations to improve clarity and consistency. Updated integration tests to cover additional ListTile properties and added new golden images for toggle input scenarios.
Split the ListTile properties test into two separate tests, moving several property checks to a new test_properties2 and updating screenshot references to properties_3_normal and properties_3_hover. Added a new golden image and renamed existing ones to match the new test structure.
Refactored ListTile hover color documentation to clarify it only applies when `toggle_inputs` is True. Updated and replaced golden test images for macOS ListTile to reflect new toggle input states and removed obsolete images.
Changed several ListTile properties in Python and Dart from default values to Optional types to allow for unset states. Renamed 'min_tile_height' to 'min_height' in ListTileTheme for consistency, and updated related parsing logic in Dart.
Introduces a new integration test for ListTile theme customization in Flet, including a golden screenshot for macOS. The test verifies various theme properties and ListTile configurations to ensure correct rendering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've reviewed this pull request using the Sourcery rules engine
FeodorFitsner
approved these changes
Sep 10, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Test Code
# Test code for the review of this PR
Type of change
Checklist
Screenshots
Additional details
Summary by Sourcery
Add comprehensive integration tests for widget controls and themes, unify theme API attributes, and enhance theme parsing and control implementations to support new styling options
Enhancements: