129
129
Traceback (most recent call last):
131
131
LookupError: label 'Keep branch confidential'
134
Branches stacked on private branches
135
------------------------------------
137
A public branch is private if it is stacked on a private branch. When the
138
branch is edited, it is shown as private but the checkbox widget is disabled
139
and the title and hint text is updated to inform the user.
141
>>> login('admin@canonical.com')
142
>>> stacked_on_branch = factory.makeAnyBranch(private=True)
143
>>> stacked_branch = factory.makeAnyBranch(stacked_on=stacked_on_branch)
144
>>> url = canonical_url(stacked_branch)
147
>>> admin_browser.open(url)
148
>>> admin_browser.getLink('Change branch details').click()
149
>>> privacy_checkbox = admin_browser.getControl('Branch is confidential')
150
>>> print privacy_checkbox.selected
152
>>> print privacy_checkbox.disabled
154
>>> ('branch is confidential because it is stacked on a private branch'
155
... in admin_browser.contents)
158
If the branch is edited and saved, there is no user message displayed since
159
the transitive privacy status hasn't changed.
161
>>> admin_browser.getControl('Description').value = "New changes"
162
>>> admin_browser.getControl('Change Branch').click()
163
>>> print_feedback_messages(browser.contents)