global table content

This commit is contained in:
Priec
2026-08-12 14:10:20 +02:00
parent 112bea6519
commit 78e3f1ae08
7 changed files with 54 additions and 17 deletions

View File

@@ -113,6 +113,20 @@ mod tests {
}
}
#[test]
fn global_tables_have_their_own_scope() {
let mut state = page();
state.selection.profile = "__global".to_string();
let html = render_workspace(&state);
assert!(html.contains(r#"value="__global" selected"#));
assert!(html.contains("Global — all profiles"));
assert!(html.contains("/admin/tables/new?global=true"));
assert!(!html.contains("Copy <code>__global</code>"));
assert!(!html.contains("Create tables from an invoice template"));
}
fn page() -> TableDefinitionPageState {
TableDefinitionPageState {
nav: Nav::default(),
@@ -254,7 +268,7 @@ mod tests {
state.tables.clear();
let html = render_workspace(&state);
assert!(!html.contains("/admin/table-definition/copy"));
assert!(html.contains("Choose a profile"));
assert!(html.contains("Choose a scope"));
}
#[test]