fix(app): Notifications is a Settings section with the shared heading and inset
This commit is contained in:
@@ -46,7 +46,8 @@ void main() {
|
||||
await tester.pumpWidget(
|
||||
_page(state: entry.key, cupertino: native, onRequest: _noop),
|
||||
);
|
||||
expect(find.text(notificationSectionTitle), findsOneWidget);
|
||||
// The Settings section owns the heading; the tile is its body.
|
||||
expect(find.text(notificationSectionTitle), findsNothing);
|
||||
expect(find.text(notificationRationale), findsOneWidget);
|
||||
expect(find.text(entry.value), findsOneWidget, reason: '${entry.key}');
|
||||
expect(
|
||||
@@ -114,16 +115,13 @@ void main() {
|
||||
);
|
||||
expect(tester.takeException(), isNull);
|
||||
|
||||
final title = tester.renderObject<RenderParagraph>(
|
||||
find.text(notificationSectionTitle),
|
||||
final rationale = tester.renderObject<RenderParagraph>(
|
||||
find.text(notificationRationale),
|
||||
);
|
||||
// Cupertino's list tile deliberately caps its title at one line; the
|
||||
// defect this guards is the title being squeezed to a single glyph by the
|
||||
// action sharing the row, so its width is the meaningful check.
|
||||
expect(
|
||||
title.size.width,
|
||||
rationale.size.width,
|
||||
greaterThan(100),
|
||||
reason: 'the action must not squeeze the section title to one glyph',
|
||||
reason: 'the action must not squeeze the section copy',
|
||||
);
|
||||
final body = tester.renderObject<RenderParagraph>(
|
||||
find.text(notificationDefaultCopy),
|
||||
|
||||
Reference in New Issue
Block a user