Skip to content

Commit 8541fe1

Browse files
committed
chore: lessThan() -> lessThanOrEqualTo()
1 parent aaa5fd4 commit 8541fe1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

super_editor/test/super_textfield/super_textfield_gesture_scrolling_test.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ void main() {
271271
// Ensure the text field has not yet scrolled.
272272
var textBottom = tester.getBottomRight(find.byType(SuperTextField)).dy;
273273
var viewportBottom = tester.getBottomRight(find.byType(SuperText)).dy;
274-
expect(textBottom, lessThan(viewportBottom));
274+
expect(textBottom, lessThanOrEqualTo(viewportBottom));
275275

276276
// Scroll down to reveal the last line of text.
277277
await tester.drag(find.byType(SuperTextField), const Offset(0, -1000.0));
@@ -289,7 +289,7 @@ void main() {
289289
// Ensure the text field has scrolled back to the top.
290290
textBottom = tester.getBottomRight(find.byType(SuperTextField)).dy;
291291
viewportBottom = tester.getBottomRight(find.byType(SuperText)).dy;
292-
expect(textBottom, lessThan(viewportBottom));
292+
expect(textBottom, lessThanOrEqualTo(viewportBottom));
293293
});
294294

295295
testWidgetsOnDesktop("multi-line is vertically scrollable when text spans more lines than maxLines", (tester) async {
@@ -313,7 +313,7 @@ void main() {
313313
// Ensure the text field has not yet scrolled.
314314
var textBottom = tester.getBottomRight(find.byType(SuperTextField)).dy;
315315
var viewportBottom = tester.getBottomRight(find.byType(SuperText)).dy;
316-
expect(textBottom, lessThan(viewportBottom));
316+
expect(textBottom, lessThanOrEqualTo(viewportBottom));
317317

318318
// Scroll down to reveal the last line of text.
319319
await tester.drag(
@@ -339,7 +339,7 @@ void main() {
339339
// Ensure the text field has scrolled back to the top.
340340
textBottom = tester.getBottomRight(find.byType(SuperTextField)).dy;
341341
viewportBottom = tester.getBottomRight(find.byType(SuperText)).dy;
342-
expect(textBottom, lessThan(viewportBottom));
342+
expect(textBottom, lessThanOrEqualTo(viewportBottom));
343343
});
344344
});
345345
}

0 commit comments

Comments
 (0)