This repository has been archived by the owner on May 12, 2021. It is now read-only.
Adds unit tests for machine column and machine tokens #330
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Test PASSed. |
Test PASSed. |
Test PASSed. |
@@ -108,6 +108,88 @@ describe('machine view panel view', function() { | |||
'container').one('.label').get('text'), label); | |||
}); | |||
|
|||
describe('_smartUpdateList', function() { | |||
// _smartUpdateList use two private methods, _addNewTOkens and |
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.
TO (big o)
👍 with just a couple of notes. Thanks for the new tests. |
Thanks, Rick, I've addressed your comments. |
Status: merge request accepted. Url: http://ci.jujugui.org:8080/job/juju-gui-merge |
Test FAILed. |
jujugui
added a commit
that referenced
this pull request
May 20, 2014
app/widgets/machine-panel-view.js * ```_smartUpdateList``` has been refactored, moving its two responsibilities-- adding and removing tokens as necessary--into two methods. These methods are easier to test, and a bit clearer to read. tests/test_machine_view_panel_view.js * Unit tests for all inputs and all expected behavior of the components of _smartUpdateList have been added. * Unit tests for _updateMachine and _renderMachineToken have been added Note to reviewers: machine tokens are also tested in their own file, which has not been updated. Additionally, invisible in the diff, but available in the full file, machine column has quite extensive functional testing; I've only added units to more directly tests private methods that were only implicitly tested.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
app/widgets/machine-panel-view.js
_smartUpdateList
has been refactored, moving its two responsibilities--adding and removing tokens as necessary--into two methods. These methods are
easier to test, and a bit clearer to read.
tests/test_machine_view_panel_view.js
_smartUpdateList have been added.
Note to reviewers: machine tokens are also tested in their own file, which has
not been updated. Additionally, invisible in the diff, but available in the
full file, machine column has quite extensive functional testing; I've only
added units to more directly tests private methods that were only implicitly
tested.