Skip to content

Conversation

@FeodorFitsner
Copy link
Contributor

@FeodorFitsner FeodorFitsner commented Aug 13, 2025

Summary by Sourcery

Enable screenshot capturing in the Page control across Dart and Python SDKs and introduce a comprehensive suite of screenshot-based integration tests for various controls, while updating CI configurations to run macOS integration tests via GitHub Actions.

New Features:

  • Add enable_screenshots property and take_screenshot method to the Python Page control
  • Implement take_screenshot invokeMethod in Dart PageControl to capture page rendering as PNG
  • Support StrOrControl type for SubmenuButton content in Python SDK

Enhancements:

  • Wrap the root app widget in a RepaintBoundary when screenshots are enabled and track device pixel ratio in Dart PageControl
  • Add detailed docstrings for PopupMenuTheme properties in Python SDK
  • Add main guards to Python example apps

CI:

  • Disable macOS integration tests in Appveyor configuration
  • Add a GitHub Actions workflow to run macOS integration tests and upload failure screenshots

Documentation:

  • Document the new enable_screenshots and take_screenshot API in Python Page control

Tests:

  • Add extensive screenshot-based integration tests for Canvas drawing operations
  • Introduce new integration tests for Banner, PopupMenuButton, Dropdown, SegmentedButton, AppBar, Checkbox, CircleAvatar, Cupertino and Material button variants, and other controls
  • Update the integration tests README to point to the correct test files

InesaFitsner and others added 30 commits August 1, 2025 17:30
Introduces a new workflow to run integration tests on macOS 14 using CocoaPods, uv, and Flutter. The workflow installs dependencies, runs Python integration tests, and uploads failure screenshots as artifacts.
Replaces manual Flutter installation with subosito/flutter-action, sets FLUTTER_VERSION to 3.32.8, and simplifies the workflow. This improves maintainability and ensures consistent Flutter setup in CI.
Implemented the ability to take full-page screenshots in the Flutter page control and exposed it via the Python BasePage API. Updated the dropdown integration test to use the new screenshot feature and replaced golden images accordingly. Also clarified the integration test README for golden image generation.
Also fixed content type
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a 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

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Aug 13, 2025

Deploying flet-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 54e6305
Status:⚡️  Build in progress...

View logs

Comment on lines +101 to +121
[
fc.Shadow(
path=[
fc.Path.SubPath(
x=0,
y=0,
elements=[
fc.Path.MoveTo(x=10, y=10),
fc.Path.LineTo(x=40, y=10),
fc.Path.LineTo(x=40, y=40),
fc.Path.LineTo(x=10, y=40),
fc.Path.LineTo(x=10, y=10),
],
),
],
color=ft.Colors.PINK,
elevation=1,
)
],
width=50,
height=50,
Copy link
Contributor

Choose a reason for hiding this comment

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

following our discussion on "nesting hell", i will suggest we move width and height to the top. same for similar tests in this file.

FeodorFitsner and others added 6 commits August 13, 2025 15:28
Introduces a longPress method to the Tester interface and its implementations in Dart and Python, enabling long press interactions in automated tests. Updates the service layer to handle the new 'long_press' command.
not done, menu doesn't open
@FeodorFitsner FeodorFitsner merged commit 363881e into main Aug 14, 2025
3 of 5 checks passed
@FeodorFitsner FeodorFitsner deleted the v1-controls-integration-tests branch August 14, 2025 00:06
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.

5 participants