@admoai/sdk-scenarios 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/scenarios.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "schemaVersion": 1,
3
- "description": "Shared cross-SDK E2E scenario manifest. ONE definition, executed by a thin interpreter in each SDK, so the three suites cannot drift. Declarative only: given a request, expect an outcome. Sponsored Pin tracking scenarios add `pinTracking`: the point-tracking calls an app makes on the served pins, as data, and the beacons that must reach the engine. Procedural scenarios (log capture, concurrency, retry, TTL waits) stay hand-written per SDK. Mirrored byte-identically into all three repos; a checksum test fails the build if the copies diverge. Every expected value here was verified against a live local decision-engine before being written.",
2
+ "schemaVersion": 3,
3
+ "description": "Shared cross-SDK E2E scenario manifest. ONE definition, executed by a thin interpreter in each SDK, so the three suites cannot drift. Declarative only: given a request, expect an outcome. Sponsored Pin tracking scenarios add `pinTracking`: the point-tracking calls an app makes on the served pins, as data, and the beacons that must reach the engine. Procedural scenarios (log capture, concurrency, retry, TTL waits) stay hand-written per SDK. Mirrored byte-identically into all three repos; a checksum test fails the build if the copies diverge. Every expected value here was verified against a live local decision-engine before being written. `fixtureScenarios` (schemaVersion 2) run offline: each decodes one golden decision-wire file (ui/platform/lib/ad-formats/golden-wire in adhub, shipped in this package under fixtures/golden-wire/) after optional `edits`, and asserts what the publisher's app reads from the decoded creative. `contentKeys` is the exact set of plain content keys (slides and matched points are asserted through their own fields); a key in `contentKeysAbsent` must decode as absent (null), never as an empty string or a placeholder; a null in `metadata` means absent. A runner that does not execute fixtureScenarios must refuse schemaVersion 2. A fixture scenario may add `slideTracking` (package 1.3.0, schemaVersion 3; a runner that does not execute it must refuse schemaVersion 3): `steps` the app takes on the decoded creative (`slideView`/`slideClick` with a 1-based slide index, `newResponse`, `fireClick` with a key or null for no key, `custom` with a key) and the beacons that must be dispatched: `beacons` is the exact ordered list of first-party beacons, each named by the tracker it must be (`slide`+`view`/`click`, or creative `click`/`custom`, with `response`), and `thirdPartyBeacons` the exact multiset of third-party tracker ids dispatched (their order is not asserted). An edit `at` `tracking` targets the creative's tracking object.",
4
4
  "scenarios": [
5
5
  {
6
6
  "id": "L1",
@@ -942,5 +942,1283 @@
942
942
  }
943
943
  }
944
944
  }
