mirror of
https://github.com/block/buzz.git
synced 2026-11-01 15:01:12 +00:00
Replace the iOS profile setup sheet with a full-screen name → avatar flow. Require a display name, enable avatar Continue after Done, and let Skip save the name without an avatar. After a failed save, Not now continues without saving the draft. Embed photo, emoji, and animated avatar editing with native Back/Done, matching 220-point previews, a rounded-notch pencil edit badge, an entry haptic, equal emoji-preview spacing, and 200 ms transitions that move the avatar into its editor position without resizing. Apply appearance changes live across setup and editing while preserving the draft. Keep the camera exit rail stationary, use a solid shutter, and present photo positioning full-screen with Back/Done. Preserve the main Flutter view during presentation and hide underlying controls from VoiceOver while editing. Validation: Flutter analysis, 3,796 Flutter tests, and 106 native tests passed. Built, installed, and launched the isolated iPhone preview; inspected the native emoji/badge rendering. The local preview entry point is excluded. Draft pending real login/join → profile-save verification and owner verification of the updated device flow. --------- Signed-off-by: kenny lopez <klopez4212@gmail.com> Co-authored-by: Terp <5856f6900e8e0a4e0ea1f4f8d2ee33e4753d2119bc122f94ecafc660b46c0511@buzz.block.builderlab.xyz>
41 lines
1.4 KiB
Dart
41 lines
1.4 KiB
Dart
import 'package:buzz/features/profile/profile_setup_page.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
|
|
import '../../helpers/hosted_communities_fixture.dart';
|
|
import '../../helpers/widget_helpers.dart';
|
|
|
|
void main() {
|
|
testWidgets('failed fallback save can continue without saving', (
|
|
tester,
|
|
) async {
|
|
FlutterSecureStorage.setMockInitialValues({});
|
|
final fixture = HostedCommunitiesFixture();
|
|
await fixture.initialize(widget: true);
|
|
addTearDown(fixture.dispose);
|
|
var attempts = 0;
|
|
final pending = fixture.flow.requestProfile((_) async {
|
|
attempts++;
|
|
throw StateError('Relay unavailable');
|
|
});
|
|
await tester.pumpWidget(
|
|
WidgetHelpers.testable(child: ProfileSetupPage(flow: fixture.flow)),
|
|
);
|
|
await tester.pumpAndSettle();
|
|
expect(find.text('Not now'), findsNothing);
|
|
await tester.enterText(find.byType(TextField), 'Kenny');
|
|
await tester.pump();
|
|
await tester.tap(find.text('Continue'));
|
|
await tester.pumpAndSettle();
|
|
expect(attempts, 1);
|
|
expect(find.text('Not now'), findsOneWidget);
|
|
await tester.tap(find.text('Not now'));
|
|
await tester.pumpAndSettle();
|
|
await pending;
|
|
expect(attempts, 1);
|
|
await tester.pumpWidget(const SizedBox.shrink());
|
|
await tester.pumpAndSettle();
|
|
}, variant: TargetPlatformVariant.only(TargetPlatform.android));
|
|
}
|