Skip to content

test: add widget test suite for core flows + GitHub Actions CI - #237

Merged
RafaelBarbosatec merged 8 commits into
masterfrom
test/core-widget-tests
Aug 28, 2026
Merged

RafaelBarbosatec merged 8 commits into
masterfrom
test/core-widget-tests

Conversation

@RafaelBarbosatec

@RafaelBarbosatec RafaelBarbosatec commented Aug 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

First real test suite for tutorial_coach_mark (the existing test/tutorial_coach_mark_test.dart was empty), plus a GitHub Actions CI so tests run on every push/PR.

Tests (12 widget tests — ✅ all passing in CI)

Area Test
Basic flow focuses first target + shows content; onFinish + overlay removal
Skip skip button calls onSkip and closes; onSkip => false advances instead
Target tap tapping the target calls onClickTarget and advances
#175/#183 rapid synchronous next() calls only advance one step (guard set before await); rapid double-tap on the overlay only advances one step
#235 next() advances within ~900ms even with a 10s pulse (unfocus no longer waits for the pulse loop)
#218/#223/#199 a missing target (unattached GlobalKey) is skipped and the tutorial continues; with no available target it finishes
Navigation previous() returns to the previous target; initialFocus starts at the given index

Notes:

  • pumpAndSettle is intentionally avoided — the pulse animation loops forever.
  • pump(Duration.zero) is required instead of pump() for the package's Future.delayed(Duration.zero) timers.
  • Advances pump generous frame counts because the transition is a long async chain (each await boundary needs its own frame).

CI

.github/workflows/ci.yml: flutter analyze --no-fatal-infos + flutter test on ubuntu-latest for every push/PR. (--no-fatal-infos because the lib still has pre-existing withOpacity deprecation infos that must not fail the build while old Flutter is supported.)

Verification status

  • dart analyze test/ — 0 issues
  • flutter test — 12/12 passing (GitHub Actions CI)
  • CI green on this PR

- 12 widget tests covering: first-target focus, onFinish/overlay removal,
  skip (close and next-on-false), target tap + onClickTarget, rapid
  synchronous next() (#175, #183), rapid overlay double-tap (#175, #183),
  pulse not delaying next() (#235), missing-target skip (#218, #223,
  #199), all-missing finish, previous(), initialFocus.
- pumpAndSettle is avoided on purpose (pulse loops forever).
- add GitHub Actions CI (analyze + test) so tests run on every push/PR.
@RafaelBarbosatec
RafaelBarbosatec merged commit d6b9759 into master Aug 28, 2026
1 check passed
@RafaelBarbosatec
RafaelBarbosatec deleted the test/core-widget-tests branch August 28, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant