Implement the automatic update check and installation
This commit is contained in:
parent
70d8fc4d39
commit
660a4a670a
10 changed files with 176 additions and 122 deletions
13
test/test_update_checker.dart
Normal file
13
test/test_update_checker.dart
Normal file
|
@ -0,0 +1,13 @@
|
|||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:timetrack/consts.dart';
|
||||
|
||||
void main() {
|
||||
test("Test the update checking behavior", () async {
|
||||
await TTConsts.checkUpdate();
|
||||
if (TTConsts.UPDATE_AVAILABLE) {
|
||||
print("An update is available for the current update channel");
|
||||
} else {
|
||||
print("No updates available");
|
||||
}
|
||||
});
|
||||
}
|
|
@ -8,12 +8,12 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
import 'package:timetrack/main.dart';
|
||||
import 'package:timetrack/pages/MainApp.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
|
||||
// Build our app and trigger a frame.
|
||||
await tester.pumpWidget(const MyApp());
|
||||
await tester.pumpWidget(MainApp());
|
||||
|
||||
// Verify that our counter starts at 0.
|
||||
expect(find.text('0'), findsOneWidget);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue