-
Notifications
You must be signed in to change notification settings - Fork 29
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
Fix possibly cuttoff cli errors in tree views #4522
Conversation
@@ -61,6 +61,9 @@ export const getCliErrorTreeItem = ( | |||
command: RegisteredCommands.EXTENSION_SHOW_OUTPUT, | |||
title: 'Show DVC Output' | |||
} | |||
|
|||
treeItem.label = label |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the issue has something to do with the fact that we are creating a uri
with the error message in the tree item which expects a file path 🤔
@@ -406,12 +407,16 @@ describe('RepositoriesTree', () => { | |||
|
|||
expect(mockedTreeItem).toHaveBeenCalledTimes(1) | |||
expect(treeItem).toStrictEqual({ | |||
...mockedItem, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added tests for each tree that uses the cliError
tree item and adjusted the check to not use mockedItem
so we could confirm that label
is or is not there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simplified the solution and added tests!
Code Climate has analyzed commit 6c0c00b and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (85% is the threshold). This pull request will bring the total coverage in the repository to 95.2% (0.0% change). View more on Code Climate. |
Main
PR
Fixes #4519