production
This commit is contained in:
@@ -109,18 +109,28 @@ void main() {
|
||||
}
|
||||
});
|
||||
|
||||
testWidgets('the select-all label sits on the name axis', (tester) async {
|
||||
testWidgets('the select-all closes the row it belongs to', (tester) async {
|
||||
await pumpHome(tester);
|
||||
|
||||
// The regression this file exists for. It heads the list it selects, so
|
||||
// it starts where the list starts — not one rail further in, and not two
|
||||
// points off it either.
|
||||
final label = tester.getRect(find.text('Select all 3')).left;
|
||||
final name = tester.getRect(find.text('Customer 1')).left;
|
||||
// ── The axis it answers to is the right one now ──
|
||||
//
|
||||
// This pinned the label to the *name* axis, when the control headed its
|
||||
// list from the left. Inside a group it is a control over a list rather
|
||||
// than a heading for one, so it sits on the edge a list's own controls
|
||||
// use — the same right edge the bag labels and the chevrons below it
|
||||
// already keep. What must not happen is that it floats between the two.
|
||||
final label = tester.getRect(find.text('Select all 3')).right;
|
||||
final list = tester.getRect(find.byType(RouteTimeline)).right;
|
||||
final bag = tester.getRect(find.text('Bag 1')).right;
|
||||
expect(
|
||||
label,
|
||||
closeTo(name, 0.5),
|
||||
reason: 'the select-all is $label, the names are $name',
|
||||
closeTo(list, 4),
|
||||
reason: 'the select-all ends at $label, the list at $list',
|
||||
);
|
||||
expect(
|
||||
label,
|
||||
greaterThan(bag),
|
||||
reason: 'and it closes past the bag column rather than inside it',
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user