Skip to content

Demo Standard Onboarding (Reseller) - QA/Testing

Overview

demo-standard is not a POS provider. It is one of three accepted values for the QA-only qa_demo_provider localStorage flag that bypasses onboarding in non-production environments so QA/automation can reach post-POS features without connecting a real POS.

The three accepted values are identical in behavior — the code treats demo-minimal, demo-standard, and demo-full exactly the same:

const DEMO_POS_CHANNELS = ['demo-minimal', 'demo-standard', 'demo-full']

(src/store/modules/app.ts)


How it works

  1. Set the localStorage flag in a test environment:

    • localStorage.setItem('qa_demo_provider', 'demo-standard')
  2. The flag is only honored when isTestEnv is true. isTestEnv is defined as !['production', 'staging'].includes(VITE_ENV), so the bypass never activates in production or staging (src/config/helpers.ts).

  3. When active, fetchOnboardingState short-circuits and commits a simulated "completed" onboarding state instead of calling the backend (src/store/modules/app.ts):

    {
      pos_provider: 'demo-standard',
      phase: 'completed',
      setup_steps: [],
      completed_steps: [],
      answers: {}
    }
  4. To make POS-connected checks pass, the demo keys are injected into POS_CHANNELS (test env only) and into the available in-house channel keys getter, so hasPOSConnected returns true (src/store/modules/app.ts, src/components/emily/EmilyWidget.vue).

The result: onboarding is forced to completed with no setup steps, simulating a connected POS so post-POS features (e.g. online ordering, menus) are accessible for testing.


What it does NOT do

  • It does not run a discovery questionnaire — the bypass clears answers and sets setup_steps to an empty array.
  • It does not create any resources. The bypass only commits local Vuex state via SET_ONBOARDING_STATE; no location, menu, payment, or branding data is created, and no backend API is called.
  • It is not activated by a ?demo= URL parameter. No such parameter exists in the code; activation is solely via the qa_demo_provider localStorage flag.
  • There is no "branding prerequisite" and no branding step tied to the demo flag.
  • demo-minimal, demo-standard, and demo-full are not distinct feature tiers — they are interchangeable values with identical effects.

Not verified here

The following are outside the scope of the back-office / backend code reviewed and were not confirmed:

  • Reseller signup, sales, or merchant-provisioning workflows.
  • Any dedicated "demo environment" or sandbox tenant behavior.
  • Real (non-QA) onboarding behavior driven by the backend / Emily knowledge base.