Integration: keytip NR test gives the sheet data so the Insert Chart dialog opens

This commit is contained in:
aiongg
2026-10-22 03:54:39 +00:00
parent 818175f51e
commit c4c7f747c7
2 changed files with 7 additions and 1 deletions
@@ -1283,6 +1283,12 @@ fn keytip_nq_() {
#[test]
fn keytip_nr_() {
let mut h = harness(blank());
// The dialog previews chart types for the selected data, so the sheet needs some.
h.state_mut()
.session
.execute("range.setValues", serde_json::json!({"range": "A1", "values": [["Fruit", "Sales"], ["Apples", 5], ["Pears", 3]]}))
.unwrap();
h.state_mut().session.execute("selection.set", serde_json::json!({"range": "A1:B3"})).unwrap();
sequence(&mut h, "NR", false);
assert_eq!(h.state().dialog.as_ref().map(|d| d.name.as_str()), Some("recommendedCharts"), "NR must open the recommendedCharts dialog");
}