Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions crates/flowproof-cli/tests/examples_resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
use flowproof_agent::{FlowSpec, SuiteManifest};

const FIORI_SPEC: &str = include_str!("../../../examples/fiori/manage-info-records.flow.yaml");
const PURCHASE_INFO_RECORDS_SPEC: &str =
include_str!("../../../examples/fiori/purchase-info-records-report.flow.yaml");
const FIORI_SUITE: &str = include_str!("../../../examples/fiori/suite.yaml");
const CONN_TEST_SPEC: &str = include_str!("../../../examples/api/connection-test.flow.yaml");
/// The npm-path agent quickstart. It is the first example a reader coming
Expand Down Expand Up @@ -65,6 +67,21 @@ fn fiori_example_resolves_entirely_via_rules() {
}
}

/// Unlike `fiori_example_resolves_entirely_via_rules`, this example's header
/// deliberately promises two flagged TODOs left unresolved for `flowproof
/// record` to fill in against the live screen, not guessed here — so this
/// test only proves the file parses, and does not run every step through
/// `rules::resolve_step` (the two TODO steps are plain prose by design and
/// are not expected to resolve).
#[test]
fn purchase_info_records_example_parses_as_a_multi_surface_flow() {
let spec = FlowSpec::parse(PURCHASE_INFO_RECORDS_SPEC).expect("example parses");
assert!(
spec.apps.contains_key("fiori") && spec.apps.contains_key("excel"),
"flow declares both the fiori and excel surfaces"
);
}

#[test]
fn fiori_suite_manifest_declares_the_data_leg() {
let manifest: SuiteManifest = serde_yaml::from_str(FIORI_SUITE).expect("suite.yaml parses");
Expand Down
4 changes: 1 addition & 3 deletions examples/fiori/purchase-info-records-report.flow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ steps:
# single clear target ("Manage Info Records" / "Display purchasing
# info records by Supplier" / "Display purchasing info records by
# material") — resolve against the live tile catalog at record time.
# This is a best-effort guess at the tile's visible text, not a
# confirmed label.
- Click "Display Purchasing Info Record"
- resolve the tile to click against the live catalog — no single clear target is named. Observed - the PDF's Step 3 lists three near-identical options — "Manage Info Records", "Display purchasing info records by Supplier", "Display purchasing info records by material".
- assert: page shows Info Record

# -- Search the standard info record by the minted test data -------
Expand Down
Loading