Skip to content
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
merged 2 commits into from May 20, 2014
Merged

Adds unit tests for machine column and machine tokens #330

merged 2 commits into from May 20, 2014

Conversation

jcsackett
Copy link
Contributor

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.

@jujugui
Copy link
Contributor

jujugui commented May 20, 2014

Test PASSed.
Refer to this link for build results: http://ci.jujugui.org:8080/job/juju-gui/1042/

@jujugui
Copy link
Contributor

jujugui commented May 20, 2014

Test PASSed.
Refer to this link for build results: http://ci.jujugui.org:8080/job/juju-gui/1043/

@jujugui
Copy link
Contributor

jujugui commented May 20, 2014

Test PASSed.
Refer to this link for build results: http://ci.jujugui.org:8080/job/juju-gui/1046/

@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

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

TO (big o)

@mitechie
Copy link
Contributor

👍 with just a couple of notes. Thanks for the new tests.

@jcsackett
Copy link
Contributor Author

Thanks, Rick, I've addressed your comments. :shipit:

@jujugui
Copy link
Contributor

jujugui commented May 20, 2014

Status: merge request accepted. Url: http://ci.jujugui.org:8080/job/juju-gui-merge

@jujugui
Copy link
Contributor

jujugui commented May 20, 2014

Test FAILed.
Refer to this link for build results: http://ci.jujugui.org:8080/job/juju-gui/1047/

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.
@jujugui jujugui merged commit 1417c1f into juju:develop May 20, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants