From 32d3a8d5671c741f220616235a1e570bdd2e98ed Mon Sep 17 00:00:00 2001 From: Sven Carstensen Date: Tue, 9 Apr 2024 09:57:21 +0200 Subject: [PATCH] Job-Bemerkungen anzeigen --- integration_test/job_test.dart | 27 +++++++++++ lib/content_views/accepted_jobs_page.dart | 10 +++++ pubspec.lock | 55 +++++++++++++++++++++-- pubspec.yaml | 4 +- 4 files changed, 91 insertions(+), 5 deletions(-) create mode 100644 integration_test/job_test.dart diff --git a/integration_test/job_test.dart b/integration_test/job_test.dart new file mode 100644 index 0000000..7d30f97 --- /dev/null +++ b/integration_test/job_test.dart @@ -0,0 +1,27 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:stadtbote/main.dart'; + +void main() { + testWidgets('tap on the floating action button, verify counter', + (tester) async { + // Load app widget. + await tester.pumpWidget(MyApp()); + + // Verify the counter starts at 0. + expect(find.text('HH1091'), findsOneWidget); + + // Finds the floating action button to tap on. + //final fab = find.byKey(const Key('increment')); + + // Emulate a tap on the floating action button. + //await tester.tap(fab); + + // Trigger a frame. + //await tester.pumpAndSettle(); + + // Verify the counter increments by 1. + //expect(find.text('0'), findsNothing); + //expect(find.text('1'), findsOneWidget); + }); +} \ No newline at end of file diff --git a/lib/content_views/accepted_jobs_page.dart b/lib/content_views/accepted_jobs_page.dart index 6bb1b63..e74b149 100644 --- a/lib/content_views/accepted_jobs_page.dart +++ b/lib/content_views/accepted_jobs_page.dart @@ -77,6 +77,12 @@ class _AcceptedJobsPageState extends State { List jobWidgets = []; for (var job in _jobs) { + String remarkString = ''; + for (var remark in job.rem) { + remarkString += '$remark\n'; + } + remarkString = remarkString.trim(); + jobWidgets.add( ListTile( onTap: () { @@ -111,6 +117,10 @@ class _AcceptedJobsPageState extends State { ), ], ), + Text( + remarkString, + textAlign: TextAlign.left, + ), Text( job.id.toString(), textAlign: TextAlign.left, diff --git a/pubspec.lock b/pubspec.lock index f8bb3f9..4e2765f 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -389,10 +389,10 @@ packages: dependency: transitive description: name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" url: "https://pub.dev" source: hosted - version: "7.0.0" + version: "6.1.4" file_selector_linux: dependency: transitive description: @@ -462,6 +462,11 @@ packages: url: "https://pub.dev" source: hosted version: "1.6.12" + flutter_driver: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" flutter_launcher_icons: dependency: "direct dev" description: @@ -568,6 +573,11 @@ packages: url: "https://pub.dev" source: hosted version: "3.2.0" + fuchsia_remote_debug_protocol: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" geolocator: dependency: "direct main" description: @@ -744,6 +754,11 @@ packages: url: "https://pub.dev" source: hosted version: "0.2.1+1" + integration_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" intl: dependency: "direct main" description: @@ -1052,10 +1067,10 @@ packages: dependency: transitive description: name: platform - sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" + sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102 url: "https://pub.dev" source: hosted - version: "3.1.4" + version: "3.1.2" plugin_platform_interface: dependency: transitive description: @@ -1088,6 +1103,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.1" + process: + dependency: transitive + description: + name: process + sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" + url: "https://pub.dev" + source: hosted + version: "4.2.4" proj4dart: dependency: transitive description: @@ -1277,6 +1300,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" + sync_http: + dependency: transitive + description: + name: sync_http + sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" + url: "https://pub.dev" + source: hosted + version: "0.3.1" synchronized: dependency: transitive description: @@ -1453,6 +1484,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.4.0+2" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: c538be99af830f478718b51630ec1b6bee5e74e52c8a802d328d9e71d35d2583 + url: "https://pub.dev" + source: hosted + version: "11.10.0" watcher: dependency: transitive description: @@ -1477,6 +1516,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.4.0" + webdriver: + dependency: transitive + description: + name: webdriver + sha256: "3c923e918918feeb90c4c9fdf1fe39220fa4c0e8e2c0fffaded174498ef86c49" + url: "https://pub.dev" + source: hosted + version: "3.0.2" win32: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index d021e06..a74c416 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 221.0.0+12 +version: 222.0.0+222 environment: sdk: '>=2.19.6 <3.0.0' @@ -86,6 +86,8 @@ dev_dependencies: # package. See that file for information about deactivating specific lint # rules and activating additional ones. flutter_lints: ^2.0.0 + integration_test: + sdk: flutter # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec