Skip to content
Merged
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
2 changes: 2 additions & 0 deletions linux/crates/app/src/ui/browse_tab/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3141,6 +3141,8 @@ fn a_keyed_table_pages_by_the_edge_rows_key_not_by_offset() {
#[gtk4::test]
fn a_sorted_table_pages_by_offset() {
let mut script = serving_table();
// A count below the second page would move it back to the first.
script.count_rows.always(FakeReply::ok(1_000));
script.query_bound.always(FakeReply::ok(full_page(0)));
let harness = Harness::open(script, []);
wait_until(WAIT, || harness.shown().len() == 100).expect("the first page");
Expand Down
9 changes: 9 additions & 0 deletions linux/crates/app/src/ui/workspace/status_pages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,15 @@ mod tests {
("win.show-history", "Query History Unavailable"),
("win.show-saved-queries", "Saved Queries Unavailable"),
] {
// The action follows the window's own history, which may still
// be opening.
let name = action.trim_start_matches("win.");
wait_until(WAIT, || {
test.window
.lookup_action(name)
.is_some_and(|action| action.is_enabled())
})
.unwrap_or_else(|_| panic!("{action} stayed off"));
WidgetExt::activate_action(&test.window, action, None).expect(action);
wait_until(WAIT, || {
visible_alert(&test.window).is_some_and(|alert| alert.heading().as_deref() == Some(heading))
Expand Down
10 changes: 9 additions & 1 deletion linux/crates/storage/tests/stored_formats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,14 @@ fn a_version_1_connection_list_imports_as_it_was_written() -> TestResult {
let report = store.import_blocking(Path::new("/tmp/connections-v1.json"), CONNECTIONS_V1)?;

assert_eq!(report.total(), connections_v1_model()?.len());
assert_eq!(store.load_blocking()?.as_ref(), connections_v1_model()?.as_slice());
// An import never takes the file's last-opened times.
let imported: Vec<SavedConnection> = connections_v1_model()?
.into_iter()
.map(|connection| SavedConnection {
last_opened_at: None,
..connection
})
.collect();
assert_eq!(store.load_blocking()?.as_ref(), imported.as_slice());
Ok(())
}
Loading