Unit and template tests#35
Conversation
…/E2E test infrastructure
…stom failure reporting, and comprehensive template scaffold additions.
…ure CI test tiers
…d generation logic
…nfiguration flags
…ng suite for flutter_init configurations
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (78)
📝 WalkthroughWalkthroughThis PR introduces a comprehensive three-tier testing infrastructure with custom font file support. Changes include new GitHub Actions workflows for layered CI validation (Layer 1 unit/integration, Layer 2 critical Dart validation, Layer 3 full matrix), test utilities and Dart project validators, custom font upload/configuration in the wizard and schema, multipart form-data request handling for font files, and numerous template refinements for router generation, conditional imports, ScreenUtil sizing, and context lifecycle safety in async flows. ChangesTesting Infrastructure & CI/CD
Custom Font Support
Template & Codebase Refinements
Sequence Diagram(s)sequenceDiagram
participant User
participant Wizard as Wizard UI
participant API as /api/generate
participant Generator as Generator
participant Templates as Templates
User->>Wizard: Drop font files + configure
Wizard->>Wizard: Validate files (extension, size)
Wizard->>Wizard: Store File blobs in-memory<br/>(fontFiles Map)
User->>Wizard: Click Generate
Wizard->>API: POST multipart/form-data<br/>(config + font Files)
API->>API: Parse config field (JSON)
API->>API: Collect font field entries
API->>Generator: generateFlutterScaffold(config, fonts)
Generator->>Generator: Build template context<br/>(group fonts by family)
Generator->>Templates: Render with flags<br/>(hasCustomFonts,<br/>primaryFontFamily,<br/>fontFamilies)
Templates->>Generator: Generated pubspec.yaml<br/>(fonts: section)
Templates->>Generator: Generated theme.dart<br/>(fontFamily applied)
Generator->>Generator: Write fonts to assets/fonts/
Generator->>Generator: Create ZIP
API->>User: ZIP download
sequenceDiagram
participant CI as GitHub Actions
participant L1 as Layer 1<br/>(Unit+Integration)
participant L2 as Layer 2<br/>(Dart Validation)
participant L3 as Layer 3<br/>(Full Matrix)
participant TestUtils as Test Utilities
participant Generator as Project Generator
participant DartSDK as Dart SDK
CI->>L1: Trigger on every push
L1->>TestUtils: Load PRIMARY_COMBINATIONS (375)
TestUtils->>Generator: Generate per combo (in-memory)
L1->>TestUtils: Run assertions<br/>(tokens, files, deps)
L1-->>CI: Pass/Fail Layer 1
CI->>L2: Trigger on PR to main
L2->>TestUtils: Load CRITICAL_COMBOS (24)
TestUtils->>Generator: Generate per combo (to disk)
Generator->>DartSDK: Run dart pub get
Generator->>DartSDK: Conditionally run build_runner
Generator->>DartSDK: Run dart analyze --fatal-infos
L2-->>CI: Collect pass/fail + logs
CI->>L3: Trigger on main push
L3->>TestUtils: Split combos into chunks<br/>(by concurrency param)
TestUtils->>Generator: Generate chunk range<br/>(parallel jobs)
Generator->>DartSDK: Validate each combo
L3-->>CI: Gate on L1+L2 success
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
|
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Tests