Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Do not re-render MV if already exists. #352

Merged
merged 1 commit into from May 30, 2014
Merged

Conversation

kadams54
Copy link
Contributor

QA

  1. Switch to machine view.
  2. Use the inspector to view bundle details for a bundle and then click on the button in the details panel to deploy it.
  3. You should only see one copy of each machine show up in the machines column. One machine 0, one machine 1. Not three of each.

Do some other playing around, switching between the canvas and MV (i.e., destroying MV, recreating it), etc. Make sure everything looks good.

@jujugui
Copy link
Contributor

jujugui commented May 29, 2014

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

@jujugui
Copy link
Contributor

jujugui commented May 29, 2014

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

@@ -507,8 +507,15 @@ with this program. If not, see <http://www.gnu.org/licenses/>.

it('emptySectionB', function() {
stubMethods(app);
var destroyMethod = app.machineViewPanel.destroy,
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use the stubbing methods for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not really sure how I'm to use the stubbed destroy method… Since emptySectionB now nulls out the machineViewPanel object, we lose the ability to check callCount() or anything else on the stubbed destroy. I copied the approach used in the emptySectionA test to work around this issue.

Copy link
Contributor

Choose a reason for hiding this comment

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

That's a good point, can you add a comment to that effect into the code.

Just FYI: The issue with this technique is that if the destroy method never gets called then it never gets re-assigned and we have had issues in the past where this type of technique caused hard to debug cascading failures.

@hatched
Copy link
Contributor

hatched commented May 29, 2014

👍 After the test is converted to use the stubbing methods.
QA OK
Thanks for this fix

@kadams54
Copy link
Contributor Author

Clarifying comment added. Thanks for the review and QA! :shipit:

@jujugui
Copy link
Contributor

jujugui commented May 30, 2014

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

@jujugui
Copy link
Contributor

jujugui commented May 30, 2014

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

jujugui added a commit that referenced this pull request May 30, 2014
### QA

1. Switch to machine view.
2. Use the inspector to view bundle details for a bundle and then click on the button in the details panel to deploy it.
3. You should only see one copy of each machine show up in the machines column. One machine 0, one machine 1. Not three of each.

Do some other playing around, switching between the canvas and MV (i.e., destroying MV, recreating it), etc. Make sure everything looks good.
@jujugui jujugui merged commit fa895d5 into juju:develop May 30, 2014
@kadams54 kadams54 deleted the only-one-mv branch May 30, 2014 20:07
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