Skip to content

Demo Full Onboarding (Reseller) - QA/Testing

Overview

demo-full is not a POS provider and not a special onboarding flow. It is one of three interchangeable values accepted by the qa_demo_provider QA-bypass flag. The other two values, demo-minimal and demo-standard, behave identically — the code treats all three the same and does nothing different for full.

This bypass exists only so QA/Playwright can reach post-POS features (online ordering, menus, etc.) without performing real POS setup. It is test-only and never active in production or staging.


How the bypass works

The flag is read from the browser's localStorage under the key qa_demo_provider. It only takes effect in non-production/non-staging environments.

  • isTestEnv is true only when VITE_ENV is not production or staging (src/config/helpers.ts:384const isTestEnv = !['production', 'staging'].includes(import.meta.env.VITE_ENV)).
  • The three accepted values are defined in one place (src/store/modules/app.ts:10const DEMO_POS_CHANNELS = ['demo-minimal', 'demo-standard', 'demo-full']).

When isTestEnv is true and localStorage.qa_demo_provider is one of those three values, fetchOnboardingState short-circuits before any backend call and commits a simulated "completed" onboarding state (src/store/modules/app.ts:628-643):

js
const demoState = {
  pos_provider: qaDemoProvider, // 'demo-full' | 'demo-standard' | 'demo-minimal'
  phase: 'completed',           // onboarding treated as done
  setup_steps: [],              // no setup steps at all
  completed_steps: [],
  answers: {}
}

Two supporting hooks reference the same flag/value list:

  • The demo key is injected into the available in-house channel keys so the "POS connected" check passes (src/store/modules/app.ts:289-299).
  • The Emily widget exposes isQADemoMode and lets the store state drive the onboarding phase instead of forcing completed from a real POS connection (src/components/emily/EmilyWidget.vue:356-364).

To enable it, a tester sets localStorage.setItem('qa_demo_provider', 'demo-full') in a test environment. There is no ?demo=full (or any) URL parameter — no such query handling exists in the code.


What it does NOT do

The following were previously documented but are not present in the code:

  • No prerequisite chain. demo-full does not require (or trigger) Store Branding, Billing Profile, Location creation, or location selection. The bypass sets setup_steps: []. The real per-provider setup steps (branding, billing, location, etc.) live in BASE_SETUP_STEPS (src/components/dialogs/guided-setup/types.ts:121+) and are defined only for the actual POS providers (upvendo, hendrickx, square, mpluskassa, shopcaisse, vanhoutte, lightspeed). None of the three demo values appear there.
  • No discovery questions. There is no channel-selection question or deterministic discovery_questions/setup_steps JSON contract keyed off the demo value.
  • No auto-created resources. No demo POS connection record, sample menu, test items, or mock payment configuration is created. The bypass only mutates the front-end Vuex onboarding state in the browser.
  • No backend involvement. qa_demo_provider, demo-full, demo-minimal, demo-standard, and DEMO_POS_CHANNELS have no references in upvendo-backend (app/, config/, routes/). The flag never reaches the server; it short-circuits the front-end fetchOnboardingState action.
  • No Emily seeding script tied to this value.

Code references

  • src/config/helpers.ts:384isTestEnv definition (VITE_ENV not in ['production','staging']).
  • src/store/modules/app.ts:10DEMO_POS_CHANNELS (the three accepted values).
  • src/store/modules/app.ts:75-78 — demo keys added to POS_CHANNELS only when isTestEnv.
  • src/store/modules/app.ts:289-299getAvailableInHouseChannelKeys injects the demo key in QA mode.
  • src/store/modules/app.ts:623-643fetchOnboardingState QA bypass (forces phase: 'completed', setup_steps: []).
  • src/components/emily/EmilyWidget.vue:356-364isQADemoMode gating.

Not verified here

The following were referenced in prior versions of this doc but are outside the verified code path above and were not confirmed against production code: reseller signup, the sales process, and any externally provisioned demo environment.