# Onboarding Wizard
# ---
# Pattern: SaaS — multi-step signup and onboarding wizard
# What it tests: Walks through a multi-step onboarding flow:
#                signup -> profile setup -> first action -> dashboard.
# Customize:
#   - Update the step labels, form fields, and navigation targets
#     for your SaaS onboarding experience
#   - Store credentials in .prowl/.env

name: onboarding-wizard
description: Complete SaaS onboarding from signup to dashboard

tags:
  - saas
  - onboarding
  - wizard
  - multi-step

vars:
  NAME: "Test User"
  EMAIL: "{{TEST_EMAIL}}"
  PASSWORD: "{{TEST_PASSWORD}}"
  COMPANY: "Acme Corp"

steps:
  # SIGNUP — create the account
  - navigate: "/signup"

  - fill:
      "Full Name": "{{NAME}}"

  - fill:
      "Email": "{{EMAIL}}"

  - fill:
      "Password": "{{PASSWORD}}"

  - fill:
      "Confirm Password": "{{PASSWORD}}"

  - click: "Create Account"

  - waitForNetworkIdle:
      timeout: 10000

  # Step 1: Profile setup (often shown right after signup)
  - wait: "Set up your profile"

  - fill:
      "Company Name": "{{COMPANY}}"

  - select:
      "Team Size": "1-10"

  - select:
      "Industry": "Technology"

  - click: "Continue"

  # Step 2: First action — create your first project/workspace
  - wait: "Create your first project"

  - fill:
      "Project Name": "My First Project"

  - click: "Create Project"

  - waitForNetworkIdle:
      timeout: 10000

  # Step 3: Verify we landed on the dashboard
  - assert:
      urlIncludes: "/dashboard"

  - assert:
      visible: "My First Project"

assertions:
  - noConsoleErrors: true
  - noNetworkErrors: true
