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

MVP: Refactoring and Improvements #71

Open
7 of 8 tasks
brunocribeiro opened this issue Oct 18, 2023 · 0 comments
Open
7 of 8 tasks

MVP: Refactoring and Improvements #71

brunocribeiro opened this issue Oct 18, 2023 · 0 comments
Labels
epic Top level issue

Comments

@brunocribeiro
Copy link
Contributor

brunocribeiro commented Oct 18, 2023

Goal: ...

Value: ...

Deliverables:

  • Have test suites for every component of the solution
  • Support other filters in the plugin (time window, team/group)
@brunocribeiro brunocribeiro added the epic Top level issue label Oct 18, 2023
@brunocribeiro brunocribeiro moved this to Todo in opendora Oct 18, 2023
@kylejwatson kylejwatson moved this from Todo to In Progress in opendora Oct 30, 2023
kylejwatson added a commit that referenced this issue Nov 16, 2023
Add msw to mock backend and avoid mocking the service.
Simplify some test cases by checking for only the needed elements.
Add error handling to the data service.

Addresses #71
kylejwatson added a commit that referenced this issue Nov 16, 2023
Use msw to add group data service tests and remove the ignore comment.a

Addresses #71
kylejwatson added a commit that referenced this issue Nov 16, 2023
Move test setup files out of source folder to avoid needing dependencies instead of dev dependencies
when compiling typescript.

Addresses #71
kylejwatson added a commit that referenced this issue Nov 16, 2023
Downgrade msw to be inline with backstage setup and make it work with the tsconfig.

Addresses #71
kylejwatson added a commit that referenced this issue Nov 16, 2023
Add reusable consts for testing urls to mock with msw and supply in mock config

Addresses #71
kylejwatson added a commit that referenced this issue Nov 16, 2023
Extract out error/response logic from component to a reusable hook
to avoid complicated state in the component.
Use a context to provide metric details for the request to avoid prop drilling.
Create a reusable component to reuse logic for switching between a graph, loading bar or error.

Addresses #71
kylejwatson added a commit that referenced this issue Nov 16, 2023
Changes address to Addresses for correct grammar in PR template.
Changes Fixes to Addresses in git message as most commits won't fix the issue but
be part of a bunch of commits that fix the issue.

Addresses #71
kylejwatson added a commit that referenced this issue Nov 20, 2023
Changes address to Addresses for correct grammar in PR template.
Changes Fixes to Addresses in git message as most commits won't fix the issue but
be part of a bunch of commits that fix the issue.

Addresses #71
kylejwatson added a commit that referenced this issue Nov 20, 2023
So that we can check for the exact decimal used from the response.
Should help make the test a bit clearer.

Addresses #71
kylejwatson added a commit that referenced this issue Nov 20, 2023
* test(backstage-plugin): Add msw and refactor tests

Add msw to mock backend and avoid mocking the service.
Simplify some test cases by checking for only the needed elements.
Add error handling to the data service.

Addresses #71

* test(backstage-plugin): Add data service tests

Use msw to add group data service tests and remove the ignore comment.a

Addresses #71

* test(backstage-plugin): Fix linting test files

Move test setup files out of source folder to avoid needing dependencies instead of dev dependencies
when compiling typescript.

Addresses #71

* test(backstage-plugin): Downgrade msw

Downgrade msw to be inline with backstage setup and make it work with the tsconfig.

Addresses #71

* test(backstage-plugin): Add consts for urls

Add reusable consts for testing urls to mock with msw and supply in mock config

Addresses #71

* test(backstage-plugin): Change value used in tests

So that we can check for the exact decimal used from the response.
Should help make the test a bit clearer.

Addresses #71
kylejwatson added a commit that referenced this issue Nov 20, 2023
Remove the comment about extracting the test for the hook. Tests should follow user usage.

Addresses #71
kylejwatson added a commit that referenced this issue Nov 27, 2023
Extract logic to download and show progress/error to a hook/separate component.

Remove unused error file.

Addresses #71
kylejwatson added a commit that referenced this issue Nov 27, 2023
Move benchmark hook to it's own file.
Rename overview to benchmark for consistency.

Addresses #71
kylejwatson added a commit that referenced this issue Nov 27, 2023
* refactor(backstage-plugin): Extract logic to hooks

Extract out error/response logic from component to a reusable hook
to avoid complicated state in the component.
Use a context to provide metric details for the request to avoid prop drilling.
Create a reusable component to reuse logic for switching between a graph, loading bar or error.

Addresses #71

* refactor(backstage-plugin): Remove comment for test

Remove the comment about extracting the test for the hook. Tests should follow user usage.

Addresses #71

* refactor(backstage-plugin): Extract overview to hook

Extract logic to download and show progress/error to a hook/separate component.

Remove unused error file.

Addresses #71

* refactor(backstage-plugin): Move hook to own file

Move benchmark hook to it's own file.
Rename overview to benchmark for consistency.

Addresses #71
kylejwatson added a commit that referenced this issue Nov 29, 2023
Reuse request logic in the data service.
Rename data service from GroupDataService to DoraDataService.
Reorganise tests to describe them better.
Rename test to describe what is being tested.

Addresses #71
@kylejwatson kylejwatson moved this from In Progress to Todo in opendora Dec 1, 2023
kylejwatson added a commit that referenced this issue Dec 4, 2023
Reuse request logic in the data service.
Rename data service from GroupDataService to DoraDataService.
Reorganise tests to describe them better.
Rename test to describe what is being tested.

Addresses #71
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Top level issue
Projects
Status: Todo
Development

No branches or pull requests

1 participant