Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for material banner example #147733

Merged

Conversation

NobodyForNothing
Copy link
Contributor

Part of #130459.

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
  • All existing and new tests are passing.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos labels May 2, 2024
@Piinks Piinks requested review from TahaTesser and bleroux May 8, 2024 18:20
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.

Thanks for adding these valuable tests.
Just one small comment about capitalizing test descriptions first letter.

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! Thanks for adding those tests.
Taha and I are attending Google/IO this week, expect slow review, we will catch up on reviews next week.

@bleroux
Copy link
Contributor

bleroux commented May 21, 2024

@NobodyForNothing Thanks for your patience, can you rebase this PR and solve the conflict if there is still one?

@bleroux
Copy link
Contributor

bleroux commented May 22, 2024

Thanks for the rebase.
Linux analyze step failed because of several trailing space characters, see the corresponding lines in https://ci.chromium.org/ui/p/flutter/builders/try/Linux%20analyze/79407/overview

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!

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! Just minor format issues

@@ -7,6 +7,21 @@ import 'package:flutter_api_samples/material/banner/material_banner.0.dart' as e
import 'package:flutter_test/flutter_test.dart';

void main() {
testWidgets('Shows all elements', (WidgetTester tester) async {
await tester.pumpWidget(
const example.MaterialBannerExampleApp()
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
const example.MaterialBannerExampleApp()
const example.MaterialBannerExampleApp(),


testWidgets('The banner is below the text saying so', (WidgetTester tester) async {
await tester.pumpWidget(
const example.MaterialBannerExampleApp()
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
const example.MaterialBannerExampleApp()
const example.MaterialBannerExampleApp(),

Comment on lines 26 to 27
final MaterialBanner banner = tester.widget<MaterialBanner>(
find.byType(MaterialBanner));
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
final MaterialBanner banner = tester.widget<MaterialBanner>(
find.byType(MaterialBanner));
final MaterialBanner banner = tester.widget<MaterialBanner>(
find.byType(MaterialBanner),
);

@bleroux bleroux added the autosubmit Merge PR when tree becomes green via auto submit App label May 23, 2024
@auto-submit auto-submit bot merged commit 1c1516c into flutter:master May 23, 2024
34 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 24, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request May 24, 2024
flutter/flutter@8d955cd...8dd0831

2024-05-24 [email protected] Roll Flutter Engine from c6041cd9049c to 4ab442475223 (1 revision) (flutter/flutter#149039)
2024-05-24 [email protected] Roll Flutter Engine from 8d896f4feb76 to c6041cd9049c (1 revision) (flutter/flutter#149035)
2024-05-24 [email protected] Roll Flutter Engine from fe3b26294d8f to 8d896f4feb76 (1 revision) (flutter/flutter#149030)
2024-05-24 [email protected] Roll Flutter Engine from b4fb08f21757 to fe3b26294d8f (1 revision) (flutter/flutter#149028)
2024-05-24 [email protected] Roll Flutter Engine from f873230ce823 to b4fb08f21757 (2 revisions) (flutter/flutter#149025)
2024-05-24 [email protected] Roll Flutter Engine from d78f66753332 to f873230ce823 (1 revision) (flutter/flutter#149021)
2024-05-24 [email protected] Roll Flutter Engine from 768c90ee5dc7 to d78f66753332 (3 revisions) (flutter/flutter#149011)
2024-05-23 [email protected] Reland "Update `FocusManager` platform check to include iOS" (flutter/flutter#148984)
2024-05-23 [email protected] Roll Flutter Engine from ad12c5d02a8c to 768c90ee5dc7 (2 revisions) (flutter/flutter#149003)
2024-05-23 [email protected] Fix `SnackBar` action text button overlay color (flutter/flutter#148961)
2024-05-23 [email protected] Fix the second TextFormField to trigger onTapOutside (flutter/flutter#148930)
2024-05-23 [email protected] Roll Flutter Engine from 2a48302f6f4e to ad12c5d02a8c (3 revisions) (flutter/flutter#148993)
2024-05-23 [email protected] Roll Flutter Engine from 964f087f288c to 2a48302f6f4e (1 revision) (flutter/flutter#148950)
2024-05-23 [email protected] [wiki migration] Remaining pages under docs/contributing/ (flutter/flutter#148790)
2024-05-23 [email protected] [wiki migration] Web team pages (flutter/flutter#148777)
2024-05-23 [email protected] Test remaining transitions api examples (flutter/flutter#148302)
2024-05-23 [email protected] Test snack bar examples (flutter/flutter#147774)
2024-05-23 [email protected] Add tests for material banner example (flutter/flutter#147733)
2024-05-23 [email protected] Roll Packages from 6525441 to 1008d9e (6 revisions) (flutter/flutter#148980)
2024-05-23 [email protected] Revert "const vs. non-const widget build benchmark" (flutter/flutter#148970)
2024-05-23 [email protected] Remove hidden dependencies on HttpClient (flutter/flutter#148773)
2024-05-23 [email protected] Revert "Update `FocusManager` platform check to include iOS" (flutter/flutter#148978)

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],[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
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 f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants