Sheets, decision options, usage, settings and artifact errors: review r2 batches H and L
Shared AppSheetHeader (title + Done) for the Runs filter/sort and Needs you sheets; Runs filter single-choice groups as check rows and statuses in sentence case; Cupertino decision options as a check list; run action sheet titled with the run; usage page without the duplicate title and with honest empty states; Settings Reconnect wording, compact notifications row and a tinted Cupertino Save workspace; friendly artifact preview failures with Retry.
This commit is contained in:
@@ -7,6 +7,7 @@ import 'package:pipelines_app/features/attention/notify/notification_controller.
|
||||
import 'package:pipelines_app/features/attention/notify/notification_models.dart';
|
||||
import 'package:pipelines_app/features/attention/notify/notification_store.dart';
|
||||
import 'package:pipelines_app/features/attention/ui/needs_you_runs_heading.dart';
|
||||
import 'package:pipelines_app/features/attention/ui/notification_permission_tile.dart';
|
||||
import 'package:pipelines_app/features/settings/settings_notifications_section.dart';
|
||||
|
||||
import 'notification_test_support.dart';
|
||||
@@ -70,13 +71,13 @@ void main() {
|
||||
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
home: Scaffold(
|
||||
body: SettingsNotificationsSection(controller: notify),
|
||||
),
|
||||
home: Scaffold(body: SettingsNotificationsSection(controller: notify)),
|
||||
),
|
||||
);
|
||||
await tester.pump();
|
||||
expect(find.text(notificationRationale), findsOneWidget);
|
||||
// One compact row: the short state, not the long rationale paragraph.
|
||||
expect(find.byKey(notificationStateKey), findsOneWidget);
|
||||
expect(find.text(notificationRationale), findsNothing);
|
||||
|
||||
// A denied platform answer shows its own words and no Enable action.
|
||||
final denied = NotificationController(
|
||||
@@ -86,12 +87,11 @@ void main() {
|
||||
addTearDown(denied.dispose);
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
home: Scaffold(
|
||||
body: SettingsNotificationsSection(controller: denied),
|
||||
),
|
||||
home: Scaffold(body: SettingsNotificationsSection(controller: denied)),
|
||||
),
|
||||
);
|
||||
await tester.pump();
|
||||
expect(find.text(notificationRationale), findsOneWidget);
|
||||
expect(find.byKey(notificationStateKey), findsOneWidget);
|
||||
expect(find.text(notificationRationale), findsNothing);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ void main() {
|
||||
for (final native in [false, true]) {
|
||||
final host = native ? 'Cupertino' : 'Material';
|
||||
|
||||
testWidgets('$host shows the state\'s own honest copy', (tester) async {
|
||||
testWidgets('$host shows a compact row for each state', (tester) async {
|
||||
final cases = <NotificationPermissionState, String>{
|
||||
NotificationPermissionState.unsupported: notificationUnsupportedCopy,
|
||||
NotificationPermissionState.needsSecureContext:
|
||||
@@ -46,10 +46,15 @@ void main() {
|
||||
await tester.pumpWidget(
|
||||
_page(state: entry.key, cupertino: native, onRequest: _noop),
|
||||
);
|
||||
// The Settings section owns the heading; the tile is its body.
|
||||
final view = notificationPermissionView(entry.key);
|
||||
// The Settings section owns the heading; the tile is one short row.
|
||||
expect(find.text(notificationSectionTitle), findsNothing);
|
||||
expect(find.text(notificationRationale), findsOneWidget);
|
||||
expect(find.text(entry.value), findsOneWidget, reason: '${entry.key}');
|
||||
expect(find.text(notificationRationale), findsNothing);
|
||||
expect(find.text(view.headline), findsOneWidget);
|
||||
expect(find.text(view.helper), findsOneWidget);
|
||||
// The full honest sentence is what assistive technology reads.
|
||||
expect(view.body, entry.value);
|
||||
expect(find.bySemanticsLabel(entry.value), findsOneWidget);
|
||||
expect(
|
||||
find.byKey(notificationEnableKey),
|
||||
entry.key == NotificationPermissionState.notRequested
|
||||
@@ -70,8 +75,9 @@ void main() {
|
||||
cupertino: native,
|
||||
),
|
||||
);
|
||||
expect(find.text(notificationDefaultAskedCopy), findsOneWidget);
|
||||
expect(find.text(notificationDefaultCopy), findsNothing);
|
||||
expect(find.text('Alerts are still off'), findsOneWidget);
|
||||
expect(find.bySemanticsLabel(notificationDefaultAskedCopy), findsOne);
|
||||
expect(find.bySemanticsLabel(notificationDefaultCopy), findsNothing);
|
||||
});
|
||||
|
||||
testWidgets('$host Enable runs the explicit request', (tester) async {
|
||||
@@ -115,16 +121,19 @@ void main() {
|
||||
);
|
||||
expect(tester.takeException(), isNull);
|
||||
|
||||
final rationale = tester.renderObject<RenderParagraph>(
|
||||
find.text(notificationRationale),
|
||||
final view = notificationPermissionView(
|
||||
NotificationPermissionState.notRequested,
|
||||
);
|
||||
final helper = tester.renderObject<RenderParagraph>(
|
||||
find.text(view.helper),
|
||||
);
|
||||
expect(
|
||||
rationale.size.width,
|
||||
helper.size.width,
|
||||
greaterThan(100),
|
||||
reason: 'the action must not squeeze the section copy',
|
||||
reason: 'the action must not squeeze the row copy',
|
||||
);
|
||||
final body = tester.renderObject<RenderParagraph>(
|
||||
find.text(notificationDefaultCopy),
|
||||
find.text(view.headline),
|
||||
);
|
||||
expect(body.didExceedMaxLines, isFalse);
|
||||
expect(find.byKey(notificationEnableKey), findsOneWidget);
|
||||
|
||||
Reference in New Issue
Block a user