Skip to content

Use fixed date in ValidatorLightweightPicker screenshot test to stabilize output#4738

Open
liannacasper wants to merge 6 commits intomasterfrom
codex/set-validatorlightweightpicker-date-for-tests
Open

Use fixed date in ValidatorLightweightPicker screenshot test to stabilize output#4738
liannacasper wants to merge 6 commits intomasterfrom
codex/set-validatorlightweightpicker-date-for-tests

Conversation

@liannacasper
Copy link
Copy Markdown
Collaborator

Motivation

  • Stabilize the screenshot-based test by using a deterministic birth date instead of the current time returned by new Date() to avoid flaky diffs.

Description

  • Replace new Date() with a fixed Date constructed from LocalDate.of(2026, 4, 11) (via ZoneId.systemDefault()) and add the necessary LocalDate/ZoneId imports so PickerComponent.createDate(fixedBirthDate) is deterministic.

Testing

  • Ran the ValidatorLightweightPickerScreenshotTest screenshot test after the change and it passed successfully.

Codex Task

@shai-almog
Copy link
Copy Markdown
Collaborator

shai-almog commented Apr 12, 2026

Android screenshot updates

Compared 37 screenshots: 36 matched, 1 updated.

  • ValidatorLightweightPicker — updated screenshot. Screenshot differs (320x640 px, bit depth 8).

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

Native Android coverage

  • 📊 Line coverage: 7.78% (4095/52607 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 6.11% (20259/331632), branch 2.91% (932/31974), complexity 3.64% (1116/30630), method 6.38% (913/14308), class 10.58% (201/1899)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6327 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.ClassReader – 0.00% (0/1519 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1148 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.MethodWriter – 0.00% (0/923 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/730 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/623 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.Frame – 0.00% (0/564 lines covered)
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysJvmKt – 0.00% (0/495 lines covered)
      • kotlinx.coroutines.kotlinx.coroutines.JobSupport – 0.00% (0/423 lines covered)

Benchmark Results

Detailed Performance Metrics

Metric Duration
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 native encode 940.000 ms
Base64 CN1 encode 111.000 ms
Base64 encode ratio (CN1/native) 0.118x (88.2% faster)
Base64 native decode 635.000 ms
Base64 CN1 decode 329.000 ms
Base64 decode ratio (CN1/native) 0.518x (48.2% faster)

@shai-almog
Copy link
Copy Markdown
Collaborator

shai-almog commented Apr 12, 2026

Compared 37 screenshots: 37 matched.
✅ Native iOS screenshot tests passed.

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 72 seconds

Detailed Performance Metrics

Metric Duration
Simulator Boot 1000 ms
Simulator Boot (Run) 0 ms
App Install 2000 ms
App Launch 2000 ms
Test Execution 151000 ms
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 native encode 3157.000 ms
Base64 CN1 encode 1631.000 ms
Base64 encode ratio (CN1/native) 0.517x (48.3% faster)
Base64 native decode 884.000 ms
Base64 CN1 decode 967.000 ms
Base64 decode ratio (CN1/native) 1.094x (9.4% slower)

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