1
0
mirror of https://github.com/flutter/samples.git synced 2026-09-02 23:50:28 +00:00

Release 3.47 (#2879)

Minor updates for release 3.47

## Pre-launch Checklist

- [x] I read the [Flutter Style Guide] _recently_, and have followed its
advice.
- [x] I signed the [CLA].
- [x] I read the [Contributors Guide].
- [x] I have added sample code updates to the [changelog].
- [x] I updated/added relevant documentation (doc comments with `///`).


If you need help, consider asking for advice on the #hackers-devrel
channel on [Discord].

<!-- Links -->
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md
[CLA]: https://cla.developers.google.com/
[Discord]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md
[Contributors Guide]:
https://github.com/flutter/samples/blob/main/CONTRIBUTING.md
[changelog]: ../CHANGELOG.md

---------

Co-authored-by: Parker Lougheed <parlough@gmail.com>
This commit is contained in:
Eric Windmill
2026-08-12 12:21:23 -07:00
committed by GitHub
parent e0136e5ebb
commit 0c5ca75d29
96 changed files with 1711 additions and 723 deletions

View File

@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'package:compass_app/domain/models/itinerary_config/itinerary_config.dart';
import 'package:compass_app/domain/use_cases/booking/booking_create_use_case.dart';
import 'package:compass_app/domain/use_cases/booking/booking_share_use_case.dart';
@@ -62,20 +64,20 @@ void main() {
);
}
testWidgets('should load screen', (WidgetTester tester) async {
testWidgets('should load screen', (tester) async {
await loadScreen(tester);
expect(find.byType(BookingScreen), findsOneWidget);
});
testWidgets('should display booking from ID', (WidgetTester tester) async {
testWidgets('should display booking from ID', (tester) async {
// Add a booking to repository
bookingRepository.createBooking(kBooking);
unawaited(bookingRepository.createBooking(kBooking));
// Load screen
await loadScreen(tester);
// Load booking with ID 0
viewModel.loadBooking.execute(0);
unawaited(viewModel.loadBooking.execute(0));
// Wait for booking to load
await tester.pumpAndSettle();
@@ -84,13 +86,11 @@ void main() {
expect(find.text(kBooking.destination.tags.first), findsOneWidget);
});
testWidgets('should create booking from itinerary config', (
WidgetTester tester,
) async {
testWidgets('should create booking from itinerary config', (tester) async {
await loadScreen(tester);
// Create a new booking from stored itinerary config
viewModel.createBooking.execute();
unawaited(viewModel.createBooking.execute());
// Wait for booking to load
await tester.pumpAndSettle();
@@ -102,10 +102,10 @@ void main() {
expect(bookingRepository.bookings.length, 1);
});
testWidgets('should share booking', (WidgetTester tester) async {
bookingRepository.createBooking(kBooking);
testWidgets('should share booking', (tester) async {
unawaited(bookingRepository.createBooking(kBooking));
await loadScreen(tester);
viewModel.loadBooking.execute(0);
unawaited(viewModel.loadBooking.execute(0));
await tester.pumpAndSettle();
await tester.tap(find.byKey(const Key('share-button')));
expect(shared, true);