Working on tests
This commit is contained in:
parent
1afb29e8aa
commit
7aea289cf1
|
|
@ -5,17 +5,15 @@ import 'utils/common_actions.dart';
|
||||||
import 'utils/localizations.dart';
|
import 'utils/localizations.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
group('PRODUCTS TEST', () {
|
group('Product Tests', () {
|
||||||
TestLocalization localization;
|
TestLocalization localization;
|
||||||
FlutterDriver driver;
|
FlutterDriver driver;
|
||||||
|
|
||||||
final productKey = faker.food.cuisine() +
|
final productKey = makeUnique(faker.food.cuisine());
|
||||||
' ' +
|
|
||||||
faker.randomGenerator.decimal(min: 1).toStringAsFixed(0);
|
|
||||||
final notes = faker.food.dish();
|
final notes = faker.food.dish();
|
||||||
final cost = faker.randomGenerator.decimal(min: 50).toStringAsFixed(2);
|
final cost = faker.randomGenerator.decimal(min: 50).toStringAsFixed(2);
|
||||||
|
|
||||||
final updatedProductKey = faker.food.cuisine();
|
final updatedProductKey = makeUnique(faker.food.cuisine());
|
||||||
final updatedNotes = faker.food.dish();
|
final updatedNotes = faker.food.dish();
|
||||||
final updatedCost =
|
final updatedCost =
|
||||||
faker.randomGenerator.decimal(min: 50).toStringAsFixed(2);
|
faker.randomGenerator.decimal(min: 50).toStringAsFixed(2);
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import 'package:faker/faker.dart';
|
||||||
import 'package:flutter_driver/flutter_driver.dart';
|
import 'package:flutter_driver/flutter_driver.dart';
|
||||||
import 'package:invoiceninja_flutter/.env.dart';
|
import 'package:invoiceninja_flutter/.env.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/keys.dart';
|
import 'package:invoiceninja_flutter/utils/keys.dart';
|
||||||
|
|
@ -70,3 +71,6 @@ Future<void> fillTextFields(
|
||||||
await driver.enterText(entry.value);
|
await driver.enterText(entry.value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String makeUnique(String value) =>
|
||||||
|
'$value ${faker.randomGenerator.integer(999999, min: 100000)}';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue