From 44849324bb105770b2e2c46bea5ce7b2df8c4672 Mon Sep 17 00:00:00 2001 From: jwt2706 Date: Fri, 15 Mar 2024 22:03:09 -0400 Subject: [PATCH 1/2] Tests: test coverages --- .github/workflows/build-deploy.yml | 6 + coverage/lcov.info | 823 +++++++++++++++++++++++++++++ test/start_test.dart | 19 + test/widget_test.dart | 30 -- 4 files changed, 848 insertions(+), 30 deletions(-) create mode 100644 coverage/lcov.info create mode 100644 test/start_test.dart delete mode 100644 test/widget_test.dart diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index b885a63..16cec98 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -24,6 +24,12 @@ jobs: - name: Get dependencies run: flutter pub get + + - name: Analyze + run: flutter analyze + + - name: Test + run: flutter test --coverage - name: Build web release project run: flutter build web diff --git a/coverage/lcov.info b/coverage/lcov.info new file mode 100644 index 0000000..6741322 --- /dev/null +++ b/coverage/lcov.info @@ -0,0 +1,823 @@ +SF:lib/screens/start.dart +DA:11,1 +DA:18,1 +DA:19,1 +DA:23,0 +DA:24,0 +DA:25,0 +DA:26,0 +DA:27,0 +DA:28,0 +DA:33,0 +DA:34,0 +DA:35,0 +DA:36,0 +DA:37,0 +DA:38,0 +DA:43,0 +DA:44,0 +DA:45,0 +DA:46,0 +DA:47,0 +DA:48,0 +DA:53,0 +DA:54,0 +DA:55,0 +DA:56,0 +DA:57,0 +DA:58,0 +DA:63,0 +DA:64,0 +DA:65,0 +DA:66,0 +DA:68,0 +DA:72,0 +DA:73,0 +DA:74,0 +DA:77,0 +DA:78,0 +DA:79,0 +DA:82,0 +DA:83,0 +DA:84,0 +DA:87,0 +DA:88,0 +DA:89,0 +DA:90,0 +DA:91,0 +DA:92,0 +DA:93,0 +DA:94,0 +DA:95,0 +DA:97,0 +DA:100,0 +DA:102,0 +DA:103,0 +DA:105,0 +DA:106,0 +DA:113,0 +DA:114,0 +DA:115,0 +DA:116,0 +DA:117,0 +DA:118,0 +DA:119,0 +DA:120,0 +DA:124,0 +DA:125,0 +DA:126,0 +DA:127,0 +DA:138,1 +DA:140,1 +DA:141,1 +DA:142,3 +DA:143,3 +DA:145,1 +DA:146,1 +DA:147,1 +DA:149,1 +DA:151,1 +DA:152,0 +DA:153,0 +DA:155,0 +DA:156,0 +DA:157,0 +DA:158,0 +DA:159,0 +DA:160,0 +DA:161,0 +DA:162,0 +DA:163,0 +DA:164,0 +DA:165,0 +DA:166,0 +DA:167,0 +DA:168,0 +DA:172,0 +DA:173,0 +DA:174,0 +DA:175,0 +DA:183,1 +DA:187,1 +DA:189,1 +DA:191,1 +DA:193,1 +DA:194,1 +DA:195,1 +DA:197,1 +DA:199,1 +DA:202,1 +DA:203,1 +DA:204,1 +DA:206,1 +DA:214,1 +DA:215,1 +DA:217,1 +DA:218,1 +DA:219,1 +DA:224,1 +DA:225,1 +DA:229,1 +DA:230,1 +DA:234,1 +DA:235,3 +DA:236,0 +DA:237,0 +DA:238,1 +DA:239,2 +DA:240,1 +DA:242,2 +DA:245,0 +DA:246,0 +DA:247,0 +DA:248,0 +LF:132 +LH:41 +end_of_record +SF:lib/screens/match_scouting.dart +DA:8,0 +DA:15,0 +DA:16,0 +DA:30,0 +DA:31,0 +DA:32,0 +DA:36,0 +DA:38,0 +DA:39,0 +DA:40,0 +DA:41,0 +DA:53,0 +DA:54,0 +DA:55,0 +DA:59,0 +DA:60,0 +DA:61,0 +DA:63,0 +DA:64,0 +DA:68,0 +DA:69,0 +DA:70,0 +DA:71,0 +DA:72,0 +DA:74,0 +DA:75,0 +DA:81,0 +DA:82,0 +DA:83,0 +DA:84,0 +DA:85,0 +DA:87,0 +DA:88,0 +DA:94,0 +DA:95,0 +DA:96,0 +DA:98,0 +DA:99,0 +DA:100,0 +DA:101,0 +DA:102,0 +DA:103,0 +DA:104,0 +DA:108,0 +DA:109,0 +DA:115,0 +DA:117,0 +DA:118,0 +DA:121,0 +DA:124,0 +DA:125,0 +DA:126,0 +DA:127,0 +DA:128,0 +DA:129,0 +DA:130,0 +DA:131,0 +DA:132,0 +DA:135,0 +DA:145,0 +DA:146,0 +DA:148,0 +DA:149,0 +DA:150,0 +DA:151,0 +DA:152,0 +DA:153,0 +DA:154,0 +DA:155,0 +DA:156,0 +DA:157,0 +DA:158,0 +DA:159,0 +DA:163,0 +DA:167,0 +DA:168,0 +DA:169,0 +DA:174,0 +DA:175,0 +DA:179,0 +DA:180,0 +DA:181,0 +DA:182,0 +DA:185,0 +DA:186,0 +DA:188,0 +DA:189,0 +DA:191,0 +DA:193,0 +DA:194,0 +DA:195,0 +DA:197,0 +DA:201,0 +DA:203,0 +DA:204,0 +DA:213,0 +DA:215,0 +DA:216,0 +DA:217,0 +DA:218,0 +DA:220,0 +DA:221,0 +DA:225,0 +DA:226,0 +DA:227,0 +DA:228,0 +DA:229,0 +DA:237,0 +DA:238,0 +DA:239,0 +DA:240,0 +DA:241,0 +DA:249,0 +DA:250,0 +DA:251,0 +DA:255,0 +DA:256,0 +DA:260,0 +DA:261,0 +DA:263,0 +DA:264,0 +DA:265,0 +DA:266,0 +DA:267,0 +DA:272,0 +DA:273,0 +DA:274,0 +DA:275,0 +DA:280,0 +DA:281,0 +DA:282,0 +DA:283,0 +DA:284,0 +DA:285,0 +DA:286,0 +DA:293,0 +DA:294,0 +DA:295,0 +DA:296,0 +DA:297,0 +DA:298,0 +DA:299,0 +DA:308,0 +DA:311,0 +DA:312,0 +DA:313,0 +DA:318,0 +DA:319,0 +DA:321,0 +DA:324,0 +DA:325,0 +DA:326,0 +DA:327,0 +DA:329,0 +DA:330,0 +DA:334,0 +DA:335,0 +DA:336,0 +DA:337,0 +DA:339,0 +DA:340,0 +DA:342,0 +DA:345,0 +DA:346,0 +DA:348,0 +DA:349,0 +DA:350,0 +DA:355,0 +DA:357,0 +DA:358,0 +DA:366,0 +DA:367,0 +DA:368,0 +DA:369,0 +DA:370,0 +DA:371,0 +DA:372,0 +DA:374,0 +DA:375,0 +DA:376,0 +DA:377,0 +DA:379,0 +DA:380,0 +DA:381,0 +DA:383,0 +DA:384,0 +DA:385,0 +DA:386,0 +DA:393,0 +DA:394,0 +DA:396,0 +DA:397,0 +DA:398,0 +DA:399,0 +DA:400,0 +DA:401,0 +DA:404,0 +DA:405,0 +DA:406,0 +DA:407,0 +DA:409,0 +DA:410,0 +DA:411,0 +DA:413,0 +DA:414,0 +DA:415,0 +DA:420,0 +DA:421,0 +DA:422,0 +DA:423,0 +DA:424,0 +DA:425,0 +DA:427,0 +DA:428,0 +DA:429,0 +DA:430,0 +DA:431,0 +DA:432,0 +DA:433,0 +DA:434,0 +DA:435,0 +DA:436,0 +DA:437,0 +DA:439,0 +DA:440,0 +DA:441,0 +DA:453,0 +DA:454,0 +DA:458,0 +DA:459,0 +DA:460,0 +DA:461,0 +DA:463,0 +DA:464,0 +DA:466,0 +DA:469,0 +DA:470,0 +DA:472,0 +DA:473,0 +DA:474,0 +DA:479,0 +DA:481,0 +DA:482,0 +DA:491,0 +DA:493,0 +DA:495,0 +DA:496,0 +DA:497,0 +DA:498,0 +DA:499,0 +DA:500,0 +DA:501,0 +DA:503,0 +DA:504,0 +DA:505,0 +DA:506,0 +DA:508,0 +DA:509,0 +DA:510,0 +DA:512,0 +DA:513,0 +DA:514,0 +DA:515,0 +DA:522,0 +DA:523,0 +DA:525,0 +DA:526,0 +DA:527,0 +DA:529,0 +DA:530,0 +DA:532,0 +DA:533,0 +DA:534,0 +DA:539,0 +DA:540,0 +DA:541,0 +DA:542,0 +DA:543,0 +DA:544,0 +DA:545,0 +DA:547,0 +DA:548,0 +DA:549,0 +DA:555,0 +DA:556,0 +DA:557,0 +DA:558,0 +DA:570,0 +DA:571,0 +DA:573,0 +DA:574,0 +DA:575,0 +DA:578,0 +DA:579,0 +DA:581,0 +DA:582,0 +DA:583,0 +DA:588,0 +DA:590,0 +DA:594,0 +DA:595,0 +DA:596,0 +DA:597,0 +DA:598,0 +DA:599,0 +DA:600,0 +DA:603,0 +DA:613,0 +DA:614,0 +DA:615,0 +DA:616,0 +DA:617,0 +DA:623,0 +DA:624,0 +DA:625,0 +DA:626,0 +DA:627,0 +DA:628,0 +DA:631,0 +LF:319 +LH:0 +end_of_record +SF:lib/screens/send_data.dart +DA:16,0 +DA:22,0 +DA:24,0 +DA:25,0 +DA:40,0 +DA:42,0 +DA:43,0 +DA:44,0 +DA:45,0 +DA:49,0 +DA:50,0 +DA:51,0 +DA:52,0 +DA:53,0 +DA:57,0 +DA:58,0 +DA:59,0 +DA:60,0 +DA:62,0 +DA:66,0 +DA:67,0 +DA:68,0 +DA:69,0 +DA:71,0 +DA:72,0 +DA:73,0 +DA:76,0 +DA:77,0 +DA:78,0 +DA:79,0 +DA:83,0 +DA:84,0 +DA:85,0 +DA:86,0 +DA:87,0 +DA:88,0 +DA:89,0 +DA:90,0 +DA:93,0 +DA:97,0 +DA:99,0 +DA:100,0 +DA:102,0 +DA:107,0 +DA:108,0 +DA:110,0 +DA:114,0 +DA:116,0 +DA:117,0 +DA:118,0 +DA:120,0 +DA:121,0 +DA:127,0 +DA:129,0 +DA:130,0 +DA:136,0 +DA:139,0 +DA:141,0 +DA:142,0 +DA:143,0 +DA:152,0 +DA:155,0 +DA:156,0 +DA:157,0 +DA:160,0 +DA:162,0 +DA:163,0 +DA:164,0 +DA:165,0 +DA:166,0 +DA:167,0 +DA:168,0 +DA:171,0 +DA:172,0 +DA:175,0 +DA:176,0 +DA:178,0 +DA:179,0 +DA:181,0 +DA:182,0 +DA:185,0 +DA:186,0 +DA:187,0 +DA:188,0 +DA:189,0 +DA:190,0 +DA:191,0 +DA:194,0 +DA:195,0 +DA:196,0 +DA:197,0 +DA:208,0 +DA:209,0 +DA:210,0 +DA:211,0 +DA:212,0 +DA:213,0 +DA:215,0 +DA:216,0 +DA:217,0 +DA:218,0 +DA:219,0 +DA:221,0 +DA:222,0 +DA:226,0 +DA:227,0 +DA:229,0 +DA:230,0 +DA:235,0 +DA:236,0 +DA:237,0 +DA:238,0 +DA:239,0 +DA:244,0 +DA:245,0 +DA:246,0 +DA:247,0 +DA:252,0 +DA:257,0 +DA:259,0 +DA:260,0 +DA:261,0 +DA:263,0 +DA:264,0 +DA:265,0 +DA:266,0 +DA:267,0 +DA:268,0 +DA:270,0 +DA:271,0 +DA:272,0 +DA:276,0 +DA:277,0 +DA:278,0 +DA:280,0 +DA:281,0 +DA:282,0 +DA:284,0 +DA:285,0 +DA:286,0 +DA:287,0 +DA:290,0 +DA:291,0 +DA:292,0 +DA:293,0 +DA:294,0 +DA:295,0 +DA:296,0 +DA:297,0 +DA:298,0 +DA:299,0 +DA:303,0 +DA:304,0 +DA:305,0 +DA:306,0 +DA:316,0 +DA:317,0 +DA:319,0 +DA:320,0 +DA:321,0 +DA:323,0 +DA:324,0 +DA:325,0 +DA:326,0 +DA:328,0 +DA:329,0 +DA:330,0 +DA:331,0 +DA:332,0 +DA:333,0 +DA:336,0 +DA:337,0 +DA:338,0 +DA:340,0 +DA:341,0 +DA:342,0 +DA:344,0 +DA:346,0 +DA:347,0 +DA:348,0 +DA:349,0 +DA:350,0 +DA:358,0 +DA:360,0 +DA:361,0 +DA:366,0 +DA:367,0 +DA:368,0 +DA:369,0 +DA:381,0 +DA:382,0 +DA:383,0 +DA:386,0 +DA:387,0 +LF:194 +LH:0 +end_of_record +SF:lib/screens/pit_scouting.dart +DA:7,0 +DA:9,0 +DA:15,0 +DA:16,0 +DA:26,0 +DA:28,0 +DA:29,0 +DA:32,0 +DA:34,0 +DA:35,0 +DA:36,0 +DA:37,0 +DA:41,0 +DA:43,0 +DA:44,0 +DA:45,0 +DA:46,0 +DA:47,0 +DA:48,0 +DA:50,0 +DA:51,0 +DA:52,0 +DA:53,0 +DA:56,0 +DA:63,0 +DA:64,0 +DA:65,0 +DA:70,0 +DA:71,0 +DA:75,0 +DA:76,0 +DA:77,0 +DA:78,0 +DA:81,0 +DA:82,0 +DA:84,0 +DA:85,0 +DA:87,0 +DA:89,0 +DA:90,0 +DA:91,0 +DA:93,0 +DA:97,0 +DA:99,0 +DA:100,0 +DA:109,0 +DA:110,0 +DA:112,0 +DA:113,0 +DA:114,0 +DA:115,0 +DA:116,0 +DA:123,0 +DA:125,0 +DA:126,0 +DA:127,0 +DA:128,0 +DA:130,0 +DA:132,0 +DA:133,0 +DA:134,0 +DA:135,0 +DA:136,0 +DA:137,0 +DA:138,0 +DA:139,0 +DA:142,0 +DA:143,0 +DA:144,0 +DA:147,0 +DA:148,0 +DA:149,0 +DA:151,0 +DA:153,0 +DA:154,0 +DA:159,0 +DA:160,0 +DA:161,0 +DA:162,0 +DA:164,0 +DA:165,0 +DA:166,0 +DA:169,0 +DA:170,0 +DA:171,0 +DA:173,0 +DA:175,0 +DA:176,0 +DA:181,0 +DA:182,0 +DA:184,0 +DA:185,0 +DA:186,0 +DA:187,0 +DA:189,0 +DA:190,0 +DA:191,0 +DA:192,0 +DA:194,0 +DA:195,0 +DA:197,0 +DA:198,0 +DA:199,0 +DA:205,0 +DA:207,0 +DA:208,0 +DA:209,0 +DA:214,0 +DA:218,0 +DA:219,0 +DA:220,0 +DA:221,0 +LF:112 +LH:0 +end_of_record +SF:lib/screens/scan.dart +DA:15,0 +DA:17,0 +DA:19,0 +DA:20,0 +DA:30,0 +DA:32,0 +DA:33,0 +DA:34,0 +DA:35,0 +DA:36,0 +DA:40,0 +DA:42,0 +DA:43,0 +DA:44,0 +DA:45,0 +DA:47,0 +DA:48,0 +DA:49,0 +DA:50,0 +DA:52,0 +DA:57,0 +DA:58,0 +DA:59,0 +DA:62,0 +DA:63,0 +DA:64,0 +DA:65,0 +DA:66,0 +DA:68,0 +DA:69,0 +DA:70,0 +DA:78,0 +DA:79,0 +DA:80,0 +DA:81,0 +DA:82,0 +DA:83,0 +DA:85,0 +DA:86,0 +DA:87,0 +DA:88,0 +DA:89,0 +DA:91,0 +DA:97,0 +DA:99,0 +DA:100,0 +LF:46 +LH:0 +end_of_record diff --git a/test/start_test.dart b/test/start_test.dart new file mode 100644 index 0000000..1d46fd7 --- /dev/null +++ b/test/start_test.dart @@ -0,0 +1,19 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:flutter/material.dart'; +import 'package:merge_data/screens/start.dart'; + +void main() { + testWidgets('StartPage UI Test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(MaterialApp( + home: StartPage( + title: 'Test Title', + year: 2022, + api: 'https://google.com', + ), + )); + + // Verify that the StartPage is shown + expect(find.byType(StartPage), findsOneWidget); + }); +} \ No newline at end of file diff --git a/test/widget_test.dart b/test/widget_test.dart deleted file mode 100644 index 7c52113..0000000 --- a/test/widget_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility in the flutter_test package. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; - -import 'package:merge_data/main.dart'; - -void main() { - testWidgets('Counter increments smoke test', (WidgetTester tester) async { - // Build our app and trigger a frame. - await tester.pumpWidget(const MyApp()); - - // Verify that our counter starts at 0. - expect(find.text('0'), findsOneWidget); - expect(find.text('1'), findsNothing); - - // Tap the '+' icon and trigger a frame. - await tester.tap(find.byIcon(Icons.add)); - await tester.pump(); - - // Verify that our counter has incremented. - expect(find.text('0'), findsNothing); - expect(find.text('1'), findsOneWidget); - }); -} From 672f656ee6de30afe7439230d39b2c7366bc2d76 Mon Sep 17 00:00:00 2001 From: Ryan <46634687+ryanidk@users.noreply.github.com> Date: Sat, 16 Mar 2024 16:43:15 -0400 Subject: [PATCH 2/2] remove analysis --- .github/workflows/build-deploy.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 16cec98..6c8077a 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -25,9 +25,6 @@ jobs: - name: Get dependencies run: flutter pub get - - name: Analyze - run: flutter analyze - - name: Test run: flutter test --coverage