Comprehensive E2E Host Test

← Test Suite

How to Use This Page

  1. Start the host dev server (port 4000) and guest dev server (port 4001).
  2. Buttons in Column 1 (left) execute host-side actions.
  3. Column 2 (center) shows embedded guest iframes — interact with them to invoke methods, subscribe to events, etc.
  4. Column 3 (right) shows live results: Event Log, callContext, dispatch results, and the guest list.
  5. Work through the buttons top to bottom for the recommended flow. Each button is labelled with a test case ID (TC-xxx).

Recommended Flow

  1. Load guests: TC-LOAD-01 (embed) → TC-LOAD-02 (popup) → TC-LOAD-04 (with params). Check Event Log for "loaded" messages.
  2. Scripting objects: TC-SO-01 (add Inventory). In the guest iframe, call getObject("Inventory") and invoke getStock(). Check return value and callContext.
  3. Events: In the guest, subscribe to Loan.onPreSave. Then click TC-EVT-01 on the host. Guest should receive the event.
  4. Lifecycle: TC-LIFE-01 (unload), TC-LIFE-03 (close host). Verify guests are removed and host is destroyed.

Guest Loading

Expected: guest iframe appears in center column, log shows "loaded"

Expected: new browser popup window opens

Expected: 3 guest iframes load, "List all guests" shows 3+ entries

Expected: guest shows URL params in its "Params:" line

Expected: when guest invokes a method, callContext.callChain shows metadata

Expected: log shows "ERROR" or onError callback fires

Scripting Object Management

Expected: guest can now getObject("Inventory") and invoke its methods

Expected: only the target guest can access this object, others get "not available"

Expected: guest's getObject("Inventory") now fails

Expected: all getObject calls fail until objects are re-added

Event Dispatching

Expected: all guests subscribed to onPreSave receive the event

Expected: only the targeted guest receives the event

Expected: Dispatch Results shows the guest's feedback return value

Expected: only guests subscribed with matching criteria receive it

Guest Lifecycle

Expected: guest iframe removed, "List all guests" count decreases

Expected: log shows callback registered; fires when guest calls close()

Expected: Guest List panel shows all currently loaded guests

Expected: all guests unloaded, host destroyed, further actions fail

Sandbox Configuration

Expected: iframe has standard sandbox attributes

Expected: iframe sandbox attribute reflects custom permissions

Expected: iframe has no sandbox attribute (full permissions)

Embedded Guests

Sandbox Test Container

Event Log

callContext (last invocation)

callContext.guest

callContext.callChain

Dispatch Results

Guest List

Verification Checklist

Guest Loading

Scripting Objects & Events

Lifecycle & Sandbox