@admoai/sdk-scenarios 1.1.0 → 1.2.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": 2,
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.",
4
4
  "scenarios": [
5
5
  {
6
6
  "id": "L1",
@@ -942,5 +942,655 @@
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
+ }
945
1595
  ]
946
1596
  }