Merge lp:~rvb/maas/bug-1413030 into lp:~maas-committers/maas/trunk
Proposed by
Raphaël Badin
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Raphaël Badin | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 3482 | ||||
Proposed branch: | lp:~rvb/maas/bug-1413030 | ||||
Merge into: | lp:~maas-committers/maas/trunk | ||||
Diff against target: |
75 lines (+55/-2) 2 files modified
src/maasserver/templates/maasserver/snippets.html (+8/-2) src/maasserver/views/tests/test_snippets.py (+47/-0) |
||||
To merge this branch: | bzr merge lp:~rvb/maas/bug-1413030 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gavin Panella (community) | Approve | ||
Review via email: mp+247113@code.launchpad.net |
Commit message
Also hide the labels when the fields themselves are hidden in the add_node HTML snippet.
Description of the change
The testing for this isn't pretty, I'll admit to that; this is kind of an emergency fix. As part of the current JS-rework, I think we should re-think the usage of snippets.html.
Now, instead of hiding the fields and the label, maybe we should investigate now displaying them at all but the change will be bigger and this is an emergency fix before releasing rc3.
To post a comment you must log in.
+ self.assertEqual( series_ class])
+ ['hidden', 'hidden'],
+ [os_system_class, distro_
Do this in two assertions, something like:
Better still, express what you're trying to test:
get_class = lambda node: node.attrib[ 'class' ]
node_is_ hidden = AfterPreprocess ing(get_ class, Equals('hidden'))
Or even: