Skip to content

Conversation

@shai-almog
Copy link
Collaborator

Summary

  • allow screenshot-based tests to accept small pixel differences to reduce flakiness
  • keep failure logging and outputs when differences exceed tolerance

Testing

  • not run (not requested)

Codex Task

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 618 to 620
final int toleratedChannelDelta = 2;
final double maxDifferentPixelsRatio = 0.001; // 0.1% of pixels may differ slightly
final double maxAverageChannelDelta = 1.5; // average difference per channel across entire image

Choose a reason for hiding this comment

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

P1 Badge Tolerance masks small-area visual regressions

With maxDifferentPixelsRatio set to 0.001 and maxAverageChannelDelta to 1.5, imagesWithinTolerance() will still pass when up to ~0.1% of pixels are completely wrong because the average delta across all channels stays far below 1.5. On a typical 1080p screenshot that means a 45×45 region (e.g., an icon disappearing) could differ by 255 per channel and the test would still report a match, undermining the screenshot regression check for any small UI element. Consider bounding the allowed per-pixel delta or tightening these thresholds so only minor noise is tolerated.

Useful? React with 👍 / 👎.

@github-actions
Copy link

github-actions bot commented Nov 28, 2025

✅ Continuous Quality Report

Test & Coverage

Static Analysis

Generated automatically by the PR CI workflow.

@shai-almog
Copy link
Collaborator Author

shai-almog commented Nov 28, 2025

Android screenshot updates

Compared 7 screenshots: 6 matched, 1 updated.

  • BrowserComponent — updated screenshot. Screenshot differs (320x616 px, bit depth 8).

    BrowserComponent
    Preview info: JPEG preview quality 70; JPEG preview quality 70.
    Full-resolution PNG saved as BrowserComponent.png in workflow artifacts.

Native Android coverage

  • 📊 Line coverage: 18.19% (1959/10772 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 17.93% (9106/50777), branch 9.58% (452/4716), complexity 12.65% (540/4269), method 25.30% (462/1826), class 26.64% (81/304)
    • Lowest covered classes
      • com.codename1.impl.android.com.codename1.impl.android.AndroidContactsManager – 0.00% (0/398 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidImplementation$Video – 0.00% (0/168 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.IntentIntegrator – 0.00% (0/139 lines covered)
      • com.codename1.impl.android.util.com.codename1.impl.android.util.Base64 – 0.00% (0/117 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.CodenameOneInputConnection – 0.00% (0/109 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidImplementation$SocketImpl – 0.00% (0/77 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidTextureView – 0.00% (0/76 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidSurfaceView – 0.00% (0/73 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.LocalNotificationPublisher – 0.00% (0/65 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.FridaDetectionUtil – 0.00% (0/64 lines covered)

@shai-almog
Copy link
Collaborator Author

shai-almog commented Nov 29, 2025

iOS screenshot updates

Compared 7 screenshots: 5 matched, 2 updated.

  • GraphicsShapesAndGradients — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    GraphicsShapesAndGradients
    Preview info: Preview provided by instrumentation.
    Full-resolution PNG saved as GraphicsShapesAndGradients.png in workflow artifacts.

  • GraphicsTransformations — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    GraphicsTransformations
    Preview info: Preview provided by instrumentation.
    Full-resolution PNG saved as GraphicsTransformations.png in workflow artifacts.

@shai-almog shai-almog closed this Dec 1, 2025
@shai-almog shai-almog reopened this Dec 1, 2025
@shai-almog shai-almog merged commit 2f01222 into master Dec 2, 2025
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants