diff --git a/src/ui/widget/help_box.rs b/src/ui/widget/help_box.rs index 5c2c766..ff4e835 100644 --- a/src/ui/widget/help_box.rs +++ b/src/ui/widget/help_box.rs @@ -96,7 +96,7 @@ 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); @@ -104,28 +104,28 @@ mod tests { 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); }