Skip to content

test: Refactor and tests Symbols command#25

Merged
miquelbeltran merged 6 commits intomainfrom
refactor-tests
Jun 18, 2025
Merged

test: Refactor and tests Symbols command#25
miquelbeltran merged 6 commits intomainfrom
refactor-tests

Conversation

@miquelbeltran
Copy link
Contributor

@miquelbeltran miquelbeltran commented Jun 18, 2025

test: Refactor and tests Symbols command

Description 📝

  • Purpose: Part of Implement tests #4 to increase the test coverage of the cli
  • Approach: Refactored the Symbols feature to enable testing. Created two test files with corresponding mocks. Includes generated coded.

Type of change

  • Tests

Updates

  • Added AGENT.md for coding assistants.
  • Refactored the Symbols command feature to enhance testability and structure.
  • Added symbols tests

Test plan 🧪

Tested commands, e.g.

$ dart bin/raygun_cli.dart symbols list

List of symbols:

Symbols File: app.android-arm64.symbols
Identifier: 2c7a3u3
App Version: 0.0.1

Symbols File: app.android-arm.symbols
Identifier: 2c7a7k6
App Version: 0.0.1

Author to check 👓

  • Project and all contained modules builds successfully
  • Self-/dev-tested
  • Unit/UI/Automation/Integration tests provided where applicable
  • Code is written to standards
  • Appropriate documentation written (code comments, internal docs)

Reviewer to check ✔️

  • Project and all contained modules builds successfully
  • Change has been dev-/reviewer-tested, where possible
  • Unit/UI/Automation/Integration tests provided where applicable
  • Code is written to standards
  • Appropriate documentation written (code comments, internal docs)

@miquelbeltran miquelbeltran marked this pull request as ready for review June 18, 2025 12:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the Symbols feature to improve testability and adds comprehensive unit tests for the symbols commands and API.

  • Extracts symbol commands into a SymbolsCommand class and removes legacy flutter_symbols_* files
  • Implements SymbolsApi with multipart builder and adds tests + mocks for upload, list, and delete operations
  • Updates pubspec.yaml to include Mockito and build_runner; adds AGENT.md documentation

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
lib/src/symbols/symbols_command.dart New SymbolsCommand class replaces old flow, with run and parser methods
lib/src/symbols/symbols_api.dart Consolidated Flutter symbols API into a class with multipart builder
lib/raygun_cli.dart Updated export to the new symbols_command.dart
test/symbols/ symbols_command_test.dart Unit tests for SymbolsCommand covering upload/list/delete
test/symbols/ symbols_api_test.dart Unit tests for SymbolsApi, with Mockito mocks
test/symbols/ *.mocks.dart Generated mock classes for API and HTTP client
pubspec.yaml Added mockito and build_runner to dev dependencies
AGENT.md New guide documenting build/test commands and architecture
Comments suppressed due to low confidence (1)

lib/src/core/raygun_command.dart:16

  • [nitpick] The abstract method buildParserSymbols is specific to symbols; consider renaming it to a generic buildParser to better support other command implementations.
  ArgParser buildParserSymbols();

Copy link
Contributor

@TheRealAgentK TheRealAgentK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@miquelbeltran miquelbeltran merged commit 92e03fc into main Jun 18, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants