WP 1.1.0+35 widget test start
This commit is contained in:
@@ -1,8 +1,20 @@
|
||||
// Imports the Flutter Driver API.
|
||||
import 'package:flutter_driver/flutter_driver.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
||||
group('Login App', () {
|
||||
import '../lib/helper/database.dart';
|
||||
|
||||
void main() {
|
||||
FlutterDriver driver;
|
||||
group('Login App', () {
|
||||
setUpAll(() async {
|
||||
driver = await FlutterDriver.connect();
|
||||
await DB().initDb();
|
||||
});
|
||||
|
||||
tearDownAll(() async {
|
||||
if (driver != null) driver.close();
|
||||
await DB().closeDb();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
import 'dart:html';
|
||||
|
||||
import 'package:aitrainer_app/model/customer.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '../../lib/helper/database.dart';
|
||||
|
||||
class CustomerApi {
|
||||
Future<void> addCustomer(Customer customer) async {
|
||||
//print(" ===== add new customer: " + customer.toSQL().toString();
|
||||
await DB().getDB().insert("customer", customer.toJson());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user