Closed fredgrott closed 3 years ago
Hi @fredgrott,
Thanks for this ticket!
await
is missing in i_see_text
by design as there is no asynchronous operation in this step.
It seems like you're testing the default counter app, have you watched this video? If yes - could you please share the app so I could take a look?
Regards, Oleksandr
Hi Fred,
I've tried to compile expert-test-setup
project from https://github.com/fredgrott/flutter_test but it fails to compile with the following error:
Error: unable to find directory entry in pubspec.yaml: /Users/ole/dev/test/flutter_test/expert_test_setup/images/
lib/my_app_textstyles.dart:49:5: Error: No named parameter with the name 'overflow'.
overflow: TextOverflow.fade,
^^^^^^^^
../../../../fvm/versions/stable/packages/flutter/lib/src/painting/text_style.dart:458:9: Context: Found this candidate, but the arguments don't match.
const TextStyle({
^^^^^^^^^
lib/my_app_textstyles.dart:66:5: Error: No named parameter with the name 'overflow'.
overflow: TextOverflow.fade,
^^^^^^^^
../../../../fvm/versions/stable/packages/flutter/lib/src/painting/text_style.dart:458:9: Context: Found this candidate, but the arguments don't match.
const TextStyle({
^^^^^^^^^
lib/my_app_textstyles.dart:83:5: Error: No named parameter with the name 'overflow'.
overflow: TextOverflow.fade,
^^^^^^^^
../../../../fvm/versions/stable/packages/flutter/lib/src/painting/text_style.dart:458:9: Context: Found this candidate, but the arguments don't match.
const TextStyle({
^^^^^^^^^
lib/my_app_textstyles.dart:100:5: Error: No named parameter with the name 'overflow'.
overflow: TextOverflow.fade,
^^^^^^^^
../../../../fvm/versions/stable/packages/flutter/lib/src/painting/text_style.dart:458:9: Context: Found this candidate, but the arguments don't match.
const TextStyle({
^^^^^^^^^
lib/my_app_textstyles.dart:117:5: Error: No named parameter with the name 'overflow'.
overflow: TextOverflow.fade,
^^^^^^^^
../../../../fvm/versions/stable/packages/flutter/lib/src/painting/text_style.dart:458:9: Context: Found this candidate, but the arguments don't match.
const TextStyle({
^^^^^^^^^
lib/my_app_textstyles.dart:134:5: Error: No named parameter with the name 'overflow'.
overflow: TextOverflow.fade,
^^^^^^^^
../../../../fvm/versions/stable/packages/flutter/lib/src/painting/text_style.dart:458:9: Context: Found this candidate, but the arguments don't match.
const TextStyle({
^^^^^^^^^
lib/my_app_textstyles.dart:151:5: Error: No named parameter with the name 'overflow'.
overflow: TextOverflow.fade,
^^^^^^^^
../../../../fvm/versions/stable/packages/flutter/lib/src/painting/text_style.dart:458:9: Context: Found this candidate, but the arguments don't match.
const TextStyle({
^^^^^^^^^
lib/my_app_textstyles.dart:168:5: Error: No named parameter with the name 'overflow'.
overflow: TextOverflow.fade,
^^^^^^^^
../../../../fvm/versions/stable/packages/flutter/lib/src/painting/text_style.dart:458:9: Context: Found this candidate, but the arguments don't match.
const TextStyle({
^^^^^^^^^
lib/my_app_textstyles.dart:184:5: Error: No named parameter with the name 'overflow'.
overflow: TextOverflow.fade,
^^^^^^^^
../../../../fvm/versions/stable/packages/flutter/lib/src/painting/text_style.dart:458:9: Context: Found this candidate, but the arguments don't match.
const TextStyle({
^^^^^^^^^
lib/my_app_textstyles.dart:201:5: Error: No named parameter with the name 'overflow'.
overflow: TextOverflow.fade,
^^^^^^^^
../../../../fvm/versions/stable/packages/flutter/lib/src/painting/text_style.dart:458:9: Context: Found this candidate, but the arguments don't match.
const TextStyle({
^^^^^^^^^
lib/my_app_textstyles.dart:218:5: Error: No named parameter with the name 'overflow'.
overflow: TextOverflow.fade,
^^^^^^^^
../../../../fvm/versions/stable/packages/flutter/lib/src/painting/text_style.dart:458:9: Context: Found this candidate, but the arguments don't match.
const TextStyle({
^^^^^^^^^
lib/my_app_textstyles.dart:235:5: Error: No named parameter with the name 'overflow'.
overflow: TextOverflow.fade,
^^^^^^^^
../../../../fvm/versions/stable/packages/flutter/lib/src/painting/text_style.dart:458:9: Context: Found this candidate, but the arguments don't match.
const TextStyle({
^^^^^^^^^
lib/my_app_textstyles.dart:252:5: Error: No named parameter with the name 'overflow'.
overflow: TextOverflow.fade,
^^^^^^^^
../../../../fvm/versions/stable/packages/flutter/lib/src/painting/text_style.dart:458:9: Context: Found this candidate, but the arguments don't match.
const TextStyle({
^^^^^^^^^
Failed to load "/Users/ole/dev/test/flutter_test/expert_test_setup/test/counter_test.dart": Compilation failed for testPath=/Users/ole/dev/test/flutter_test/expert_test_setup/test/counter_test.dart
dart:async/stream_controller.dart 561:44 _StreamController.addError
dart:async/stream_controller.dart 830:13 _StreamSinkWrapper.addError
_GuaranteeSink._addError
_GuaranteeSink.addError
package:flutter_tools/src/test/flutter_platform.dart 466:37 FlutterPlatform._startTest
===== asynchronous gap ===========================
dart:async/zone.dart 1286:19 _CustomZone.registerUnaryCallback
dart:async-patch/async_patch.dart 45:22 _asyncThenWrapperHelper
package:flutter_tools/src/test/flutter_platform.dart 378:36 FlutterPlatform.loadChannel
package:flutter_tools/src/test/flutter_platform.dart 342:44 FlutterPlatform.load
Loader.loadFile.<fn>
===== asynchronous gap ===========================
dart:async/zone.dart 1286:19 _CustomZone.registerUnaryCallback
dart:async-patch/async_patch.dart 45:22 _asyncThenWrapperHelper
package:test_core/src/runner/loader.dart Loader.loadFile.<fn>
new LoadSuite.<fn>.<fn>
new LoadSuite.<fn>.<fn>
new LoadSuite.<fn>
Invoker.waitForOutstandingCallbacks.<fn>
Invoker.waitForOutstandingCallbacks.<fn>
dart:async/zone.dart 1354:13 _rootRun
dart:async/zone.dart 1258:19 _CustomZone.run
dart:async/zone.dart 1789:10 _runZoned
dart:async/zone.dart 1711:10 runZoned
Invoker.waitForOutstandingCallbacks
Invoker._onRun.<fn>.<fn>.<fn>
===== asynchronous gap ===========================
dart:async/zone.dart 1286:19 _CustomZone.registerUnaryCallback
dart:async-patch/async_patch.dart 45:22 _asyncThenWrapperHelper
package:test_api/src/backend/invoker.dart Invoker._onRun.<fn>.<fn>.<fn>
dart:async/zone.dart 1354:13 _rootRun
dart:async/zone.dart 1258:19 _CustomZone.run
dart:async/zone.dart 1789:10 _runZoned
dart:async/zone.dart 1711:10 runZoned
Invoker._onRun.<fn>.<fn>
dart:async/zone.dart 1354:13 _rootRun
dart:async/zone.dart 1258:19 _CustomZone.run
dart:async/zone.dart 1789:10 _runZoned
dart:async/zone.dart 1711:10 runZoned
Invoker.guard
Invoker._guardIfGuarded
Invoker._onRun.<fn>
Chain.capture.<fn>
dart:async/zone.dart 1354:13 _rootRun
dart:async/zone.dart 1258:19 _CustomZone.run
dart:async/zone.dart 1789:10 _runZoned
dart:async/zone.dart 1711:10 runZoned
Chain.capture
Invoker._onRun
LiveTestController.run
dart:async/future.dart 198:37 new Future.microtask.<fn>
dart:async/zone.dart 1346:47 _rootRun
dart:async/zone.dart 1258:19 _CustomZone.run
dart:async/zone.dart 1162:7 _CustomZone.runGuarded
dart:async/zone.dart 1202:23 _CustomZone.bindCallbackGuarded.<fn>
dart:async/zone.dart 1354:13 _rootRun
dart:async/zone.dart 1258:19 _CustomZone.run
dart:async/zone.dart 1162:7 _CustomZone.runGuarded
dart:async/zone.dart 1202:23 _CustomZone.bindCallbackGuarded.<fn>
dart:async/schedule_microtask.dart 40:21 _microtaskLoop
dart:async/schedule_microtask.dart 49:5 _startMicrotaskLoop
dart:isolate-patch/isolate_patch.dart 120:13 _runPendingImmediateCallback
dart:isolate-patch/isolate_patch.dart 185:5 _RawReceivePortImpl._handleMessage
✖ loading /Users/ole/dev/test/flutter_test/expert_test_setup/test/counter_test.dart
Exited (1)
Have you fixed your problem? Is there anything I can help you with?
Best, Oleksandr
Hi Fred,
I hope you already fixed the problem hence I'm closing the issue. Feel free to reopen the ticket if the problem is still there.
Best, Oleksandr
First the error output when I run goldens update:
PS D:\fredgrttsstuff\GithubProjects\flutter_test\expert_test_setup> flutter test --update-goldens 00:03 +0: D:\fredgrttsstuff\GithubProjects\flutter_test\expert_test_setup\test\counter_test.dart: Counter Initial counter value is 0 ══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════ The following TestFailure object was thrown running a test: Expected: exactly one matching node in the widget tree Actual: _TextFinder:<zero widgets with text "0" (ignoring offstage widgets)> Which: means none were found but one was expected
When the exception was thrown, this was the stack:
4 iSeeText (package:bdd_widget_test/step/i_see_text.dart:8:3)
5 main.. (file:///D:/fredgrttsstuff/GithubProjects/flutter_test/expert_test_setup/test/counter_test.dart:24:13)