mirror of
https://github.com/storytold/gridcraft.git
synced 2026-11-30 10:13:56 +01:00
AutoSum tests join the it test binary, as main's UI tests do
The module uses the shared harness (`common::builder`, `common::app`), so it runs with the pinned font set like the other UI tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6aa6a9cee8
commit
921cdc974f
2 files changed
+4
-11
No files matched your search
@@ -4,10 +4,10 @@
|
||||
use egui::{Event, Key, Modifiers, PointerButton, Pos2};
|
||||
use gridcraft_engine::core::{CellRef, Value};
|
||||
use gridcraft_engine::{Mode, Session};
|
||||
use gridcraft_ui_egui::{SheetApp, grid::Geo};
|
||||
use gridcraft_ui_egui::grid::Geo;
|
||||
use serde_json::json;
|
||||
|
||||
type Harness = egui_kittest::Harness<'static, SheetApp>;
|
||||
use crate::common::Harness;
|
||||
|
||||
/// 1, 2, 3 in A1:A3 and `selected` selected.
|
||||
fn harness(selected: &str) -> Harness {
|
||||
@@ -20,15 +20,7 @@ fn harness_at(first: &str, selected: &str) -> Harness {
|
||||
session.new_workbook();
|
||||
session.execute("range.setValues", json!({"range": first, "values": [[1], [2], [3]]})).unwrap();
|
||||
session.execute("selection.set", json!({"range": selected})).unwrap();
|
||||
let mut h = egui_kittest::Harness::builder().with_size(egui::vec2(1200.0, 800.0)).build_ui_state(
|
||||
|ui, app: &mut SheetApp| {
|
||||
app.logic(ui.ctx());
|
||||
app.ui(ui);
|
||||
},
|
||||
SheetApp::new(session, Default::default()),
|
||||
);
|
||||
h.run_steps(4);
|
||||
h
|
||||
crate::common::harness_with(crate::common::builder().with_size(egui::vec2(1200.0, 800.0)), crate::common::app(session), 4)
|
||||
}
|
||||
|
||||
/// The AutoSum button: a menu-style run.
|
||||
@@ -10,6 +10,7 @@ mod accounting_fill;
|
||||
mod advanced_filter;
|
||||
mod argument_names;
|
||||
mod autosave_persist;
|
||||
mod autosum_edit;
|
||||
mod borders;
|
||||
mod cell_editor_caret;
|
||||
mod cell_pictures;
|
||||
|
||||
Reference in new issue
Block a user