945
+ ],
946
+ "fixtureScenarios": [
947
+ {
948
+ "id": "F1",
949
+ "title": "a Native Display creative exposes its standard format, version and template source",
950
+ "fixture": {
951
+ "golden": "card.full"
952
+ },
953
+ "expect": {
954
+ "decodes": true,
955
+ "metadata": {
956
+ "effectiveStandardFormatKey": "card",
957
+ "effectiveStandardFormatVersion": 1,
958
+ "templateSource": "admoai_standard"
959
+ },
960
+ "templateKey": "card",
961
+ "contentKeys": [
962
+ "image",
963
+ "brand_logo",
964
+ "headline",
965
+ "supporting_text",
966
+ "cta_text",
967
+ "destination_url"
968
+ ],
969
+ "clickKeys": [
970
+ "default"
971
+ ],
972
+ "customKeys": []
973
+ }
974
+ },
975
+ {
976
+ "id": "F2",
977
+ "title": "a Native Display creative leaves every optional field it was served without absent",
978
+ "fixture": {
979
+ "golden": "card.minimal"
980
+ },
981
+ "expect": {
982
+ "decodes": true,
983
+ "metadata": {
984
+ "effectiveStandardFormatKey": "card",
985
+ "effectiveStandardFormatVersion": 1,
986
+ "templateSource": "admoai_standard"
987
+ },
988
+ "templateKey": "card",
989
+ "contentKeys": [
990
+ "image",
991
+ "destination_url"
992
+ ],
993
+ "contentKeysAbsent": [
994
+ "brand_logo",
995
+ "headline",
996
+ "supporting_text",
997
+ "cta_text"
998
+ ],
999
+ "clickKeys": [
1000
+ "default"
1001
+ ],
1002
+ "customKeys": []
1003
+ }
1004
+ },
1005
+ {
1006
+ "id": "F3",
1007
+ "title": "a template based on a standard keeps the standard's identity and exposes the operator's addition by key",
1008
+ "fixture": {
1009
+ "golden": "card.derived"
1010
+ },
1011
+ "expect": {
1012
+ "decodes": true,
1013
+ "metadata": {
1014
+ "effectiveStandardFormatKey": "card",
1015
+ "effectiveStandardFormatVersion": 1,
1016
+ "templateSource": "based_on_standard"
1017
+ },
1018
+ "templateKey": "city_promo_display",
1019
+ "contentKeys": [
1020
+ "image",
1021
+ "headline",
1022
+ "destination_url",
1023
+ "promo_code"
1024
+ ],
1025
+ "clickKeys": [
1026
+ "default"
1027
+ ],
1028
+ "customKeys": [
1029
+ "save_offer"
1030
+ ]
1031
+ }
1032
+ },
1033
+ {
1034
+ "id": "F4",
1035
+ "title": "a Carousel exposes its slides in server order, each with its id, position, contents and own trackers, and no creative-level click",
1036
+ "fixture": {
1037
+ "golden": "carousel.full"
1038
+ },
1039
+ "expect": {
1040
+ "decodes": true,
1041
+ "metadata": {
1042
+ "effectiveStandardFormatKey": "carousel",
1043
+ "effectiveStandardFormatVersion": 1,
1044
+ "templateSource": "admoai_standard"
1045
+ },
1046
+ "templateKey": "carousel",
1047
+ "contentKeys": [
1048
+ "brand_logo",
1049
+ "disclaimer"
1050
+ ],
1051
+ "clickKeys": [],
1052
+ "customKeys": [],
1053
+ "slides": [
1054
+ {
1055
+ "slideId": "slide_01JDY02N8MA2K2HKQ74989YS99",
1056
+ "position": 1,
1057
+ "contentKeys": [
1058
+ "image",
1059
+ "headline",
1060
+ "supporting_text",
1061
+ "cta_text",
1062
+ "destination_url"
1063
+ ],
1064
+ "viewKeys": [
1065
+ "slide_view"
1066
+ ],
1067
+ "clickKeys": [
1068
+ "default"
1069
+ ]
1070
+ },
1071
+ {
1072
+ "slideId": "slide_01JD04H8GY801VF8Y0FHETP6XA",
1073
+ "position": 2,
1074
+ "contentKeys": [
1075
+ "image",
1076
+ "headline",
1077
+ "supporting_text",
1078
+ "cta_text",
1079
+ "destination_url"
1080
+ ],
1081
+ "viewKeys": [
1082
+ "slide_view"
1083
+ ],
1084
+ "clickKeys": [
1085
+ "default"
1086
+ ]
1087
+ },
1088
+ {
1089
+ "slideId": "slide_01JDRGMFSTZXQ7ES1QBCF0DR2X",
1090
+ "position": 3,
1091
+ "contentKeys": [
1092
+ "image",
1093
+ "headline",
1094
+ "supporting_text",
1095
+ "cta_text",
1096
+ "destination_url"
1097
+ ],
1098
+ "viewKeys": [
1099
+ "slide_view"
1100
+ ],
1101
+ "clickKeys": [
1102
+ "default"
1103
+ ]
1104
+ }
1105
+ ]
1106
+ }
1107
+ },
1108
+ {
1109
+ "id": "F5",
1110
+ "title": "a minimal Carousel still exposes its slides and leaves the optional brand logo and disclaimer absent",
1111
+ "fixture": {
1112
+ "golden": "carousel.minimal"
1113
+ },
1114
+ "expect": {
1115
+ "decodes": true,
1116
+ "metadata": {
1117
+ "effectiveStandardFormatKey": "carousel",
1118
+ "effectiveStandardFormatVersion": 1,
1119
+ "templateSource": "admoai_standard"
1120
+ },
1121
+ "templateKey": "carousel",
1122
+ "contentKeys": [],
1123
+ "contentKeysAbsent": [
1124
+ "brand_logo",
1125
+ "disclaimer"
1126
+ ],
1127
+ "clickKeys": [],
1128
+ "customKeys": [],
1129
+ "slides": [
1130
+ {
1131
+ "slideId": "slide_01JDZ725G8017BHW9RQJX7Y56S",
1132
+ "position": 1,
1133
+ "contentKeys": [
1134
+ "image",
1135
+ "destination_url"
1136
+ ],
1137
+ "viewKeys": [
1138
+ "slide_view"
1139
+ ],
1140
+ "clickKeys": [
1141
+ "default"
1142
+ ]
1143
+ },
1144
+ {
1145
+ "slideId": "slide_01JD4GNH6TH0XPP5YWCMDKN029",
1146
+ "position": 2,
1147
+ "contentKeys": [
1148
+ "image",
1149
+ "destination_url"
1150
+ ],
1151
+ "viewKeys": [
1152
+ "slide_view"
1153
+ ],
1154
+ "clickKeys": [
1155
+ "default"
1156
+ ]
1157
+ }
1158
+ ]
1159
+ }
1160
+ },
1161
+ {
1162
+ "id": "F6",
1163
+ "title": "a Carousel based on a standard exposes its slides and the operator's addition",
1164
+ "fixture": {
1165
+ "golden": "carousel.derived"
1166
+ },
1167
+ "expect": {
1168
+ "decodes": true,
1169
+ "metadata": {
1170
+ "effectiveStandardFormatKey": "carousel",
1171
+ "effectiveStandardFormatVersion": 1,
1172
+ "templateSource": "based_on_standard"
1173
+ },
1174
+ "templateKey": "city_carousel",
1175
+ "contentKeys": [
1176
+ "promo_code"
1177
+ ],
1178
+ "clickKeys": [],
1179
+ "customKeys": [],
1180
+ "slides": [
1181
+ {
1182
+ "slideId": "slide_01JDS1H8VEM0ABE2PQ0JY6S38W",
1183
+ "position": 1,
1184
+ "contentKeys": [
1185
+ "image",
1186
+ "destination_url"
1187
+ ],
1188
+ "viewKeys": [
1189
+ "slide_view"
1190
+ ],
1191
+ "clickKeys": [
1192
+ "default"
1193
+ ]
1194
+ },
1195
+ {
1196
+ "slideId": "slide_01JDDGXJE0JDBY21Y9KEJDD54A",
1197
+ "position": 2,
1198
+ "contentKeys": [
1199
+ "image",
1200
+ "destination_url"
1201
+ ],
1202
+ "viewKeys": [
1203
+ "slide_view"
1204
+ ],
1205
+ "clickKeys": [
1206
+ "default"
1207
+ ]
1208
+ }
1209
+ ]
1210
+ }
1211
+ },
1212
+ {
1213
+ "id": "F7",
1214
+ "title": "a Tap-to-expand creative exposes expand and close as custom events, apart from its click",
1215
+ "fixture": {
1216
+ "golden": "expandable_banner.full"
1217
+ },
1218
+ "expect": {
1219
+ "decodes": true,
1220
+ "metadata": {
1221
+ "effectiveStandardFormatKey": "expandable_banner",
1222
+ "effectiveStandardFormatVersion": 1,
1223
+ "templateSource": "admoai_standard"
1224
+ },
1225
+ "templateKey": "expandable_banner",
1226
+ "contentKeys": [
1227
+ "teaser_image",
1228
+ "teaser_headline",
1229
+ "expanded_image",
1230
+ "headline",
1231
+ "supporting_text",
1232
+ "cta_text",
1233
+ "destination_url",
1234
+ "disclaimer"
1235
+ ],
1236
+ "clickKeys": [
1237
+ "default"
1238
+ ],
1239
+ "customKeys": [
1240
+ "expand",
1241
+ "close"
1242
+ ]
1243
+ }
1244
+ },
1245
+ {
1246
+ "id": "F8",
1247
+ "title": "a minimal Tap-to-expand creative leaves its optional texts absent and keeps expand and close",
1248
+ "fixture": {
1249
+ "golden": "expandable_banner.minimal"
1250
+ },
1251
+ "expect": {
1252
+ "decodes": true,
1253
+ "metadata": {
1254
+ "effectiveStandardFormatKey": "expandable_banner",
1255
+ "effectiveStandardFormatVersion": 1,
1256
+ "templateSource": "admoai_standard"
1257
+ },
1258
+ "templateKey": "expandable_banner",
1259
+ "contentKeys": [
1260
+ "teaser_image",
1261
+ "expanded_image",
1262
+ "destination_url"
1263
+ ],
1264
+ "contentKeysAbsent": [
1265
+ "teaser_headline",
1266
+ "headline",
1267
+ "supporting_text",
1268
+ "cta_text",
1269
+ "disclaimer"
1270
+ ],
1271
+ "clickKeys": [
1272
+ "default"
1273
+ ],
1274
+ "customKeys": [
1275
+ "expand",
1276
+ "close"
1277
+ ]
1278
+ }
1279
+ },
1280
+ {
1281
+ "id": "F9",
1282
+ "title": "a Branded Assets creative exposes asset tap as a custom event, apart from its click",
1283
+ "fixture": {
1284
+ "golden": "branded_assets.full"
1285
+ },
1286
+ "expect": {
1287
+ "decodes": true,
1288
+ "metadata": {
1289
+ "effectiveStandardFormatKey": "branded_assets",
1290
+ "effectiveStandardFormatVersion": 1,
1291
+ "templateSource": "admoai_standard"
1292
+ },
1293
+ "templateKey": "branded_assets",
1294
+ "contentKeys": [
1295
+ "branded_image",
1296
+ "accessible_label",
1297
+ "destination_url"
1298
+ ],
1299
+ "clickKeys": [
1300
+ "default"
1301
+ ],
1302
+ "customKeys": [
1303
+ "asset_tap"
1304
+ ]
1305
+ }
1306
+ },
1307
+ {
1308
+ "id": "F10",
1309
+ "title": "a Branded Assets creative without a destination has no click, only the asset tap",
1310
+ "fixture": {
1311
+ "golden": "branded_assets.minimal"
1312
+ },
1313
+ "expect": {
1314
+ "decodes": true,
1315
+ "metadata": {
1316
+ "effectiveStandardFormatKey": "branded_assets",
1317
+ "effectiveStandardFormatVersion": 1,
1318
+ "templateSource": "admoai_standard"
1319
+ },
1320
+ "templateKey": "branded_assets",
1321
+ "contentKeys": [
1322
+ "branded_image"
1323
+ ],
1324
+ "contentKeysAbsent": [
1325
+ "accessible_label",
1326
+ "destination_url"
1327
+ ],
1328
+ "clickKeys": [],
1329
+ "customKeys": [
1330
+ "asset_tap"
1331
+ ]
1332
+ }
1333
+ },
1334
+ {
1335
+ "id": "F11",
1336
+ "title": "a Standard Video exposes its video events and click, and no skippable setting",
1337
+ "fixture": {
1338
+ "golden": "standard_video.full"
1339
+ },
1340
+ "expect": {
1341
+ "decodes": true,
1342
+ "metadata": {
1343
+ "effectiveStandardFormatKey": "standard_video",
1344
+ "effectiveStandardFormatVersion": 1,
1345
+ "templateSource": "admoai_standard"
1346
+ },
1347
+ "templateKey": "standard_video",
1348
+ "contentKeys": [
1349
+ "video_asset",
1350
+ "poster_image",
1351
+ "brand_logo",
1352
+ "headline",
1353
+ "supporting_text",
1354
+ "cta_text",
1355
+ "destination_url",
1356
+ "disclaimer"
1357
+ ],
1358
+ "clickKeys": [
1359
+ "default"
1360
+ ],
1361
+ "customKeys": [],
1362
+ "videoEventKeys": [
1363
+ "start",
1364
+ "first_quartile",
1365
+ "midpoint",
1366
+ "third_quartile",
1367
+ "complete"
1368
+ ],
1369
+ "noSkippableSetting": true
1370
+ }
1371
+ },
1372
+ {
1373
+ "id": "F12",
1374
+ "title": "a Standard Video without a destination has no click action or click tracker",
1375
+ "fixture": {
1376
+ "golden": "standard_video.minimal"
1377
+ },
1378
+ "expect": {
1379
+ "decodes": true,
1380
+ "metadata": {
1381
+ "effectiveStandardFormatKey": "standard_video",
1382
+ "effectiveStandardFormatVersion": 1,
1383
+ "templateSource": "admoai_standard"
1384
+ },
1385
+ "templateKey": "standard_video",
1386
+ "contentKeys": [
1387
+ "video_asset",
1388
+ "poster_image"
1389
+ ],
1390
+ "contentKeysAbsent": [
1391
+ "brand_logo",
1392
+ "headline",
1393
+ "supporting_text",
1394
+ "cta_text",
1395
+ "destination_url",
1396
+ "disclaimer"
1397
+ ],
1398
+ "clickKeys": [],
1399
+ "customKeys": [],
1400
+ "videoEventKeys": [
1401
+ "start",
1402
+ "first_quartile",
1403
+ "midpoint",
1404
+ "third_quartile",
1405
+ "complete"
1406
+ ],
1407
+ "noSkippableSetting": true
1408
+ }
1409
+ },
1410
+ {
1411
+ "id": "F13",
1412
+ "title": "a Sponsored Pin creative keeps decoding its matched points as it does today",
1413
+ "fixture": {
1414
+ "golden": "sponsored_pin_location.full"
1415
+ },
1416
+ "expect": {
1417
+ "decodes": true,
1418
+ "metadata": {
1419
+ "effectiveStandardFormatKey": "sponsored_pin_location",
1420
+ "effectiveStandardFormatVersion": 1,
1421
+ "templateSource": "admoai_standard"
1422
+ },
1423
+ "templateKey": "sponsored_pin_location",
1424
+ "contentKeys": [
1425
+ "pinImage",
1426
+ "image",
1427
+ "headline",
1428
+ "description",
1429
+ "ctaText",
1430
+ "defaultDestinationUrl"
1431
+ ],
1432
+ "clickKeys": [
1433
+ "default"
1434
+ ],
1435
+ "customKeys": [],
1436
+ "matchedPoints": 2
1437
+ }
1438
+ },
1439
+ {
1440
+ "id": "F14",
1441
+ "title": "a creative served before the standards (gate off) decodes as today, with the three standard fields absent",
1442
+ "comment": "The engine omits the three standard fields while is_standard_native_formats_enabled is off; this is that wire. Absent means null, never an empty string or a placeholder (BR-SDK-01, BR-SDK-09).",
1443
+ "fixture": {
1444
+ "golden": "card.full",
1445
+ "edits": [
1446
+ {
1447
+ "at": "metadata",
1448
+ "remove": "effectiveStandardFormatKey"
1449
+ },
1450
+ {
1451
+ "at": "metadata",
1452
+ "remove": "effectiveStandardFormatVersion"
1453
+ },
1454
+ {
1455
+ "at": "metadata",
1456
+ "remove": "templateSource"
1457
+ }
1458
+ ]
1459
+ },
1460
+ "expect": {
1461
+ "decodes": true,
1462
+ "metadata": {
1463
+ "effectiveStandardFormatKey": null,
1464
+ "effectiveStandardFormatVersion": null,
1465
+ "templateSource": null
1466
+ },
1467
+ "templateKey": "card",
1468
+ "contentKeys": [
1469
+ "image",
1470
+ "brand_logo",
1471
+ "headline",
1472
+ "supporting_text",
1473
+ "cta_text",
1474
+ "destination_url"
1475
+ ],
1476
+ "clickKeys": [
1477
+ "default"
1478
+ ],
1479
+ "customKeys": []
1480
+ }
1481
+ },
1482
+ {
1483
+ "id": "F15",
1484
+ "title": "fields the SDK does not know yet, at any level, never break decoding",
1485
+ "comment": "An additive field the engine starts sending later must be ignored, not fail the response (BR-SDK-01).",
1486
+ "fixture": {
1487
+ "golden": "carousel.full",
1488
+ "edits": [
1489
+ {
1490
+ "at": "response",
1491
+ "add": "futureField",
1492
+ "value": {
1493
+ "addedLater": true
1494
+ }
1495
+ },
1496
+ {
1497
+ "at": "creative",
1498
+ "add": "futureField",
1499
+ "value": {
1500
+ "addedLater": true
1501
+ }
1502
+ },
1503
+ {
1504
+ "at": "metadata",
1505
+ "add": "futureField",
1506
+ "value": {
1507
+ "addedLater": true
1508
+ }
1509
+ },
1510
+ {
1511
+ "at": "content",
1512
+ "add": "futureField",
1513
+ "value": {
1514
+ "addedLater": true
1515
+ }
1516
+ },
1517
+ {
1518
+ "at": "slide",
1519
+ "add": "futureField",
1520
+ "value": {
1521
+ "addedLater": true
1522
+ }
1523
+ }
1524
+ ]
1525
+ },
1526
+ "expect": {
1527
+ "decodes": true,
1528
+ "metadata": {
1529
+ "effectiveStandardFormatKey": "carousel",
1530
+ "effectiveStandardFormatVersion": 1,
1531
+ "templateSource": "admoai_standard"
1532
+ },
1533
+ "templateKey": "carousel",
1534
+ "contentKeys": [
1535
+ "brand_logo",
1536
+ "disclaimer"
1537
+ ],
1538
+ "clickKeys": [],
1539
+ "customKeys": [],
1540
+ "slides": [
1541
+ {
1542
+ "slideId": "slide_01JDY02N8MA2K2HKQ74989YS99",
1543
+ "position": 1,
1544
+ "contentKeys": [
1545
+ "image",
1546
+ "headline",
1547
+ "supporting_text",
1548
+ "cta_text",
1549
+ "destination_url"
1550
+ ],
1551
+ "viewKeys": [
1552
+ "slide_view"
1553
+ ],
1554
+ "clickKeys": [
1555
+ "default"
1556
+ ]
1557
+ },
1558
+ {
1559
+ "slideId": "slide_01JD04H8GY801VF8Y0FHETP6XA",
1560
+ "position": 2,
1561
+ "contentKeys": [
1562
+ "image",
1563
+ "headline",
1564
+ "supporting_text",
1565
+ "cta_text",
1566
+ "destination_url"
1567
+ ],
1568
+ "viewKeys": [
1569
+ "slide_view"
1570
+ ],
1571
+ "clickKeys": [
1572
+ "default"
1573
+ ]
1574
+ },
1575
+ {
1576
+ "slideId": "slide_01JDRGMFSTZXQ7ES1QBCF0DR2X",
1577
+ "position": 3,
1578
+ "contentKeys": [
1579
+ "image",
1580
+ "headline",
1581
+ "supporting_text",
1582
+ "cta_text",
1583
+ "destination_url"
1584
+ ],
1585
+ "viewKeys": [
1586
+ "slide_view"
1587
+ ],
1588
+ "clickKeys": [
1589
+ "default"
1590
+ ]
1591
+ }
1592
+ ]
1593
+ }
1594
+ },
1595
+ {
1596
+ "id": "F16",
1597
+ "title": "a slide's view beacon is sent once per served response, however often the slide is shown",
1598
+ "comment": "Keyed on the signed view URL, never on the slideId: re-rendering or scrolling back to a slide must not count it again (BR-SDK-04, Q19).",
1599
+ "fixture": {
1600
+ "golden": "carousel.full",
1601
+ "edits": [
1602
+ {
1603
+ "at": "tracking",
1604
+ "add": "thirdPartyTrackers",
1605
+ "value": [
1606
+ {
1607
+ "trackerId": "tpt_fixture_click_any",
1608
+ "eventType": "click",
1609
+ "matchType": "any",
1610
+ "url": "https://adserver.example/click?c=any"
1611
+ },
1612
+ {
1613
+ "trackerId": "tpt_fixture_click_default",
1614
+ "eventType": "click",
1615
+ "matchType": "specific",
1616
+ "eventKey": "default",
1617
+ "url": "https://adserver.example/click?c=default"
1618
+ },
1619
+ {
1620
+ "trackerId": "tpt_fixture_click_other",
1621
+ "eventType": "click",
1622
+ "matchType": "specific",
1623
+ "eventKey": "save_offer",
1624
+ "url": "https://adserver.example/click?c=other"
1625
+ },
1626
+ {
1627
+ "trackerId": "tpt_fixture_impression",
1628
+ "eventType": "impression",
1629
+ "url": "https://adserver.example/imp"
1630
+ }
1631
+ ]
1632
+ }
1633
+ ]
1634
+ },
1635
+ "expect": {
1636
+ "decodes": true
1637
+ },
1638
+ "slideTracking": {
1639
+ "steps": [
1640
+ {
1641
+ "slideView": 1
1642
+ },
1643
+ {
1644
+ "slideView": 1
1645
+ },
1646
+ {
1647
+ "slideView": 2
1648
+ },
1649
+ {
1650
+ "slideView": 1
1651
+ }
1652
+ ],
1653
+ "expect": {
1654
+ "beacons": [
1655
+ {
1656
+ "slide": 1,
1657
+ "view": "slide_view"
1658
+ },
1659
+ {
1660
+ "slide": 2,
1661
+ "view": "slide_view"
1662
+ }
1663
+ ],
1664
+ "thirdPartyBeacons": []
1665
+ }
1666
+ }
1667
+ },
1668
+ {
1669
+ "id": "F17",
1670
+ "title": "the same slide in a new decision response counts again",
1671
+ "comment": "A new response carries new signed URLs for the same slides. The runner simulates it by decoding the same golden file again with every first-party tracker URL suffixed `&response=N` (N = 2, 3, ...); `response` in an expected beacon names which one (default 1).",
1672
+ "fixture": {
1673
+ "golden": "carousel.full",
1674
+ "edits": [
1675
+ {
1676
+ "at": "tracking",
1677
+ "add": "thirdPartyTrackers",
1678
+ "value": [
1679
+ {
1680
+ "trackerId": "tpt_fixture_click_any",
1681
+ "eventType": "click",
1682
+ "matchType": "any",
1683
+ "url": "https://adserver.example/click?c=any"
1684
+ },
1685
+ {
1686
+ "trackerId": "tpt_fixture_click_default",
1687
+ "eventType": "click",
1688
+ "matchType": "specific",
1689
+ "eventKey": "default",
1690
+ "url": "https://adserver.example/click?c=default"
1691
+ },
1692
+ {
1693
+ "trackerId": "tpt_fixture_click_other",
1694
+ "eventType": "click",
1695
+ "matchType": "specific",
1696
+ "eventKey": "save_offer",
1697
+ "url": "https://adserver.example/click?c=other"
1698
+ },
1699
+ {
1700
+ "trackerId": "tpt_fixture_impression",
1701
+ "eventType": "impression",
1702
+ "url": "https://adserver.example/imp"
1703
+ }
1704
+ ]
1705
+ }
1706
+ ]
1707
+ },
1708
+ "expect": {
1709
+ "decodes": true
1710
+ },
1711
+ "slideTracking": {
1712
+ "steps": [
1713
+ {
1714
+ "slideView": 1
1715
+ },
1716
+ {
1717
+ "newResponse": true
1718
+ },
1719
+ {
1720
+ "slideView": 1
1721
+ },
1722
+ {
1723
+ "slideView": 1
1724
+ }
1725
+ ],
1726
+ "expect": {
1727
+ "beacons": [
1728
+ {
1729
+ "slide": 1,
1730
+ "view": "slide_view"
1731
+ },
1732
+ {
1733
+ "slide": 1,
1734
+ "view": "slide_view",
1735
+ "response": 2
1736
+ }
1737
+ ],
1738
+ "thirdPartyBeacons": []
1739
+ }
1740
+ }
1741
+ },
1742
+ {
1743
+ "id": "F18",
1744
+ "title": "a slide clicked before its view was sent sends the view, then the click, then the creative's applicable third-party click trackers once",
1745
+ "comment": "Applicable means a click tracker matching any click, or the `default` click specifically; a tracker for another click key and an impression tracker do not fire (BR-SDK-05, Q14, Q18).",
1746
+ "fixture": {
1747
+ "golden": "carousel.full",
1748
+ "edits": [
1749
+ {
1750
+ "at": "tracking",
1751
+ "add": "thirdPartyTrackers",
1752
+ "value": [
1753
+ {
1754
+ "trackerId": "tpt_fixture_click_any",
1755
+ "eventType": "click",
1756
+ "matchType": "any",
1757
+ "url": "https://adserver.example/click?c=any"
1758
+ },
1759
+ {
1760
+ "trackerId": "tpt_fixture_click_default",
1761
+ "eventType": "click",
1762
+ "matchType": "specific",
1763
+ "eventKey": "default",
1764
+ "url": "https://adserver.example/click?c=default"
1765
+ },
1766
+ {
1767
+ "trackerId": "tpt_fixture_click_other",
1768
+ "eventType": "click",
1769
+ "matchType": "specific",
1770
+ "eventKey": "save_offer",
1771
+ "url": "https://adserver.example/click?c=other"
1772
+ },
1773
+ {
1774
+ "trackerId": "tpt_fixture_impression",
1775
+ "eventType": "impression",
1776
+ "url": "https://adserver.example/imp"
1777
+ }
1778
+ ]
1779
+ }
1780
+ ]
1781
+ },
1782
+ "expect": {
1783
+ "decodes": true
1784
+ },
1785
+ "slideTracking": {
1786
+ "steps": [
1787
+ {
1788
+ "slideClick": 2
1789
+ }
1790
+ ],
1791
+ "expect": {
1792
+ "beacons": [
1793
+ {
1794
+ "slide": 2,
1795
+ "view": "slide_view"
1796
+ },
1797
+ {
1798
+ "slide": 2,
1799
+ "click": "default"
1800
+ }
1801
+ ],
1802
+ "thirdPartyBeacons": [
1803
+ "tpt_fixture_click_any",
1804
+ "tpt_fixture_click_default"
1805
+ ]
1806
+ }
1807
+ }
1808
+ },
1809
+ {
1810
+ "id": "F19",
1811
+ "title": "a slide clicked after its view sends only the click, on every click",
1812
+ "fixture": {
1813
+ "golden": "carousel.full",
1814
+ "edits": [
1815
+ {
1816
+ "at": "tracking",
1817
+ "add": "thirdPartyTrackers",
1818
+ "value": [
1819
+ {
1820
+ "trackerId": "tpt_fixture_click_any",
1821
+ "eventType": "click",
1822
+ "matchType": "any",
1823
+ "url": "https://adserver.example/click?c=any"
1824
+ },
1825
+ {
1826
+ "trackerId": "tpt_fixture_click_default",
1827
+ "eventType": "click",
1828
+ "matchType": "specific",
1829
+ "eventKey": "default",
1830
+ "url": "https://adserver.example/click?c=default"
1831
+ },
1832
+ {
1833
+ "trackerId": "tpt_fixture_click_other",
1834
+ "eventType": "click",
1835
+ "matchType": "specific",
1836
+ "eventKey": "save_offer",
1837
+ "url": "https://adserver.example/click?c=other"
1838
+ },
1839
+ {
1840
+ "trackerId": "tpt_fixture_impression",
1841
+ "eventType": "impression",
1842
+ "url": "https://adserver.example/imp"
1843
+ }
1844
+ ]
1845
+ }
1846
+ ]
1847
+ },
1848
+ "expect": {
1849
+ "decodes": true
1850
+ },
1851
+ "slideTracking": {
1852
+ "steps": [
1853
+ {
1854
+ "slideView": 2
1855
+ },
1856
+ {
1857
+ "slideClick": 2
1858
+ },
1859
+ {
1860
+ "slideClick": 2
1861
+ }
1862
+ ],
1863
+ "expect": {
1864
+ "beacons": [
1865
+ {
1866
+ "slide": 2,
1867
+ "view": "slide_view"
1868
+ },
1869
+ {
1870
+ "slide": 2,
1871
+ "click": "default"
1872
+ },
1873
+ {
1874
+ "slide": 2,
1875
+ "click": "default"
1876
+ }
1877
+ ],
1878
+ "thirdPartyBeacons": [
1879
+ "tpt_fixture_click_any",
1880
+ "tpt_fixture_click_default",
1881
+ "tpt_fixture_click_any",
1882
+ "tpt_fixture_click_default"
1883
+ ]
1884
+ }
1885
+ }
1886
+ },
1887
+ {
1888
+ "id": "F20",
1889
+ "title": "slide views never send third-party click trackers",
1890
+ "fixture": {
1891
+ "golden": "carousel.full",
1892
+ "edits": [
1893
+ {
1894
+ "at": "tracking",
1895
+ "add": "thirdPartyTrackers",
1896
+ "value": [
1897
+ {
1898
+ "trackerId": "tpt_fixture_click_any",
1899
+ "eventType": "click",
1900
+ "matchType": "any",
1901
+ "url": "https://adserver.example/click?c=any"
1902
+ },
1903
+ {
1904
+ "trackerId": "tpt_fixture_click_default",
1905
+ "eventType": "click",
1906
+ "matchType": "specific",
1907
+ "eventKey": "default",
1908
+ "url": "https://adserver.example/click?c=default"
1909
+ },
1910
+ {
1911
+ "trackerId": "tpt_fixture_click_other",
1912
+ "eventType": "click",
1913
+ "matchType": "specific",
1914
+ "eventKey": "save_offer",
1915
+ "url": "https://adserver.example/click?c=other"
1916
+ },
1917
+ {
1918
+ "trackerId": "tpt_fixture_impression",
1919
+ "eventType": "impression",
1920
+ "url": "https://adserver.example/imp"
1921
+ }
1922
+ ]
1923
+ }
1924
+ ]
1925
+ },
1926
+ "expect": {
1927
+ "decodes": true
1928
+ },
1929
+ "slideTracking": {
1930
+ "steps": [
1931
+ {
1932
+ "slideView": 1
1933
+ },
1934
+ {
1935
+ "slideView": 2
1936
+ },
1937
+ {
1938
+ "slideView": 3
1939
+ }
1940
+ ],
1941
+ "expect": {
1942
+ "beacons": [
1943
+ {
1944
+ "slide": 1,
1945
+ "view": "slide_view"
1946
+ },
1947
+ {
1948
+ "slide": 2,
1949
+ "view": "slide_view"
1950
+ },
1951
+ {
1952
+ "slide": 3,
1953
+ "view": "slide_view"
1954
+ }
1955
+ ],
1956
+ "thirdPartyBeacons": []
1957
+ }
1958
+ }
1959
+ },
1960
+ {
1961
+ "id": "F21",
1962
+ "title": "a Carousel has no creative-level click: fireClick sends nothing, so slide clicks go through the slide helper",
1963
+ "comment": "Publishers must not route a slide tap through fireClick (BR-SDK-03, Q9).",
1964
+ "fixture": {
1965
+ "golden": "carousel.full",
1966
+ "edits": [
1967
+ {
1968
+ "at": "tracking",
1969
+ "add": "thirdPartyTrackers",
1970
+ "value": [
1971
+ {
1972
+ "trackerId": "tpt_fixture_click_any",
1973
+ "eventType": "click",
1974
+ "matchType": "any",
1975
+ "url": "https://adserver.example/click?c=any"
1976
+ },
1977
+ {
1978
+ "trackerId": "tpt_fixture_click_default",
1979
+ "eventType": "click",
1980
+ "matchType": "specific",
1981
+ "eventKey": "default",
1982
+ "url": "https://adserver.example/click?c=default"
1983
+ },
1984
+ {
1985
+ "trackerId": "tpt_fixture_click_other",
1986
+ "eventType": "click",
1987
+ "matchType": "specific",
1988
+ "eventKey": "save_offer",
1989
+ "url": "https://adserver.example/click?c=other"
1990
+ },
1991
+ {
1992
+ "trackerId": "tpt_fixture_impression",
1993
+ "eventType": "impression",
1994
+ "url": "https://adserver.example/imp"
1995
+ }
1996
+ ]
1997
+ }
1998
+ ]
1999
+ },
2000
+ "expect": {
2001
+ "decodes": true
2002
+ },
2003
+ "slideTracking": {
2004
+ "steps": [
2005
+ {
2006
+ "fireClick": null
2007
+ }
2008
+ ],
2009
+ "expect": {
2010
+ "beacons": [],
2011
+ "thirdPartyBeacons": []
2012
+ }
2013
+ }
2014
+ },
2015
+ {
2016
+ "id": "F22",
2017
+ "title": "fireClick with no key sends the default click of a standard",
2018
+ "comment": "Every standard seeds its click with key `default`, which is what fireClick sends without a key (BR-SDK-06, Q12).",
2019
+ "fixture": {
2020
+ "golden": "card.full",
2021
+ "edits": [
2022
+ {
2023
+ "at": "tracking",
2024
+ "add": "thirdPartyTrackers",
2025
+ "value": [
2026
+ {
2027
+ "trackerId": "tpt_fixture_click_any",
2028
+ "eventType": "click",
2029
+ "matchType": "any",
2030
+ "url": "https://adserver.example/click?c=any"
2031
+ },
2032
+ {
2033
+ "trackerId": "tpt_fixture_click_default",
2034
+ "eventType": "click",
2035
+ "matchType": "specific",
2036
+ "eventKey": "default",
2037
+ "url": "https://adserver.example/click?c=default"
2038
+ },
2039
+ {
2040
+ "trackerId": "tpt_fixture_click_other",
2041
+ "eventType": "click",
2042
+ "matchType": "specific",
2043
+ "eventKey": "save_offer",
2044
+ "url": "https://adserver.example/click?c=other"
2045
+ },
2046
+ {
2047
+ "trackerId": "tpt_fixture_impression",
2048
+ "eventType": "impression",
2049
+ "url": "https://adserver.example/imp"
2050
+ }
2051
+ ]
2052
+ }
2053
+ ]
2054
+ },
2055
+ "expect": {
2056
+ "decodes": true
2057
+ },
2058
+ "slideTracking": {
2059
+ "steps": [
2060
+ {
2061
+ "fireClick": null
2062
+ }
2063
+ ],
2064
+ "expect": {
2065
+ "beacons": [
2066
+ {
2067
+ "click": "default"
2068
+ }
2069
+ ],
2070
+ "thirdPartyBeacons": [
2071
+ "tpt_fixture_click_any",
2072
+ "tpt_fixture_click_default"
2073
+ ]
2074
+ }
2075
+ }
2076
+ },
2077
+ {
2078
+ "id": "F23",
2079
+ "title": "expand and close are sent verbatim as custom events and are not clicks",
2080
+ "comment": "The publisher calls them when the banner actually expands or closes; no click is sent and no third-party click tracker fires (BR-SDK-07).",
2081
+ "fixture": {
2082
+ "golden": "expandable_banner.full",
2083
+ "edits": [
2084
+ {
2085
+ "at": "tracking",
2086
+ "add": "thirdPartyTrackers",
2087
+ "value": [
2088
+ {
2089
+ "trackerId": "tpt_fixture_click_any",
2090
+ "eventType": "click",
2091
+ "matchType": "any",
2092
+ "url": "https://adserver.example/click?c=any"
2093
+ },
2094
+ {
2095
+ "trackerId": "tpt_fixture_click_default",
2096
+ "eventType": "click",
2097
+ "matchType": "specific",
2098
+ "eventKey": "default",
2099
+ "url": "https://adserver.example/click?c=default"
2100
+ },
2101
+ {
2102
+ "trackerId": "tpt_fixture_click_other",
2103
+ "eventType": "click",
2104
+ "matchType": "specific",
2105
+ "eventKey": "save_offer",
2106
+ "url": "https://adserver.example/click?c=other"
2107
+ },
2108
+ {
2109
+ "trackerId": "tpt_fixture_impression",
2110
+ "eventType": "impression",
2111
+ "url": "https://adserver.example/imp"
2112
+ }
2113
+ ]
2114
+ }
2115
+ ]
2116
+ },
2117
+ "expect": {
2118
+ "decodes": true
2119
+ },
2120
+ "slideTracking": {
2121
+ "steps": [
2122
+ {
2123
+ "custom": "expand"
2124
+ },
2125
+ {
2126
+ "custom": "close"
2127
+ }
2128
+ ],
2129
+ "expect": {
2130
+ "beacons": [
2131
+ {
2132
+ "custom": "expand"
2133
+ },
2134
+ {
2135
+ "custom": "close"
2136
+ }
2137
+ ],
2138
+ "thirdPartyBeacons": []
2139
+ }
2140
+ }
2141
+ },
2142
+ {
2143
+ "id": "F24",
2144
+ "title": "an asset tap is sent verbatim as a custom event and is not a click",
2145
+ "comment": "BR-SDK-07.",
2146
+ "fixture": {
2147
+ "golden": "branded_assets.full",
2148
+ "edits": [
2149
+ {
2150
+ "at": "tracking",
2151
+ "add": "thirdPartyTrackers",
2152
+ "value": [
2153
+ {
2154
+ "trackerId": "tpt_fixture_click_any",
2155
+ "eventType": "click",
2156
+ "matchType": "any",
2157
+ "url": "https://adserver.example/click?c=any"
2158
+ },
2159
+ {
2160
+ "trackerId": "tpt_fixture_click_default",
2161
+ "eventType": "click",
2162
+ "matchType": "specific",
2163
+ "eventKey": "default",
2164
+ "url": "https://adserver.example/click?c=default"
2165
+ },
2166
+ {
2167
+ "trackerId": "tpt_fixture_click_other",
2168
+ "eventType": "click",
2169
+ "matchType": "specific",
2170
+ "eventKey": "save_offer",
2171
+ "url": "https://adserver.example/click?c=other"
2172
+ },
2173
+ {
2174
+ "trackerId": "tpt_fixture_impression",
2175
+ "eventType": "impression",
2176
+ "url": "https://adserver.example/imp"
2177
+ }
2178
+ ]
2179
+ }
2180
+ ]
2181
+ },
2182
+ "expect": {
2183
+ "decodes": true
2184
+ },
2185
+ "slideTracking": {
2186
+ "steps": [
2187
+ {
2188
+ "custom": "asset_tap"
2189
+ }
2190
+ ],
2191
+ "expect": {
2192
+ "beacons": [
2193
+ {
2194
+ "custom": "asset_tap"
2195
+ }
2196
+ ],
2197
+ "thirdPartyBeacons": []
2198
+ }
2199
+ }
2200
+ },
2201
+ {
2202
+ "id": "F25",
2203
+ "title": "a Standard Video without a destination sends no click",
2204
+ "comment": "No destination means no click action and no click tracker (BR-SDK-08).",
2205
+ "fixture": {
2206
+ "golden": "standard_video.minimal"
2207
+ },
2208
+ "expect": {
2209
+ "decodes": true
2210
+ },
2211
+ "slideTracking": {
2212
+ "steps": [
2213
+ {
2214
+ "fireClick": null
2215
+ }
2216
+ ],
2217
+ "expect": {
2218
+ "beacons": [],
2219
+ "thirdPartyBeacons": []
2220
+ }
2221
+ }
2222
+ }
945
2223
  ]
946
2224
  }