File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
frontend/rust-lib/flowy-grid/tests/grid Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -262,6 +262,9 @@ async fn grid_row_add_cells_test() {
262262 FieldType :: Checkbox => {
263263 builder. add_cell ( & field. id , "false" . to_string ( ) ) . unwrap ( ) ;
264264 }
265+ FieldType :: URL => {
266+ builder. add_cell ( & field. id , "1" . to_string ( ) ) . unwrap ( ) ;
267+ }
265268 }
266269 }
267270 let context = builder. build ( ) ;
@@ -327,6 +330,7 @@ async fn grid_cell_update() {
327330 SelectOptionCellContentChangeset :: from_insert ( & type_option. options . first ( ) . unwrap ( ) . id ) . to_str ( )
328331 }
329332 FieldType :: Checkbox => "1" . to_string ( ) ,
333+ FieldType :: URL => "1" . to_string ( ) ,
330334 } ;
331335
332336 scripts. push ( UpdateCell {
@@ -348,6 +352,7 @@ async fn grid_cell_update() {
348352 FieldType :: SingleSelect => ( SelectOptionCellContentChangeset :: from_insert ( "abc" ) . to_str ( ) , false ) ,
349353 FieldType :: MultiSelect => ( SelectOptionCellContentChangeset :: from_insert ( "abc" ) . to_str ( ) , false ) ,
350354 FieldType :: Checkbox => ( "2" . to_string ( ) , false ) ,
355+ FieldType :: URL => ( "2" . to_string ( ) , false ) ,
351356 } ;
352357
353358 scripts. push ( UpdateCell {
Original file line number Diff line number Diff line change @@ -354,13 +354,18 @@ fn make_template_1_grid() -> BuildGridContext {
354354 let checkbox = CheckboxTypeOptionBuilder :: default ( ) ;
355355 let checkbox_field = FieldBuilder :: new ( checkbox) . name ( "is done" ) . visibility ( true ) . build ( ) ;
356356
357+ // URL
358+ let url = URLTypeOptionBuilder :: default ( ) ;
359+ let url_field = FieldBuilder :: new ( url) . name ( "link" ) . visibility ( true ) . build ( ) ;
360+
357361 GridBuilder :: default ( )
358362 . add_field ( text_field)
359363 . add_field ( single_select_field)
360364 . add_field ( multi_select_field)
361365 . add_field ( number_field)
362366 . add_field ( date_field)
363367 . add_field ( checkbox_field)
368+ . add_field ( url_field)
364369 . add_empty_row ( )
365370 . add_empty_row ( )
366371 . add_empty_row ( )
You can’t perform that action at this time.
0 commit comments