From f478fe4c9fd446f3b264c6ce50c1b9f8cdb9e3bc Mon Sep 17 00:00:00 2001 From: vyPal Date: Fri, 8 Sep 2023 09:25:40 +0200 Subject: [PATCH 1/7] Workflow update, translate loader text --- .github/workflows/build-preview-apk.yml | 2 +- lib/load.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-preview-apk.yml b/.github/workflows/build-preview-apk.yml index e5a70e5..5a925f7 100644 --- a/.github/workflows/build-preview-apk.yml +++ b/.github/workflows/build-preview-apk.yml @@ -70,7 +70,7 @@ jobs: - uses: "marvinpinto/action-automatic-releases@latest" with: repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: "v${{ steps.semver.outputs.version }}" + automatic_release_tag: "v${{ steps.semver.outputs.version }}-${{ github.ref_name }}" prerelease: true title: "EduPage2 Preview v${{ steps.semver.outputs.version }} ${{ github.ref_name }}" files: | diff --git a/lib/load.dart b/lib/load.dart index 46d7b4f..854359e 100644 --- a/lib/load.dart +++ b/lib/load.dart @@ -31,7 +31,7 @@ class LoadingScreenState extends State { Dio dio = Dio(); double progress = 0.0; - String loaderText = "Načítání..."; + String loaderText = "Loading..."; String baseUrl = "https://lobster-app-z6jfk.ondigitalocean.app/api"; From db948b8302764d673d849c51dc7a18d31994e4ad Mon Sep 17 00:00:00 2001 From: vyPal Date: Fri, 8 Sep 2023 11:43:42 +0200 Subject: [PATCH 2/7] Set launchUrl to open browser --- lib/home.dart | 3 ++- lib/message.dart | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/home.dart b/lib/home.dart index e47a3ba..bd465f9 100644 --- a/lib/home.dart +++ b/lib/home.dart @@ -511,7 +511,8 @@ class HomePageState extends State { final url = Uri.parse( 'https://github.com/DislikesSchool/EduPage2/releases/latest'); if (await canLaunchUrl(url)) { - await launchUrl(url); + await launchUrl(url, + mode: LaunchMode.externalApplication); } else { throw 'Could not launch $url'; } diff --git a/lib/message.dart b/lib/message.dart index 7f28071..7d430f2 100644 --- a/lib/message.dart +++ b/lib/message.dart @@ -214,7 +214,8 @@ class MessagePageState extends State { } Future _onOpen(LinkableElement link) async { - if (!await launchUrl(Uri.parse(link.url))) { + if (!await launchUrl(Uri.parse(link.url), + mode: LaunchMode.externalApplication)) { throw Exception('Could not launch ${link.url}'); } } From 05c35c76ef979a1238e0d572dc8ea6fe31be43e9 Mon Sep 17 00:00:00 2001 From: czmatejt9 <105561491+czmatejt9@users.noreply.github.com> Date: Thu, 14 Sep 2023 10:56:28 +0200 Subject: [PATCH 3/7] Update home.dart Switched colors (green - break, red - lesson) of the dot next to the remaining time of lesson/break --- lib/home.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/home.dart b/lib/home.dart index bd465f9..712518e 100644 --- a/lib/home.dart +++ b/lib/home.dart @@ -434,8 +434,8 @@ class HomePageState extends State { Icons.circle, color: Color.fromARGB( 255, - _lessonStatus.hasLesson ? 0 : 255, _lessonStatus.hasLesson ? 255 : 0, + _lessonStatus.hasLesson ? 0 : 255, 0), size: 8, ), From 5812c34700ad8f70ae8767292b4d034a273e8599 Mon Sep 17 00:00:00 2001 From: vyPal Date: Thu, 14 Sep 2023 18:35:56 +0200 Subject: [PATCH 4/7] Commented out automatic day seitching in timetable --- lib/timetable.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/timetable.dart b/lib/timetable.dart index 12c4deb..d231d8f 100644 --- a/lib/timetable.dart +++ b/lib/timetable.dart @@ -262,6 +262,7 @@ class TimeTableClass { Widget getTimeTable(TimeTableData tt, int daydiff, Function(int) modifyDayDiff, AppLocalizations? local, bool userInteracted, BuildContext context) { List rows = []; + /* if (daydiff == 0 && tt.classes.isNotEmpty) { String endTime = tt.classes.last.endTime; DateTime now = DateTime.now(); @@ -271,6 +272,7 @@ Widget getTimeTable(TimeTableData tt, int daydiff, Function(int) modifyDayDiff, modifyDayDiff(1); } } + */ for (TimeTableClass ttclass in tt.classes) { List extrasRow = []; if (ttclass.data['curriculum'] != null) { From cb67ceb7bf953fb5ce7561db1b92dbe31f5abb40 Mon Sep 17 00:00:00 2001 From: vyPal Date: Fri, 15 Sep 2023 08:13:16 +0200 Subject: [PATCH 5/7] Fix tests failing --- integration_test/app_test.dart | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/integration_test/app_test.dart b/integration_test/app_test.dart index 48b587c..f20307a 100644 --- a/integration_test/app_test.dart +++ b/integration_test/app_test.dart @@ -18,10 +18,8 @@ void main() { testWidgets('Run app and login', (tester) async { await prep(tester, username, password, name); - - SharedPreferences prefs = await SharedPreferences.getInstance(); - expect(prefs.get("email"), equals(username)); - expect(prefs.get("password"), equals(password)); + expect(find.text(name, skipOffstage: false), findsWidgets); + expect(find.text("Username"), findsNothing); }); testWidgets('Test TimeTable page', (tester) async { @@ -29,7 +27,7 @@ void main() { await tester.tap(find.byType(NavigationDestination).at(1)); await pumpUntilFound(tester, find.textContaining("Today")); - expect(find.textContaining("Today"), findsOneWidget); + expect(find.textContaining("TODAY"), findsOneWidget); }); testWidgets('Test TimeTable page scroll', (tester) async { @@ -37,11 +35,11 @@ void main() { await tester.tap(find.byType(NavigationDestination).at(1)); await pumpUntilFound(tester, find.textContaining("Today")); - expect(find.textContaining("Today"), findsOneWidget); + expect(find.textContaining("TODAY"), findsOneWidget); await tester.tap(find.byKey(const Key("TimeTableScrollForward"))); await pumpUntilFound(tester, find.textContaining("Tomorrow")); - //expect(find.textContaining("Tomorrow"), findsOneWidget); + expect(find.textContaining("TOMORROW"), findsOneWidget); }); }); } @@ -60,5 +58,5 @@ Future prep( await tester.tap(find.byType(ElevatedButton)); await pumpUntilFound(tester, find.text(name)); - await tester.pump(const Duration(seconds: 5)); + await tester.pump(const Duration(seconds: 1)); } From 8263fc23ce371dda59288acffe6bad9423255955 Mon Sep 17 00:00:00 2001 From: vyPal Date: Fri, 15 Sep 2023 08:18:08 +0200 Subject: [PATCH 6/7] Change template-arb-file --- l10n.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/l10n.yaml b/l10n.yaml index dbe437e..4e6692e 100644 --- a/l10n.yaml +++ b/l10n.yaml @@ -1,3 +1,3 @@ arb-dir: lib/l10n -template-arb-file: app_cs.arb +template-arb-file: app_en.arb output-localization-file: app_localizations.dart \ No newline at end of file From 3b19e0f5adf70bd0b0db34eb86b46de458a82bb9 Mon Sep 17 00:00:00 2001 From: vyPal Date: Fri, 15 Sep 2023 08:31:25 +0200 Subject: [PATCH 7/7] Update test workflow --- .github/workflows/test-coverage.yml | 2 ++ integration_test/app_test.dart | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-coverage.yml b/.github/workflows/test-coverage.yml index 6461af7..869c6d3 100644 --- a/.github/workflows/test-coverage.yml +++ b/.github/workflows/test-coverage.yml @@ -29,6 +29,8 @@ jobs: l10n.yaml lib android + test + integration_test build: runs-on: macos-latest needs: check_changes diff --git a/integration_test/app_test.dart b/integration_test/app_test.dart index f20307a..e173c32 100644 --- a/integration_test/app_test.dart +++ b/integration_test/app_test.dart @@ -18,7 +18,6 @@ void main() { testWidgets('Run app and login', (tester) async { await prep(tester, username, password, name); - expect(find.text(name, skipOffstage: false), findsWidgets); expect(find.text("Username"), findsNothing); });