Skip to content

[web] text_test 'Overlow is clipping correctly...' test failing on web. #87878

Open

Description

@darrenaustin

Part of the skip test audit. The test:

testWidgets('Overflow is clipping correctly - long text with overflow: visible', (WidgetTester tester) async {

Is currently skipped on the web, referencing #33523 which has been fixed. However, if we reenable it we get:

%  flutter test --platform=chrome --web-renderer=html test/widgets/text_test.dart
00:03 +15 ~3: Overflow is clipping correctly - long text with overflow: ellipsis                                                                                                                                                                                                          
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following TestFailure object was thrown running a test:
  Expected: Object or closure painting:
          'clipRect(Rect.fromLTRB(0.0, 0.0, 50.0, 50.0))'
  Actual: _WidgetTypeFinder:<exactly one widget with type "Text" (ignoring offstage widgets):
Text("a long long long long text, should be clip", overflow: ellipsis)>
   Which: did not match the pattern.
          It called 1 other method on the canvas, the first of which was drawParagraph(Instance of
'CanvasParagraph', Offset(0.0, 0.0)), but did not call clipRect() at the time where
clipRect(Rect.fromLTRB(0.0, 0.0, 50.0, 50.0)) was expected.
          The first method that was called when the call to clipRect() was expected,
drawParagraph(Instance of 'CanvasParagraph', Offset(0.0, 0.0)), was called with the following stack:
            ../dart-sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart 906:28   get current
            ../rendering/recording_canvas.dart.js 318:110                           noSuchMethod
            ../rendering/recording_canvas.dart.js 483:19                            drawParagraph
            ../packages/flutter/src/painting/placeholder_span.dart.js 2157:14       paint
            ../packages/flutter/src/rendering/paragraph.dart.js 850:26              paint
            ../rendering/mock_canvas.dart.js 1471:22                                _evaluatePainter
            ../rendering/mock_canvas.dart.js 240:36                                 matches
            ../packages/test_api/src/expect/async_matcher.dart.js 147:52            _expect
            ../packages/test_api/src/expect/async_matcher.dart.js 86:12             expect$
            ../packages/flutter_test/src/deprecated.dart.js 7250:12                 expect$
            text_test.dart.js 2913:23                                               <fn>
            ../dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50   <fn>
            ../packages/stack_trace/src/stack_zone_specification.dart.js 174:98     <fn>
            ../packages/stack_trace/src/stack_zone_specification.dart.js 242:16     [_run]
            ../packages/stack_trace/src/stack_zone_specification.dart.js 174:80     <fn>
            ../dart-sdk/lib/async/zone.dart 1436:47                                 _rootRunUnary
            ../dart-sdk/lib/async/zone.dart 1335:19                                 runUnary
            ../dart-sdk/lib/async/future_impl.dart 160:18                           handleValue
            ../dart-sdk/lib/async/future_impl.dart 767:44
handleValueCallback
            ../dart-sdk/lib/async/future_impl.dart 796:13
_propagateToListeners
            ../dart-sdk/lib/async/future_impl.dart 602:5
[_completeWithValue]
            ../dart-sdk/lib/async/future_impl.dart 640:7                            <fn>
            ../packages/fake_async/fake_async.dart.js 158:40                        flushMicrotasks
            ../packages/flutter_test/src/deprecated.dart.js 5964:19                 <fn>
            ../dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 84:54   runBody
            ../dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 123:5   _async
            ../packages/flutter_test/src/deprecated.dart.js 5961:62                 <fn>
            ../dart-sdk/lib/async/future.dart 198:37                                <fn>
            ../packages/stack_trace/src/stack_zone_specification.dart.js 242:16     [_run]
            ../packages/stack_trace/src/stack_zone_specification.dart.js 165:71     <fn>
            ../dart-sdk/lib/async/zone.dart 1420:47                                 _rootRun
            ../dart-sdk/lib/async/zone.dart 1328:19                                 run
            ../dart-sdk/lib/async/zone.dart 1236:7                                  runGuarded
            ../dart-sdk/lib/async/zone.dart 1276:23                                 <fn>
            ../packages/stack_trace/src/stack_zone_specification.dart.js 242:16     [_run]
            ../packages/stack_trace/src/stack_zone_specification.dart.js 165:71     <fn>
            ../dart-sdk/lib/async/zone.dart 1428:13                                 _rootRun
            ../dart-sdk/lib/async/zone.dart 1328:19                                 run
            ../dart-sdk/lib/async/zone.dart 1236:7                                  runGuarded
            ../dart-sdk/lib/async/zone.dart 1276:23                                 callback
            ../dart-sdk/lib/async/schedule_microtask.dart 40:11                     _microtaskLoop
            ../dart-sdk/lib/async/schedule_microtask.dart 49:5
_startMicrotaskLoop
            ../dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 166:15  <fn>
          The complete display list was:
            * drawParagraph(Instance of 'CanvasParagraph', Offset(0.0, 0.0))

When the exception was thrown, this was the stack:
../dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 251:49  throw_
../packages/test_api/src/expect/async_matcher.dart.js 164:22                     fail
../packages/test_api/src/expect/async_matcher.dart.js 159:12                     _expect
../packages/test_api/src/expect/async_matcher.dart.js 86:12                      expect$
../packages/flutter_test/src/deprecated.dart.js 7250:12                          expect$
text_test.dart.js 2913:23                                                        <fn>
flutter doctor
[✓] Flutter (Channel master, 2.5.0-6.0.pre.28, on macOS 11.5.1 20G80 darwin-x64, locale en)
    • Flutter version 2.5.0-6.0.pre.28 at /Users/darrenaustin/dev/flutter
    • Upstream repository [email protected]:flutter/flutter.git
    • Framework revision d3bdbed498 (20 hours ago), 2021-08-06 17:45:02 -0700
    • Engine revision c0e59bc7b6
    • Dart version 2.14.0 (build 2.14.0-383.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/darrenaustin/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_SDK_ROOT = /Users/darrenaustin/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.5.1, Build version 12E507
    • CocoaPods version 1.10.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 48.1.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] IntelliJ IDEA Ultimate Edition (version 2021.2)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 59.0.4
    • Dart plugin version 212.4746.57

[✓] VS Code (version 1.58.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.24.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 11.5.1 20G80 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 92.0.4515.131

• No issues found!

Activity

  1. added
    c: contributor-productivityTeam-specific productivity, code health, technical debt.
    platform-webWeb applications specifically
    c: tech-debtTechnical debt, code quality, testing, etc.
    team: skip-testAn issue used to track tests that are skipped.
    on Aug 7, 2021
  2. self-assigned this
    on Aug 12, 2021
  3. added
    P1High-priority issues at the top of the work list
    and removed
    assigned for triageissue is assigned to a domain expert for further triage
    on Sep 1, 2021
  4. removed their assignment
    on Sep 22, 2021
  5. added
    P2Important issues not at the top of the work list
    and removed
    P1High-priority issues at the top of the work list
    on Sep 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: contributor-productivityTeam-specific productivity, code health, technical debt.c: tech-debtTechnical debt, code quality, testing, etc.platform-webWeb applications specificallyteam-webOwned by Web platform teamteam: skip-testAn issue used to track tests that are skipped.triaged-webTriaged by Web platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions