Conversation
|
Thanks for your PR, @davidlag0!
Could you write down your question in detail, please? Could not find figure out what is the problem with these lines. |
Yes, where should I click in the UI to be able to run the code on lines 96, 102 and 137? To run all the other code, for example, I simulate a logged in user and the click on the menu to show the "Log out" choice then click on it, etc. I haven't found how I'm able to use the UI to reach the code paths that would include lines 96, 102 and 137. If there's a way and you can tell me, I will simply write tests catered to these lines. If there is no way to have these lines executed by using the UI, often, it is a sign that refactoring is required, potentially to remove some code that cannot be reached. Thanks! |
|
This code path couldn't be reached now, as it should be used for internal pages that are currently absent: zero-ui/frontend/src/components/Bar/Bar.jsx Lines 45 to 49 in 8785b94 The current PR version looks good to me. |
Pull Request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Number: #135
What is the new behavior?
Does this introduce a breaking change?
Other information
Regarding Bar.jsx, I will need help understanding how lines 96, 102, and 137 should run. I was not able to find such cases so I could not build tests to cover these specific lines. Testing is mostly done from the perspective of the user and a bit more deeply for utility functions. If a code path in a frontend component cannot be reached, potential refactoring might be required.