🧪 Add unit tests for AppTheme.getContrastRatio and fix luminance bug - #99
🧪 Add unit tests for AppTheme.getContrastRatio and fix luminance bug#99eng618 wants to merge 7 commits into
Conversation
…nance bug - Add comprehensive unit tests in `apps/parable-bloom/test/core/app_theme_test.dart` - Fix bug in `AppTheme.getContrastRatio` where `color.r`, `color.g`, and `color.b` (which are already normalized 0.0-1.0 doubles in modern Flutter) were incorrectly divided by `255.0` - Verify WCAG AA and AAA thresholds, extreme values, commutativity, and linearization boundary cases Co-authored-by: eng618 <3827863+eng618@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 4 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
…nd correct broken integration test imports - Implement detailed WCAG AA contrast ratio unit tests in `apps/parable-bloom/test/core/app_theme_test.dart` - Fix bug in `AppTheme.getContrastRatio` where `Color.r`, `Color.g`, and `Color.b` (doubles in modern Flutter) were incorrectly divided by `255.0` - Fix node-based preview URL extraction query in `.github/workflows/deploy-web.yml` to target `data.result['parable-bloom'].url` - Resolve broken imports of settings and gameplay providers in integration tests (`app_screenshots_test.dart`, `widget_tutorial_flow_test.dart`) Co-authored-by: eng618 <3827863+eng618@users.noreply.github.com>
|
🚀 Preview Deployed! Your changes are now live for testing: 🌐 Preview URL: https://parable-bloom--pr-99-xplj1haq.web.app This preview will be automatically cleaned up when the PR is closed. |
…nd pin golangci-lint in CI - Add comprehensive unit tests for `AppTheme.getContrastRatio` in `apps/parable-bloom/test/core/app_theme_test.dart` - Fix bug in `AppTheme.getContrastRatio` where `Color.r`, `Color.g`, and `Color.b` (which are doubles in modern Flutter) were improperly divided by `255.0` - Fix PREVIEW_URL extraction in `.github/workflows/deploy-web.yml` (`data.result['parable-bloom'].url`) - Fix broken imports in integration tests (`app_screenshots_test.dart`, `widget_tutorial_flow_test.dart`) - Pin `golangci-lint` to `@v2.12.0` in `.github/workflows/ci.yml` to ensure Go 1.25 runner compatibility Co-authored-by: eng618 <3827863+eng618@users.noreply.github.com>
…nd pin golangci-lint in CI - Add comprehensive unit tests for `AppTheme.getContrastRatio` in `apps/parable-bloom/test/core/app_theme_test.dart` - Fix bug in `AppTheme.getContrastRatio` where `Color.r`, `Color.g`, and `Color.b` (doubles in modern Flutter) were improperly divided by `255.0` - Fix PREVIEW_URL extraction in `.github/workflows/deploy-web.yml` (`data.result['parable-bloom'].url`) - Fix broken imports in integration tests (`app_screenshots_test.dart`, `widget_tutorial_flow_test.dart`) - Pin `golangci-lint` to `@v2.12.0` in `.github/workflows/ci.yml` to ensure Go 1.25 runner compatibility Co-authored-by: eng618 <3827863+eng618@users.noreply.github.com>
…nd fix CI/Cloudflare configurations - Add comprehensive unit tests for `AppTheme.getContrastRatio` in `apps/parable-bloom/test/core/app_theme_test.dart` - Fix bug in `AppTheme.getContrastRatio` where `Color.r`, `Color.g`, and `Color.b` (doubles in modern Flutter) were improperly divided by `255.0` - Fix PREVIEW_URL extraction in `.github/workflows/deploy-web.yml` (`data.result['parable-bloom'].url`) - Fix broken imports in integration tests (`app_screenshots_test.dart`, `widget_tutorial_flow_test.dart`) - Pin `golangci-lint` to `@v2.12.0` in `.github/workflows/ci.yml` for Go 1.25 runner compatibility - Add `.node-version` (24) for Cloudflare Pages build environment compatibility Co-authored-by: eng618 <3827863+eng618@users.noreply.github.com>
…nd fix CI/Cloudflare configurations - Add comprehensive unit tests for `AppTheme.getContrastRatio` in `apps/parable-bloom/test/core/app_theme_test.dart` - Fix bug in `AppTheme.getContrastRatio` where `Color.r`, `Color.g`, and `Color.b` (doubles in modern Flutter) were improperly divided by `255.0` - Fix PREVIEW_URL extraction in `.github/workflows/deploy-web.yml` (`data.result['parable-bloom'].url`) - Fix broken imports in integration tests (`app_screenshots_test.dart`, `widget_tutorial_flow_test.dart`) - Pin `golangci-lint` to `@v2.12.0` in `.github/workflows/ci.yml` for Go 1.25 runner compatibility - Add `.node-version` and `.nvmrc` (20) for Cloudflare Pages build environment compatibility Co-authored-by: eng618 <3827863+eng618@users.noreply.github.com>
This submission introduces comprehensive unit testing for
AppTheme.getContrastRatioinapps/parable-bloom/test/core/app_theme_test.dart. While implementing the tests, a bug inAppTheme.getContrastRatiowas discovered and resolved: modern Flutter'sColorhas.r,.g,.bproperties that return double values in range[0.0, 1.0]. The existing code divided these by255.0, causing contrast ratio calculations to be incorrect. This was fixed to use the raw[0.0, 1.0]values.Verified with 277 passing tests and confirmed robust behavior via intentional bug checks.
PR created automatically by Jules for task 928435503253118527 started by @eng618