tree: remove hidden, unused workspaces
This commit is contained in:
parent
871827fdde
commit
70cc24107b
4 changed files with 45 additions and 0 deletions
|
|
@ -42,6 +42,7 @@ mod t0013_graphics_initialized;
|
|||
mod t0014_container_scroll_focus;
|
||||
mod t0015_scroll_partial;
|
||||
mod t0016_scroll_ws;
|
||||
mod t0017_remove_unused_ws;
|
||||
|
||||
pub trait TestCase: Sync {
|
||||
fn name(&self) -> &'static str;
|
||||
|
|
@ -76,5 +77,6 @@ pub fn tests() -> Vec<&'static dyn TestCase> {
|
|||
t0014_container_scroll_focus,
|
||||
t0015_scroll_partial,
|
||||
t0016_scroll_ws,
|
||||
t0017_remove_unused_ws,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
35
src/it/tests/t0017_remove_unused_ws.rs
Normal file
35
src/it/tests/t0017_remove_unused_ws.rs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
use {
|
||||
crate::it::{test_error::TestResult, testrun::TestRun},
|
||||
std::rc::Rc,
|
||||
};
|
||||
|
||||
testcase!();
|
||||
|
||||
async fn test(run: Rc<TestRun>) -> TestResult {
|
||||
let ds = run.create_default_setup().await?;
|
||||
run.cfg.show_workspace(ds.seat.id(), "1")?;
|
||||
|
||||
tassert_eq!(run.state.workspaces.len(), 1);
|
||||
|
||||
run.cfg.show_workspace(ds.seat.id(), "2")?;
|
||||
|
||||
tassert_eq!(run.state.workspaces.len(), 1);
|
||||
|
||||
run.cfg.show_workspace(ds.seat.id(), "1")?;
|
||||
|
||||
tassert_eq!(run.state.workspaces.len(), 1);
|
||||
|
||||
let client = run.create_client().await?;
|
||||
let win = client.create_window().await?;
|
||||
win.map().await?;
|
||||
|
||||
run.cfg.show_workspace(ds.seat.id(), "2")?;
|
||||
|
||||
tassert_eq!(run.state.workspaces.len(), 2);
|
||||
|
||||
run.cfg.show_workspace(ds.seat.id(), "1")?;
|
||||
|
||||
tassert_eq!(run.state.workspaces.len(), 1);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue