Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Unit Tests for Reports Feature #18

Merged
merged 3 commits into from
Dec 29, 2023
Merged

Conversation

sweep-ai[bot]
Copy link
Contributor

@sweep-ai sweep-ai bot commented Dec 29, 2023

PR Feedback (click)

  • 👍 Sweep Did Well
  • 👎 Sweep Needs Improvement

I created this PR to address this rule:

"All new business logic should have corresponding unit tests."

Description

This PR adds unit tests for the new business logic in the 'reports' feature of the application. The tests cover all the important functionality and edge cases in the 'edit_report_screen.dart', 'report_list_screen.dart', and 'routes.dart' files located in the 'lib/screens/reports/' directory.

Summary of Changes

  • Created a new file 'edit_report_screen_test.dart' in the 'test/screens/reports/' directory. This file contains unit tests for the '_loadViolation', '_pickMedia', '_removeMedia', and '_submitReport' functions in 'edit_report_screen.dart'.
  • Created a new file 'report_list_screen_test.dart' in the 'test/screens/reports/' directory. This file contains unit tests for the '_fetchReports' function and the list display logic in 'report_list_screen.dart'.
  • Created a new file 'routes_test.dart' in the 'test/screens/reports/' directory. This file contains unit tests for the different routes defined in 'routes.dart'.

All tests have been run locally to ensure they pass.

Copy link
Contributor Author

sweep-ai bot commented Dec 29, 2023

Rollback Files For Sweep

  • Rollback changes to test/screens/reports/edit_report_screen_test.dart
  • Rollback changes to test/screens/reports/report_list_screen_test.dart
  • Rollback changes to test/screens/reports/routes_test.dart

@sweep-ai sweep-ai bot added the sweep label Dec 29, 2023
Copy link
Contributor Author

sweep-ai bot commented Dec 29, 2023

Sandbox Executions

Copy link

codeautopilot bot commented Dec 29, 2023

Your organization has reached the subscribed usage limit. You can upgrade your plan at https://www.codeautopilot.com/#pricing

Disclaimer: This comment was entirely generated using AI. Be aware that the information provided may be incorrect.

Current plan usage: 100.24%

Have feedback or need help?
Discord
Documentation
support@codeautopilot.com

Copy link
Contributor Author

sweep-ai bot commented Dec 29, 2023

Sweeping

Fixing PR: track the progress here.

I'm currently fixing this PR to address the following:

[Sweep GHA Fix] The GitHub Actions run failed with the following error logs:

The command:
Run flutter pub get
yielded the following error:
##[error]Process completed with exit code 127.

Here are the logs:
/home/runner/work/_temp/ecdfc97c-93e5-41de-a5ae-c4d38dd2de57.sh: line 1: flutter: command not found

@yihong1120 yihong1120 merged commit 3ebc6c0 into main Dec 29, 2023
2 of 3 checks passed
@yihong1120 yihong1120 deleted the sweep/add-reports-feature-tests branch December 29, 2023 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant