Skip to content

[Flutter/iOS] Add unit tests for parsing and widen the Flutter CI triggers #135

Open

Description

@gabrielbmoro

Problem

Kotlin has unit tests for ViewMapper, ComponentKey, TextStyle, and other pieces. Flutter only has widget goldens, and iOS has no tests. The bugs around the text key, hexToColor, and fromJson would have been caught by simple unit tests. In addition, the Flutter snapshot workflow only triggers when lib/presentation/ui/** changes, so a model or pubspec.yaml change runs no tests.

Evidence

Proposal

  • Add unit tests for every fromJson, CraftDColor, CraftDBuilderManager, and ActionProperties, ideally reading the shared fixtures.
  • Widen the workflow paths to flutter/craftd_widget/**.
  • Run flutter analyze and dart format --set-exit-if-changed in CI.
  • Add a test target to the iOS package (Package.swift) with tests for the decoding and key logic.

Acceptance criteria

  • Tests cover the parsing bugs from the related issues.
  • The Flutter workflow triggers on model and pubspec.yaml changes.
  • Analyze and format checks run in CI.
  • iOS tests run in CI.
  • Coverage is reported.

Context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementflutterios

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions