Skip to content

Regression in golden testing a disabled chip with delete button in CanvasKit #138009

@TahaTesser

Description

@TahaTesser

Is there an existing issue for this?

Steps to reproduce

Test a disabled Chip with delete button before and after #136918 in canvas kit.

This seems to be caused by #136918

Test Code

import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
  testWidgets('Disabled Chip with delete button', (WidgetTester tester) async {
    await tester.pumpWidget(
      MaterialApp(
        home: Material(
          child: RawChip(
            isEnabled: false,
            label: const Text('Label'),
            onDeleted: () {},
          ),
        ),
      ),
    );

    // Delete button should be visible.
    await expectLater(find.byType(RawChip), matchesGoldenFile('disabled_chip_with_delete_button.png'));
  });
}

Test Command

flutter test --web-renderer canvaskit --platform=chrome --update-goldens

Note

This is blocking a Chips PR #137685

When testing the fix, I run to this issue with no label or delete icon being rendered by the golden test.

Screenshot 2023-11-07 at 19 33 43

Expected results

Before #136918

disabled_chip_with_delete_button_before

Actual results

After #136918

disabled_chip_with_delete_button_after

Code sample

Code sample
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[Paste your output here]

Metadata

Metadata

Labels

P2Important issues not at the top of the work lista: tests"flutter test", flutter_test, or one of our testsc: regressionIt was better in the past than it is nowe: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionteam-webOwned by Web platform team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions