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

Resolved test error and added in actions #437

Merged
merged 1 commit into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
resolved test error and added in actions
  • Loading branch information
Uttkarsh-raj committed Aug 17, 2024
commit 35c0968707273ca98ddc76967ac8c918bf47ef0b
1 change: 1 addition & 0 deletions .github/workflows/build-flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
architecture: x64
- run: flutter pub get
- run: flutter analyze
- run: flutter test
- run: flutter build apk

# Upload APK as a build artifact
Expand Down
11 changes: 6 additions & 5 deletions test/unit_tests/issue_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ void main() {
currentUser = guestUser;
});
group("Issue Api's Test", () {
test('getAllIssues returns correct data', () async {
test('Get All Issues Success', () async {
final paginatedUrl = 'https://www.bugheist.com/api/v1/issues/';
final dynamic mockResponse = {
"count": 244,
Expand All @@ -32,17 +32,18 @@ void main() {
"modified": "2024-03-29T03:42:55.120275Z",
"is_hidden": false,
"rewarded": 0,
"reporter_ip_address": "24.90.6.174",
"reporter_ip_address": "2603:7000:8c00:972a:d827:a994:2048:c8c6",
"cve_id": null,
"cve_score": null,
"hunt": null,
"domain": 3,
"closed_by": null,
"team_members": [],
"upvotes": 0,
"tags": [],
"flagged": false,
"flags": 0,
"upvotes": 0,
"upvotted": false,
"flagged": false,
"screenshots": [
"https://storage.googleapis.com/bhfiles/screenshots/pasted-ima0265cdff-894d-48ff-ab07-4ad962.png"
]
Expand All @@ -64,7 +65,7 @@ void main() {
expect(result?.issueList?[0].screenshotsLink?.length, 1);
});

test('getAllIssues handles errors gracefully', () async {
test('Get All Issues Error', () async {
final paginatedUrl = 'https://www.bugheist.com/issues';
final client = MockClient((request) async {
// Create sample response of the HTTP call //
Expand Down
Loading