integrations: Load optional fields for fixtureless screenshot configs.

The hardcoded content (topic and message) for the screenshot configs are
loaded from `fixtureless_integrations.py`. Add a new
FIXTURELESS_SCREENSHOT_CONFIG_OPTIONAL_FIELDS dict to maintain the
optional fields of fixtureless screenshot configs, and load both into
FIXTURELESS_SCREENSHOT_CONFIG.

This commit does not set any screenshot configs, but only adds the
framework.
This commit is contained in:
Niloth P
2025-07-22 04:43:20 +05:30
committed by Tim Abbott
parent c7a6fcaf88
commit 23a8e26741

View File

@@ -862,6 +862,14 @@ for integration, screenshots_contents in FIXTURELESS_SCREENSHOT_CONTENT.items():
for screenshot_content in screenshots_contents
]
FIXTURELESS_SCREENSHOT_CONFIG_OPTIONAL_FIELDS = {}
for integration, fields in FIXTURELESS_SCREENSHOT_CONFIG_OPTIONAL_FIELDS.items():
assert integration in FIXTURELESS_SCREENSHOT_CONFIG
for field_name, value in fields.items():
# Assume a single screenshot config for each integration
setattr(FIXTURELESS_SCREENSHOT_CONFIG[integration][0], field_name, value)
DOC_SCREENSHOT_CONFIG: dict[
str, list[WebhookScreenshotConfig] | list[FixturelessScreenshotConfig]
] = {