Skip to content

Commit

Permalink
try different testcase to avoid linting errors
Browse files Browse the repository at this point in the history
Signed-off-by: jrichardsen <jrichardsen@emlix.com>
  • Loading branch information
jrichardsen committed Jan 9, 2025
1 parent a0d3e6b commit ea7bdc7
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions src/ui/widget/help_box.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,36 +96,36 @@ mod tests {
std::env::set_var("HOME", dir.path().as_os_str());
let config = init("./test/").unwrap();

let backend = TestBackend::new(40, 12);
let backend = TestBackend::new(42, 12);
let mut terminal = Terminal::new(backend).unwrap();
let help_box = HelpBox::new(&config);

let mut dummy_user = NCReqDataParticipants::default();
dummy_user.displayName = "Butz".to_string();

terminal
.draw(|frame| help_box.render_area(frame, Rect::new(0, 0, 40, 12)))
.draw(|frame| help_box.render_area(frame, Rect::new(0, 0, 42, 12)))
.unwrap();

let mut expected = Buffer::with_lines([
"┌Help──────────────────────────────────┐",
"│Key Name Behavior │",
"│q quit enter the q│",
"│o open enter the c│",
"│u users sidebar Toggle whet│",
"│? help enter this │",
"│m mark as read mark curren│",
"│(e|i) edit enter the e│",
"│(u|d) jump scroll scroll up o│",
"│ESC leave Mode leave help,│",
"│Enter send/select Send Messag│",
"└──────────────────────────────────────┘",
"┌Help────────────────────────────────────┐",
"│Key Name Behavior │",
"│q quit enter the qui│",
"│o open enter the cha│",
"│u users sidebar Toggle whethe│",
"│? help enter this he│",
"│m mark as read mark current │",
"│(e|i) edit enter the edi│",
"│(u|d) jump scroll scroll up or │",
"│ESC leave Mode leave help, o│",
"│Enter send/select Send Message,│",
"└────────────────────────────────────────┘",
]);
expected.set_style(Rect::new(0, 0, 40, 12), config.theme.popup_border_style());
expected.set_style(Rect::new(0, 0, 42, 12), config.theme.popup_border_style());

expected.set_style(Rect::new(1, 1, 38, 10), config.theme.default_style());
expected.set_style(Rect::new(1, 1, 40, 10), config.theme.default_style());

expected.set_style(Rect::new(1, 1, 38, 1), config.theme.table_header_style());
expected.set_style(Rect::new(1, 1, 40, 1), config.theme.table_header_style());

terminal.backend().assert_buffer(&expected);
}
Expand Down

0 comments on commit ea7bdc7

Please sign in to comment.