it: test double click float toggle
This commit is contained in:
parent
94208691b2
commit
9c8131e145
4 changed files with 35 additions and 0 deletions
|
|
@ -59,6 +59,7 @@ mod t0025_dnd_focus_change;
|
||||||
mod t0026_output_transform;
|
mod t0026_output_transform;
|
||||||
mod t0027_input_region;
|
mod t0027_input_region;
|
||||||
mod t0028_top_level_restacking;
|
mod t0028_top_level_restacking;
|
||||||
|
mod t0029_double_click_float;
|
||||||
|
|
||||||
pub trait TestCase: Sync {
|
pub trait TestCase: Sync {
|
||||||
fn name(&self) -> &'static str;
|
fn name(&self) -> &'static str;
|
||||||
|
|
@ -106,5 +107,6 @@ pub fn tests() -> Vec<&'static dyn TestCase> {
|
||||||
t0026_output_transform,
|
t0026_output_transform,
|
||||||
t0027_input_region,
|
t0027_input_region,
|
||||||
t0028_top_level_restacking,
|
t0028_top_level_restacking,
|
||||||
|
t0029_double_click_float,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
33
src/it/tests/t0029_double_click_float.rs
Normal file
33
src/it/tests/t0029_double_click_float.rs
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
use {
|
||||||
|
crate::{
|
||||||
|
ifs::wl_seat::BTN_LEFT,
|
||||||
|
it::{test_error::TestResult, testrun::TestRun},
|
||||||
|
tree::Node,
|
||||||
|
},
|
||||||
|
std::rc::Rc,
|
||||||
|
};
|
||||||
|
|
||||||
|
testcase!();
|
||||||
|
|
||||||
|
async fn test(run: Rc<TestRun>) -> TestResult {
|
||||||
|
let ds = run.create_default_setup().await?;
|
||||||
|
|
||||||
|
let client = run.create_client().await?;
|
||||||
|
|
||||||
|
let win1 = client.create_window().await?;
|
||||||
|
win1.set_color(255, 0, 0, 255);
|
||||||
|
win1.map2().await?;
|
||||||
|
run.cfg.set_floating(ds.seat.id(), true)?;
|
||||||
|
|
||||||
|
for i in ["1", "2"] {
|
||||||
|
let (x, y) = win1.tl.server.node_absolute_position().position();
|
||||||
|
ds.move_to(x + 10, y - 3);
|
||||||
|
ds.mouse.click(BTN_LEFT);
|
||||||
|
ds.mouse.click(BTN_LEFT);
|
||||||
|
|
||||||
|
client.sync().await;
|
||||||
|
client.compare_screenshot(i, false).await?;
|
||||||
|
}
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
BIN
src/it/tests/t0029_double_click_float/screenshot_1.qoi
Normal file
BIN
src/it/tests/t0029_double_click_float/screenshot_1.qoi
Normal file
Binary file not shown.
BIN
src/it/tests/t0029_double_click_float/screenshot_2.qoi
Normal file
BIN
src/it/tests/t0029_double_click_float/screenshot_2.qoi
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue