From b179a264420909bdeddec96799a9be7401a22dea Mon Sep 17 00:00:00 2001 From: Yelaman Yelmuratov Date: Sat, 18 May 2024 21:19:31 +0500 Subject: [PATCH] . r changed diff tools path to snap --- form.docx | 1 + lib/src/reporters/diff_tool/diff_tools.dart | 7 ++-- test/groups/diff_tools_tests.dart | 12 ++++-- test/groups/exception_tests.dart | 3 +- test/groups/minor_tests.dart | 41 +++++++++++++++++---- 5 files changed, 48 insertions(+), 16 deletions(-) create mode 100644 form.docx diff --git a/form.docx b/form.docx new file mode 100644 index 0000000..f08e3cf --- /dev/null +++ b/form.docx @@ -0,0 +1 @@ +
Parent
What is your highest level of education?
*
Research Questions

How familiar are you with LMS technology?
*
Have you used an LMS application before?
*
If yes, how would you rate your experience?
*
What features do you think are most important in an LMS application?
*
Обязательный вопрос
Would you prefer a cross-platform LMS application that can be used on multiple devices?
*
How important is ease of use in an LMS application?
*
How important is the speed/performance of the LMS application?
*
Would you like the LMS application to have a feature for real-time communication between teachers and students?
*
Should the LMS application include features for assignment submission and grading?
*
Would you find it helpful if the LMS application could track student attendance?
*
Should the LMS application include a calendar for tracking important dates and deadlines?
*
Would you like the LMS application to include a resource library for study materials?
*
How important is data security in an LMS application?
*
Would you like the LMS application to include a feature for parental access?
*
Should the LMS application provide personalized learning resources based on individual student needs?
*
How important is it for the LMS application to be accessible to people with disabilities?
*
Would you like the LMS application to include gamification features to make learning more engaging?
*
Should the LMS application include features for monitoring student progress?
*
Would you be willing to pay for additional features in the LMS application?
*
How often would you use the LMS application?
*
Would you recommend the LMS application to others?
*
What improvements would you suggest for the LMS application?
*
Обязательный вопрос
How satisfied are you with the current educational system?
*
Do you believe an LMS application could help modernize the current educational system?
*
What challenges do you foresee in implementing an LMS application in schools?
*
How would you rate the overall user experience of the LMS application?
*
Отправить
Очистить форму
\ No newline at end of file diff --git a/lib/src/reporters/diff_tool/diff_tools.dart b/lib/src/reporters/diff_tool/diff_tools.dart index 1f7c929..189c591 100644 --- a/lib/src/reporters/diff_tool/diff_tools.dart +++ b/lib/src/reporters/diff_tool/diff_tools.dart @@ -3,8 +3,7 @@ part of '../../../../approval_tests.dart'; /// `MacDiffTools` contains diff tools available on macOS. final class MacDiffTools { static const DiffInfo visualStudioCode = DiffInfo( - command: - '/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code', + command: '/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code', arg: '-d', ); @@ -32,13 +31,13 @@ final class WindowsDiffTools { final class LinuxDiffTools { // TODO: check correct path for Visual Studio Code on Linux static const DiffInfo visualStudioCode = DiffInfo( - command: '/usr/bin/code', + command: '/snap/bin/code', arg: '-d', ); // TODO: check correct path for Android Studio on Linux static const DiffInfo androidStudio = DiffInfo( - command: '/usr/bin/studio', + command: '/snap/bin/studio', arg: 'diff', ); } diff --git a/test/groups/diff_tools_tests.dart b/test/groups/diff_tools_tests.dart index 5647752..647a39f 100644 --- a/test/groups/diff_tools_tests.dart +++ b/test/groups/diff_tools_tests.dart @@ -17,8 +17,10 @@ void diffToolsTests({ ); // Setup: paths to existent files - const existentApprovedPath = 'test/approved_files/approval_test.verify.approved.txt'; - const existentReceivedPath = 'test/approved_files/approval_test.verify.received.txt'; + const existentApprovedPath = + 'test/approved_files/approval_test.verify.approved.txt'; + const existentReceivedPath = + 'test/approved_files/approval_test.verify.received.txt'; // Expect an exception to be thrown expect( @@ -41,8 +43,10 @@ void diffToolsTests({ ); // Setup: paths to existent files - const existentApprovedPath = 'test/approved_files/approval_test.verify.approved.txt'; - const existentReceivedPath = 'test/approved_files/approval_test.verify.received.txt'; + const existentApprovedPath = + 'test/approved_files/approval_test.verify.approved.txt'; + const existentReceivedPath = + 'test/approved_files/approval_test.verify.received.txt'; // Expect an exception to be thrown expect( diff --git a/test/groups/exception_tests.dart b/test/groups/exception_tests.dart index aa2b084..48ff765 100644 --- a/test/groups/exception_tests.dart +++ b/test/groups/exception_tests.dart @@ -26,7 +26,8 @@ void exceptionTests({ ); }); - test("Method «verify» must throw DoesntMatchException with error handling", () { + test("Method «verify» must throw DoesntMatchException with error handling", + () { expect( () => helper.verify( 'Hello W0rld', diff --git a/test/groups/minor_tests.dart b/test/groups/minor_tests.dart index 5e3a4c8..1ba866c 100644 --- a/test/groups/minor_tests.dart +++ b/test/groups/minor_tests.dart @@ -10,7 +10,9 @@ void minorTests({ ApprovalLogger.log("$lines25 Group: Minor tests are starting $lines25"); }); - test('Simulate file not found error during comparison. Must throw PathNotFoundException.', () async { + test( + 'Simulate file not found error during comparison. Must throw PathNotFoundException.', + () async { const comparator = FileComparator(); // Setup: paths to non-existent files @@ -31,7 +33,9 @@ void minorTests({ ); }); - test('Simulate file not found error during comparison. Must throw IDEComparatorException.', () async { + test( + 'Simulate file not found error during comparison. Must throw IDEComparatorException.', + () async { const reporter = DiffReporter(); // Setup: paths to non-existent files @@ -68,15 +72,36 @@ void minorTests({ ); }); + test('verify string with Android Studio DiffReporter', () { + expect( + () => helper.verify( + 'Hello W0rld', + 'verify', + deleteReceivedFile: false, + reporter: const DiffReporter( + ide: ComparatorIDE.studio, + ), + ), + throwsA(isA()), + ); + + ApprovalLogger.success( + "Test Passed: Successfully handled a log mismatch. Method «verify» correctly throws DoesntMatchException as expected.", + ); + }); + // if (Platform.isLinux) { - test('Verify string with DiffReporter. Must throw IDEComparatorException.', () async { + test('Verify string with DiffReporter. Must throw IDEComparatorException.', + () async { const reporter = DiffReporter( customDiffInfo: LinuxDiffTools.visualStudioCode, ); // Setup: paths to non-existent files - const existentApprovedPath = 'test/approved_files/approval_test.verify.approved.txt'; - const existentReceivedPath = 'test/approved_files/approval_test.verify.received.txt'; + const existentApprovedPath = + 'test/approved_files/approval_test.verify.approved.txt'; + const existentReceivedPath = + 'test/approved_files/approval_test.verify.received.txt'; // Expect an exception to be thrown expect( @@ -126,7 +151,8 @@ void minorTests({ 'file:///path/to/file.dart:10:11\nother stack trace lines...', ); - const filePathExtractor = FilePathExtractor(stackTraceFetcher: fakeStackTraceFetcher); + const filePathExtractor = + FilePathExtractor(stackTraceFetcher: fakeStackTraceFetcher); final filePath = filePathExtractor.filePath; expect(filePath, '/path/to/file.dart'); @@ -140,7 +166,8 @@ void minorTests({ 'no file path in this stack trace\nother stack trace lines...', ); - const filePathExtractor = FilePathExtractor(stackTraceFetcher: fakeStackTraceFetcher); + const filePathExtractor = + FilePathExtractor(stackTraceFetcher: fakeStackTraceFetcher); expect( () => filePathExtractor.filePath,