Files
pipelines/app/test/shell/list_pane_width_test.dart
alan 885234e0e4 Cap the list pane at 440 px beside an open item
On very wide windows (a 4K monitor) the list took 40% of the window; past
440 px the extra width now goes to the open item. Fold and laptop widths
keep the 60/40 split.
2026-11-02 16:14:50 +00:00

20 lines
740 B
Dart

import 'package:flutter_test/flutter_test.dart';
import 'package:pipelines_app/shell/list_detail.dart';
void main() {
test('the list pane stops growing at its cap on very wide windows', () {
for (final width in [1920.0, 2560.0, 3840.0]) {
expect(listDetailListWidth(width, width), kListPaneMaxWidth);
expect(listDetailBodyWidth(width, width), width - 1 - kListPaneMaxWidth);
}
});
test('narrower windows keep the 60/40 split', () {
// An open Fold and a laptop window: the list is under its cap.
for (final width in [880.0, 1100.0]) {
expect(listDetailBodyWidth(width, width), closeTo(width * 0.6, 0.01));
expect(listDetailListWidth(width, width), lessThan(kListPaneMaxWidth));
}
});
}