Skip to content

Commit

Permalink
issue-134 fixed waterbreathing in search
Browse files Browse the repository at this point in the history
  • Loading branch information
gennadyterekhov committed Jun 11, 2024
1 parent 219f1d3 commit 8299159
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 13 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ Install release app on device:
this command runs specific integration test
`flutter drive --driver integration_test/driver.dart --target integration_test/full_test.dart --no-dds`

this command runs specific widget/unit test
this command runs specific widget/unit test file
`flutter test test/layers/data/data_source_test.dart --platform chrome`

this command runs specific widget/unit test inside a file
`flutter test test/layers/data/resource/effect_resource_test.dart --name "Test Waterbreathing is not included where it should not be"`

this commands runs all unit tests
`flutter test --platform chrome`

Expand Down
4 changes: 2 additions & 2 deletions lib/layers/data/storage/l10n/search_indices.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:the_elder_scrolls_alchemy_client/layers/data/resources/constant.dart';
import 'package:the_elder_scrolls_alchemy_client/layers/data/resources/data_resource.dart';

/// only for russian right now....
/// maybe I will parse more translations data later and expand the index
Expand All @@ -26,7 +25,8 @@ class SearchLocalizedNameIndex {
"Повышение навыка: иллюзия": "Fortify Illusion",
"Повышение навыка: лёгкая броня": "Fortify Light Armor",
"Повышение навыка: взлом": "Fortify Lockpicking",
"Повышение магии": "Waterbreathing",
"Повышение магии": "Fortify Magicka",
"Водное дыхание": "Waterbreathing",
"Повышение навыка: стрельба": "Fortify Marksman",
"Повышение навыка: одноручное оружие": "Fortify One Handed",
"Повышение навыка: карманные кражи": "Fortify Pickpocket",
Expand Down
23 changes: 13 additions & 10 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
import 'package:flutter/material.dart';
import 'package:the_elder_scrolls_alchemy_client/app.dart';
import 'package:the_elder_scrolls_alchemy_client/di_container.dart';
import 'package:flutter_simple_dependency_injection/injector.dart';
import 'package:logging/logging.dart';
import 'package:stack_trace/stack_trace.dart';
import 'package:the_elder_scrolls_alchemy_client/app.dart';
import 'package:the_elder_scrolls_alchemy_client/di_container.dart';

void main() async {
WidgetsFlutterBinding.ensureInitialized();
FlutterError.onError = (FlutterErrorDetails details) {
print("Error : ${details.exception}");
// print(Trace.from(details.stack!).terse);
};

final dependencyInjectionContainer = DependencyInjectionContainer().initialise(Injector());
final app = dependencyInjectionContainer.get<TheElderScrollsAlchemyClientApp>();
Logger.root.level = Level.INFO;

Chain.capture(() async {
WidgetsFlutterBinding.ensureInitialized();
FlutterError.onError = (FlutterErrorDetails details) {
print("Error : ${details.exception}");
// print(Trace.from(details.stack!).terse);
};

final dependencyInjectionContainer = DependencyInjectionContainer().initialise(Injector());
final app = dependencyInjectionContainer.get<TheElderScrollsAlchemyClientApp>();

runApp(
app,
);
Expand Down
9 changes: 9 additions & 0 deletions test/layers/data/resource/effect_resource_test.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:logging/logging.dart';
import 'package:the_elder_scrolls_alchemy_client/layers/business_logic/models/effect.dart';
import 'package:the_elder_scrolls_alchemy_client/layers/data/resources/constant.dart';
import 'package:the_elder_scrolls_alchemy_client/layers/data/resources/effect_resource.dart';

// not sure if it's needed or not
setUpAll() {
print('setUpAll');
Logger.root.onRecord.listen((record) {
print('${record.level.name}: ${record.time}: ${record.message}');
});
}

void main() {
group("Test effect resource", () {
test("Test search sorts with respect to localization", () {
Expand Down

0 comments on commit 8299159

Please sign in to comment.