mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
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:
@@ -862,6 +862,14 @@ for integration, screenshots_contents in FIXTURELESS_SCREENSHOT_CONTENT.items():
|
|||||||
for screenshot_content in screenshots_contents
|
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[
|
DOC_SCREENSHOT_CONFIG: dict[
|
||||||
str, list[WebhookScreenshotConfig] | list[FixturelessScreenshotConfig]
|
str, list[WebhookScreenshotConfig] | list[FixturelessScreenshotConfig]
|
||||||
] = {
|
] = {
|
||||||
|
Reference in New Issue
Block a user