Improved coverage

This commit is contained in:
veeso
2021-04-05 09:59:10 +02:00
parent 9776ecbe60
commit 7676e6e3a1
11 changed files with 57 additions and 0 deletions

View File

@@ -167,6 +167,7 @@ mod tests {
use crate::ui::layout::props::{TableBuilder, TextParts, TextSpan};
use crossterm::event::{KeyCode, KeyEvent};
use tui::style::Color;
#[test]
fn test_ui_layout_components_table() {
@@ -184,6 +185,12 @@ mod tests {
))
.build(),
);
component.active();
component.blur();
// Update
let props = component.get_props().with_foreground(Color::Red).build();
assert_eq!(component.update(props), Msg::None);
assert_eq!(component.props.foreground, Color::Red);
// Get value
assert_eq!(component.get_value(), Payload::None);
// Event