Skip to content

Conversation

@ValentinVignal
Copy link
Contributor

Contributes to #130459

It adds a test for

  • examples/api/lib/material/chip/deletable_chip_attributes.on_deleted.0.dart

Pre-launch Checklist

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

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos labels Jul 26, 2024
import 'package:flutter_test/flutter_test.dart';

void main() {
testWidgets('RawChip.deleteIconBoxConstraints updates delete icon size constraints', (WidgetTester tester) async {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test description is from the other DeletableChipAttributes examples. Can you update it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arf sorry about that :(

I changed it in test: Update description

@ValentinVignal ValentinVignal requested a review from bleroux July 26, 2024 13:50
Copy link
Contributor

@bleroux bleroux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ValentinVignal You made a lot of valuable contributions during the past years, would you be interested in getting contributor access (see https://github.com/flutter/flutter/blob/master/docs/contributing/Contributor-access.md)?
If yes, @TahaTesser and I will be happy to sponsor you.

@ValentinVignal
Copy link
Contributor Author

I would love that @bleroux :) That would be awesome!


// Delete Alexander Hamilton.
await tester.tap(
find.descendant(of: find.widgetWithText(Chip, 'Alexander Hamilton'), matching: find.byIcon(Icons.cancel)),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
find.descendant(of: find.widgetWithText(Chip, 'Alexander Hamilton'), matching: find.byIcon(Icons.cancel)),
find.descendant(
of: find.widgetWithText(Chip, 'Alexander Hamilton'),
matching: find.byIcon(Icons.cancel),
),

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also put in a method that returns Finder and reuse in this test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@TahaTesser TahaTesser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nit

Comment on lines 10 to 20
Finder cancelIconFinder(String chipText) {
return find.descendant(
of: find.widgetWithText(Chip, chipText),
matching: find.byIcon(Icons.cancel),
);
}

testWidgets('Chip.onDeleted can be used to delete chips', (WidgetTester tester) async {
await tester.pumpWidget(
const example.OnDeletedExampleApp(),
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Finder cancelIconFinder(String chipText) {
return find.descendant(
of: find.widgetWithText(Chip, chipText),
matching: find.byIcon(Icons.cancel),
);
}
testWidgets('Chip.onDeleted can be used to delete chips', (WidgetTester tester) async {
await tester.pumpWidget(
const example.OnDeletedExampleApp(),
);
testWidgets('Chip.onDeleted can be used to delete chips', (WidgetTester tester) async {
await tester.pumpWidget(
const example.OnDeletedExampleApp(),
);
Finder cancelIconFinder(String chipText) {
return find.descendant(
of: find.widgetWithText(Chip, chipText),
matching: find.byIcon(Icons.cancel),
);
}

Unless the code is reused in multiple tests, it's better to keep inside the test code for readability and portability.

@bleroux bleroux added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 29, 2024
@auto-submit auto-submit bot merged commit 1ceeb54 into flutter:master Jul 29, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 29, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 29, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 29, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 29, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 29, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 29, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 31, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 31, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 31, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 31, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 31, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 31, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 1, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 1, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 1, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 1, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 1, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 1, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 2, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 2, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 2, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 2, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 2, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Aug 3, 2024
Manual roll requested by [email protected]

flutter/flutter@9d5ede0...85960d2

2024-07-30 [email protected] Fix Shortcut label for CharacterActivator does not include modifiers (flutter/flutter#152233)
2024-07-30 [email protected] [wiki] Remove text saying wiki edits do not get code reviewed (flutter/flutter#152530)
2024-07-30 [email protected] Roll Flutter Engine from cb96743cc955 to c58d87d62c20 (1 revision) (flutter/flutter#152527)
2024-07-30 [email protected] Add `find.backButton` finder and `StandardComponentType` enum to find components in tests. (flutter/flutter#149349)
2024-07-30 [email protected] Roll Flutter Engine from 49324cd0b678 to cb96743cc955 (4 revisions) (flutter/flutter#152524)
2024-07-30 [email protected] [devicelab] remove Skia specific and unused devicelab metrics. (flutter/flutter#152523)
2024-07-30 [email protected] Add Dimil Kalathiya to authors (flutter/flutter#152491)
2024-07-29 [email protected] Roll Flutter Engine from 240fb460675d to 49324cd0b678 (4 revisions) (flutter/flutter#152521)
2024-07-29 [email protected] Stop CupertinoScrollbar's track from paging the scroll view on tap (flutter/flutter#152197)
2024-07-29 [email protected] Roll Flutter Engine from 4ef0f0d988ec to 240fb460675d (1 revision) (flutter/flutter#152507)
2024-07-29 [email protected] Roll Flutter Engine from a0219f7a429c to 4ef0f0d988ec (1 revision) (flutter/flutter#152505)
2024-07-29 [email protected] [flutter_tools] remove raster stats CLI option. (flutter/flutter#152501)
2024-07-29 [email protected] Shift some mac Android tests to Mokey devices in staging (flutter/flutter#152499)
2024-07-29 [email protected] [devicelab] enable impeller in external texture test. (flutter/flutter#152502)
2024-07-29 [email protected] Roll Flutter Engine from d1995f302c4d to a0219f7a429c (2 revisions) (flutter/flutter#152500)
2024-07-29 [email protected] Roll Flutter Engine from d803bb16c8b0 to d1995f302c4d (4 revisions) (flutter/flutter#152496)
2024-07-29 [email protected] Normalize Card theme (flutter/flutter#151914)
2024-07-29 [email protected] Roll Flutter Engine from 2db47a1f3d0d to d803bb16c8b0 (1 revision) (flutter/flutter#152489)
2024-07-29 [email protected] Roll Packages from 3d358d9 to 247fb5f (8 revisions) (flutter/flutter#152488)
2024-07-29 [email protected] Update New-Android-version.md (flutter/flutter#152395)
2024-07-29 [email protected] Roll Flutter Engine from 510f19a7e629 to 2db47a1f3d0d (1 revision) (flutter/flutter#152485)
2024-07-29 [email protected] Roll Flutter Engine from 87cbf33b9028 to 510f19a7e629 (1 revision) (flutter/flutter#152473)
2024-07-29 [email protected] Roll Flutter Engine from 2cf3986cae52 to 87cbf33b9028 (2 revisions) (flutter/flutter#152469)
2024-07-29 [email protected] Add tests for deletable_chip_attributes.on_deleted.0.dart (flutter/flutter#152361)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
TytaniumDev pushed a commit to TytaniumDev/flutter that referenced this pull request Aug 7, 2024
…2361)

Contributes to flutter#130459

It adds a test for
- `examples/api/lib/material/chip/deletable_chip_attributes.on_deleted.0.dart`
Buchimi pushed a commit to Buchimi/flutter that referenced this pull request Sep 2, 2024
…2361)

Contributes to flutter#130459

It adds a test for
- `examples/api/lib/material/chip/deletable_chip_attributes.on_deleted.0.dart`
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 11, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants