Skip to main content

jellyflow_runtime/runtime/conformance/scenario/action/
rendering.rs

1use crate::runtime::rendering::RenderingQueryResult;
2use jellyflow_core::core::CanvasSize;
3
4use super::ConformanceAction;
5
6pub(super) fn kind(action: &ConformanceAction) -> Option<&'static str> {
7    Some(match action {
8        ConformanceAction::AssertRenderingQuery { .. } => "assert_rendering_query",
9        _ => return None,
10    })
11}
12
13impl ConformanceAction {
14    pub fn assert_rendering_query(
15        viewport_size: CanvasSize,
16        expected: RenderingQueryResult,
17    ) -> Self {
18        Self::AssertRenderingQuery {
19            viewport_size,
20            expected,
21        }
22    }
23}