Skip to content

Commit a011838

Browse files
committed
Fix: Update tests for improved scroll messages.
1 parent 91d1e02 commit a011838

File tree

1 file changed

+7
-9
lines changed
  • server/tests/overall_core

1 file changed

+7
-9
lines changed

server/tests/overall_core/mod.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ async fn test_server_core(
373373
})
374374
}),
375375
cursor_position: Some(1),
376-
scroll_position: Some(0.0)
376+
scroll_position: Some(1.0)
377377
})
378378
}
379379
);
@@ -403,7 +403,7 @@ async fn test_server_core(
403403
})
404404
}),
405405
cursor_position: Some(1),
406-
scroll_position: Some(0.0)
406+
scroll_position: Some(1.0)
407407
})
408408
}
409409
);
@@ -427,7 +427,7 @@ async fn test_server_core(
427427
file_path: path_str.clone(),
428428
contents: None,
429429
cursor_position: Some(2),
430-
scroll_position: Some(0.0)
430+
scroll_position: Some(1.0)
431431
})
432432
}
433433
);
@@ -437,8 +437,6 @@ async fn test_server_core(
437437
.send_keys("" + Key::Home + Key::Left)
438438
.await
439439
.unwrap();
440-
// TODO: we don't get correct line numbers from code blocks. Ideally, the
441-
// `cursor_position` would be 1 to show we're on the first line.
442440
client_id += MESSAGE_ID_INCREMENT;
443441
assert_eq!(
444442
codechat_server.get_message_timeout(TIMEOUT).await.unwrap(),
@@ -447,8 +445,8 @@ async fn test_server_core(
447445
message: EditorMessageContents::Update(UpdateMessageContents {
448446
file_path: path_str.clone(),
449447
contents: None,
450-
cursor_position: Some(2),
451-
scroll_position: Some(0.0)
448+
cursor_position: Some(1),
449+
scroll_position: Some(1.0)
452450
})
453451
}
454452
);
@@ -479,7 +477,7 @@ async fn test_server_core(
479477
})
480478
}),
481479
cursor_position: Some(2),
482-
scroll_position: Some(0.0)
480+
scroll_position: Some(1.0)
483481
})
484482
}
485483
);
@@ -572,7 +570,7 @@ async fn test_server_core(
572570
})
573571
}),
574572
cursor_position: Some(1),
575-
scroll_position: Some(0.0)
573+
scroll_position: Some(1.0)
576574
})
577575
}
578576
);

0 commit comments

Comments
 (0)