pub const SDK_FEATURES: &[&str] = &[
"softNavigate",
"snapshotActiveTab",
"snapshotRegistration",
"tabActivation",
"flatErrorEnvelope",
"actionOverlay",
"bookmarksSingleton",
"findBroadened",
"waitForElement",
"stubRegistry",
"stubVerify",
"pagePlaybook",
"snapshotAvailableTabs",
"componentTree",
"errorClosestMatches",
"frontendReadyFlag",
"snapshotF3",
"snapshotCanonicalElements",
];
pub const SDK_FEATURE_DOC_URL: &str =
"https://github.com/qontinui/ui-bridge/blob/main/docs-site/docs/api/runner-features.md";
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn sdk_features_non_empty_and_contains_known_anchors() {
assert!(!SDK_FEATURES.is_empty(), "SDK_FEATURES must not be empty");
for required in [
"softNavigate",
"snapshotRegistration",
"actionOverlay",
"waitForElement",
"snapshotF3",
"snapshotCanonicalElements",
] {
assert!(
SDK_FEATURES.contains(&required),
"SDK_FEATURES must contain {required:?}"
);
}
}
#[test]
fn sdk_feature_doc_url_is_https() {
assert!(
SDK_FEATURE_DOC_URL.starts_with("https://"),
"SDK_FEATURE_DOC_URL must be HTTPS"
);
}
}