diff --git a/test/async-stub.html b/test/async-stub.html new file mode 100644 index 0000000..ca583e1 --- /dev/null +++ b/test/async-stub.html @@ -0,0 +1,206 @@ + + + + + + + Async Stub QA - Surface Form + + + + + + + + + +
+

Async Stub QA

+

← Back to Test Suite

+ +
+ What this page verifies: every embed below is constructed + before the async tag loads — the stub queues the calls and the tag + replays them on arrival. Covers embedding (slideover / popup / inline), + pre-filling, the email input trigger, pre-loading, and an early + SurfaceSetConsent call.

+ Scenarios: ?tagDelay=3000 (slow tag on a fast site), + ?tagDelay=8000 (interact before the tag exists), + ?noTag=1 (tag never loads — page must stay functional, + forms simply don't open). +
+ Form Source:
+ Environment ID:
+ Debug Mode: false (add &surfaceDebug=true to enable) +
+ +

Stub status

+
+

Tag script: not injected yet

+

Calls queued before tag load: ?

+

Tag drained the queue: waiting…

+

Stub references re-pointed at real embeds: waiting…

+

Surface iframes in DOM (watch pre-loading kick in after page load): 0

+

Embeds after drain:

+
+ +

Events Summary

+
+
0
Total Events
+
0
Sent to Iframe
+
0
Received from Iframe
+
0
STORE_UPDATE
+
0
LEAD_DATA_UPDATE
+
0
SEND_DATA
+
+ +

Events Log

+
+ + +
+
+ +
+

1. Slideover embedding

+

Constructed pre-load. With ?tagDelay=8000: the trigger button is + inert until the tag arrives (expected — no handler exists yet), but the kept + stub reference queues the call and the slideover opens right after the drain.

+
+ + +
+
+ +
+

2. Popup embedding + pre-filling

+

Constructed pre-load with prefillData. Open it and check the + pre-filled answer; the STORE_UPDATE payload in the log carries it as + questionIds. Override with + ?prefillQid=<questionId>&prefillVal=<value> + to target a real question on your form.

+
+ +
+
+ +
+

3. Email input trigger

+

Constructed pre-load as an input-trigger embed. Enter an email + and submit — the form opens with the email pre-filled.

+
+
+ + + +
+
+
+ +
+

4. Inline embedding

+

Constructed pre-load. The form must appear below on its own once the tag + drains the queue — no interaction needed.

+
+
+ +
+

5. Pre-loading

+

All embeds above use the default preload: "true" (page load + + idle). Without clicking anything, the iframe count in the status panel + should rise shortly after the tag loads — that is pre-loading working + through the async path.

+
+
+ + + + + + diff --git a/test/index.html b/test/index.html index 1a64fca..faaa5f9 100644 --- a/test/index.html +++ b/test/index.html @@ -56,6 +56,11 @@

5. Direct Iframe

Customer-embedded iframe with a slow (?tagDelay=3000) or blocked (?noTag=1) tag.

Test Direct Iframe → +