trypost/tests/Unit
Paulo Castellano 287c27b792 feat: add brand configuration step to onboarding
After users pick their persona (role), they now land on a new Brand
step that collects the same fields available in Settings → Workspace
→ Brand: website, description, tone, voice notes, and content
language. When they continue, every AI-generated post for this
workspace already has sensible defaults — before the user's first
post is ever drafted.

Flow:
Role (persona) → Brand (new) → Connections → Subscription → Completed.
A 'Skip for now' button on the brand step advances to Connections
without touching the workspace (defaults stay at their seed values).

Backend:
- Setup enum gets a new Brand case slotted between Role and
  Connections with matching stepNumber updates.
- OnboardingController::brand() renders the form pre-filled from the
  current workspace. storeBrand() validates via a new
  StoreBrandRequest form request and writes the fields onto the
  workspace, then advances setup. skipBrand() just advances.
- storeRole() redirects to brand instead of account. enforceStep()
  knows how to redirect users whose setup is Brand.
- Three new routes: GET /onboarding/brand, POST /onboarding/brand,
  POST /onboarding/brand/skip.

Frontend:
- New Brand.vue page mirrors the Settings brand form but inside the
  onboarding AuthLayout. Tone + language sit side by side, both
  selects take full width. Translations added to en, pt-BR, and es.
- Wayfinder regenerated so the page can import storeBrand / skipBrand.

Tests:
- Renamed 'redirects to step2' → 'redirects to brand step' and
  assert new setup.
- Added six new tests covering brand step auth, redirects, render,
  successful store, validation of tone and content_language, and
  skip.
- Updated UserSetupTest for the new enum case + reshuffled step
  numbers.
2026-04-16 11:00:16 -03:00
..
Ai/Providers feat: extend GeminiProvider with social-media aspect ratios 2026-04-16 09:50:36 -03:00
Broadcasting feat: introduce Account entity as billing owner and refactor architecture 2026-04-14 22:22:04 -03:00
Enums feat: add brand configuration step to onboarding 2026-04-16 11:00:16 -03:00
Events feat: complete AI assistant with custom services and brand config 2026-04-16 09:25:08 -03:00
Exceptions/Social fix: Facebook/Instagram/Threads OAuthException type incorrectly treated as token error — now only code 190 triggers TokenExpiredException 2026-04-01 14:33:26 -03:00
Features feat: introduce Account entity as billing owner and refactor architecture 2026-04-14 22:22:04 -03:00
Mail feat: introduce Account entity as billing owner and refactor architecture 2026-04-14 22:22:04 -03:00
Models refactor: settings redesign, Spanish translations, language system, strict_types 2026-03-30 00:20:43 -03:00
Policies feat: introduce Account entity as billing owner and refactor architecture 2026-04-14 22:22:04 -03:00
Rules refactor: settings redesign, Spanish translations, language system, strict_types 2026-03-30 00:20:43 -03:00
Services feat: add PostCommentCreated broadcast event 2026-04-15 20:11:36 -03:00
Socialite refactor: settings redesign, Spanish translations, language system, strict_types 2026-03-30 00:20:43 -03:00
Traits feat: add PostCommentCreated broadcast event 2026-04-15 20:11:36 -03:00
ExampleTest.php refactor: settings redesign, Spanish translations, language system, strict_types 2026-03-30 00:20:43 -03:00
HelpersTest.php refactor: settings redesign, Spanish translations, language system, strict_types 2026-03-30 00:20:43 -03:00
PostHogServiceTest.php chore: posthog, ui, features and more 2026-03-30 21:18:07 -03:00