Lines Matching refs:se

165         let se: SelectElement = Node::from_html(html).unwrap().try_into().unwrap();  in test_select_one()  localVariable
167 assert_eq!(se.multiple(), false); in test_select_one()
169 assert_eq!(se.selected_index(), Some(2)); in test_select_one()
170 assert_eq!(se.value(), Some("third".to_string())); in test_select_one()
172 se.set_selected_index(Some(1)); in test_select_one()
173 assert_eq!(se.selected_index(), Some(1)); in test_select_one()
174 assert_eq!(se.value(), Some("second".to_string())); in test_select_one()
176 se.set_selected_index(None); in test_select_one()
177 assert_eq!(se.selected_index(), None); in test_select_one()
178 assert_eq!(se.value(), None); in test_select_one()
180 let rs = se.set_value(Some("first")); in test_select_one()
182 assert_eq!(se.selected_index(), Some(0)); in test_select_one()
183 assert_eq!(se.value(), Some("first".to_string())); in test_select_one()
185 let rs = se.set_value(None); in test_select_one()
187 assert_eq!(se.selected_index(), None); in test_select_one()
188 assert_eq!(se.value(), None); in test_select_one()
190 let rs = se.set_value(Some("")); in test_select_one()
192 assert_eq!(se.selected_index(), Some(3)); in test_select_one()
193 assert_eq!(se.value(), Some("".to_string())); in test_select_one()
195 let rs = se.set_value(Some("invalid_option")); in test_select_one()
197 assert_eq!(se.selected_index(), None); in test_select_one()
198 assert_eq!(se.value(), None); in test_select_one()
207 let se: SelectElement = Node::from_html(html).unwrap().try_into().unwrap(); in test_select_multiple_noselection() localVariable
209 assert_eq!(se.multiple(), true); in test_select_multiple_noselection()
213 assert_eq!(se.selected_indices(), empy_i32_vec); in test_select_multiple_noselection()
214 assert_eq!(se.selected_values(), empy_string_vec); in test_select_multiple_noselection()
224 let se: SelectElement = Node::from_html(html).unwrap().try_into().unwrap(); in test_select_multiple() localVariable
226 assert_eq!(se.multiple(), true); in test_select_multiple()
228 assert_eq!(se.selected_indices(), vec![0,2,4]); in test_select_multiple()
229 … assert_eq!(se.selected_values(), vec!["first".to_string(), "third".to_string(), "".to_string()]); in test_select_multiple()