Commit cbdae3a
V1: More integration tests for themes and controls (#5632)
* Refactor DataTable decoration and update tests
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.
* Refactor theme color handling and update docs
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.
* Update theme color scheme handling and docs
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.
* Improve divider theme handling in theme parsing
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.
* Add Divider theme support and update tests
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.
* Add default text to dropdown in test
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.
* Refactor dropdown integration tests and add golden images
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.
* Enhance Dropdown menu style customization
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.
* Fixed integration tests: Remove tester service from page initialization
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.
* Add button theme integration test and docstring
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.
* Enable text_style in button theme test
Uncommented the text_style property in the button theme integration test and updated the golden image to reflect the new button appearance.
* Add outlined button theme integration test and docstring
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.
* Add TextButton theme integration test and docstring
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.
* Add FilledButton theme integration test and docstring
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.
* Add IconButton theme support and integration test
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.
* Update ExpansionTile tests and theme documentation
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.
* Update ExpansionTile properties and golden image
Commented out the 'leading' icon, changed 'affinity' from TRAILING to LEADING, and updated the corresponding golden image for the ExpansionTile properties test on macOS.
* Update ExpansionTile integration tests and screenshots
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.
* Add ExpansionTile theme tests and update screenshot names
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.
* Comment out text_style in button theme tests
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.
* Add tests and docs for FloatingActionButton location
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.
* Add FloatingActionButton property tests and golden images
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.
* Add hover state test for FloatingActionButton
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.
* Refactor FloatingActionButtonTheme property names
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.
* Refactor ListTile tests and update golden images
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.
* Enhance ListTile integration tests on macOS
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.
* Refactor ListTile splash color property
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.
* Refactor ListTile integration tests and update golden files
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.
* Update ListTile hover behavior and golden images
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.
* updated tests
* Refactor ListTile optional properties and theme key
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.
* Add ListTile theme integration test and golden image
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.
---------
Co-authored-by: Feodor Fitsner <feodor@appveyor.com>1 parent 4afd78a commit cbdae3a
66 files changed
Lines changed: 1307 additions & 99 deletions
File tree
- packages/flet/lib/src
- controls
- utils
- sdk/python/packages/flet
- integration_tests/controls
- golden/macos
- button_theme
- data_table
- divider
- dropdown
- expansion_tile_theme
- expansion_tile
- filled_button_theme
- floating_action_button_theme
- floating_action_button
- icon_button_theme
- list_tile_theme
- list_tile
- outlined_button_theme
- text_button_theme
- src/flet/controls
- material
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | | - | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | | - | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
| |||
148 | 150 | | |
149 | 151 | | |
150 | 152 | | |
151 | | - | |
152 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
153 | 177 | | |
154 | 178 | | |
155 | 179 | | |
| |||
213 | 237 | | |
214 | 238 | | |
215 | 239 | | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
221 | 246 | | |
222 | 247 | | |
223 | 248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
| 55 | + | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
| 97 | + | |
| 98 | + | |
105 | 99 | | |
106 | 100 | | |
107 | 101 | | |
108 | | - | |
109 | | - | |
110 | 102 | | |
111 | 103 | | |
112 | 104 | | |
113 | | - | |
| 105 | + | |
114 | 106 | | |
115 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
116 | 112 | | |
117 | 113 | | |
118 | 114 | | |
| |||
124 | 120 | | |
125 | 121 | | |
126 | 122 | | |
127 | | - | |
| 123 | + | |
128 | 124 | | |
129 | 125 | | |
130 | 126 | | |
| |||
140 | 136 | | |
141 | 137 | | |
142 | 138 | | |
143 | | - | |
| 139 | + | |
144 | 140 | | |
145 | | - | |
| 141 | + | |
146 | 142 | | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | 143 | | |
151 | 144 | | |
152 | 145 | | |
| |||
160 | 153 | | |
161 | 154 | | |
162 | 155 | | |
163 | | - | |
| 156 | + | |
164 | 157 | | |
165 | 158 | | |
166 | 159 | | |
167 | 160 | | |
168 | 161 | | |
169 | 162 | | |
170 | | - | |
171 | | - | |
| 163 | + | |
172 | 164 | | |
173 | 165 | | |
174 | 166 | | |
| |||
538 | 530 | | |
539 | 531 | | |
540 | 532 | | |
541 | | - | |
542 | | - | |
| 533 | + | |
| 534 | + | |
543 | 535 | | |
544 | 536 | | |
545 | 537 | | |
| |||
858 | 850 | | |
859 | 851 | | |
860 | 852 | | |
861 | | - | |
| 853 | + | |
862 | 854 | | |
863 | 855 | | |
864 | 856 | | |
| |||
Binary file not shown.
0 commit comments