Skip to content

Commit 7051ba9

Browse files
committed
Update namer rebuild script
1 parent d958ba9 commit 7051ba9

File tree

1 file changed

+16
-18
lines changed

1 file changed

+16
-18
lines changed

namer/codelab_rebuild.yaml

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ steps:
221221
import 'package:flutter_test/flutter_test.dart';
222222
223223
import 'package:namer_app/main.dart';
224-
@@ -7,4 +8,44 @@ void main() {
224+
@@ -7,4 +8,43 @@ void main() {
225225
await tester.pumpWidget(const MyApp());
226226
expect(find.text('A random AWESOME idea:'), findsOneWidget);
227227
});
@@ -230,14 +230,13 @@ steps:
230230
+ await tester.pumpWidget(const MyApp());
231231
+
232232
+ String findWordPair() {
233-
+ final wordPairTextWidget =
234-
+ tester
235-
+ // Get all Text widgets...
236-
+ .widgetList<Text>(find.byType(Text))
237-
+ // ... skip one ('A random AWESOME idea:') ...
238-
+ .skip(1)
239-
+ // ... and take the first after it.
240-
+ .first;
233+
+ final wordPairTextWidget = tester
234+
+ // Get all Text widgets...
235+
+ .widgetList<Text>(find.byType(Text))
236+
+ // ... skip one ('A random AWESOME idea:') ...
237+
+ .skip(1)
238+
+ // ... and take the first after it.
239+
+ .first;
241240
+ return wordPairTextWidget.data!;
242241
+ }
243242
+
@@ -336,18 +335,17 @@ steps:
336335
patch-u: |
337336
--- b/namer/step_05_b_extract/test/widget_test.dart
338337
+++ a/namer/step_05_b_extract/test/widget_test.dart
339-
@@ -13,14 +13,9 @@ void main() {
338+
@@ -13,13 +13,9 @@ void main() {
340339
await tester.pumpWidget(const MyApp());
341340
342341
String findWordPair() {
343-
- final wordPairTextWidget =
344-
- tester
345-
- // Get all Text widgets...
346-
- .widgetList<Text>(find.byType(Text))
347-
- // ... skip one ('A random AWESOME idea:') ...
348-
- .skip(1)
349-
- // ... and take the first after it.
350-
- .first;
342+
- final wordPairTextWidget = tester
343+
- // Get all Text widgets...
344+
- .widgetList<Text>(find.byType(Text))
345+
- // ... skip one ('A random AWESOME idea:') ...
346+
- .skip(1)
347+
- // ... and take the first after it.
348+
- .first;
351349
+ final wordPairTextWidget = tester.widget<Text>(
352350
+ find.descendant(of: find.byType(BigCard), matching: find.byType(Text)),
353351
+ );

0 commit comments

Comments
 (0)