Commit 143dbfa

derdilla <82763757+NobodyForNothing@users.noreply.github.com>
2024-06-28 08:35:23
fix test runner
Signed-off-by: derdilla <82763757+NobodyForNothing@users.noreply.github.com>
1 parent 4b07cc3
Changed files (2)
.github
workflows
app
integration_test
.github/workflows/app-CI.yml
@@ -40,6 +40,9 @@ jobs:
       uses: subosito/flutter-action@v2
       with:
         channel: ${{ env.FLUTTER_CHANNEL }}
+    - name: Generate mock code
+      run: flutter pub run build_runner build
+      working-directory: ./app
     - name: Run tests
       run: flutter test
       working-directory: ./app
app/integration_test/add_measurement_test.dart
@@ -84,8 +84,8 @@ void main() {
 
     expect(find.byType(MeasurementListRow), findsOneWidget);
     final submittedRecord = tester.widget<MeasurementListRow>(find.byType(MeasurementListRow)).data;
-    expect(submittedRecord.sys, 123);
-    expect(submittedRecord.dia, 67);
+    expect(submittedRecord.sys?.mmHg, 123);
+    expect(submittedRecord.dia?.mmHg, 67);
     expect(submittedRecord.pul, 56);
     expect(submittedRecord.color, Colors.red.value);
     expect(submittedRecord.note, 'some test sample note');