details: Pin network-model label directly to combo to simplify tests

This approach is used in majority of other places and allows the
combobox items to be selected directly instead of typing text in tests.

Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
This commit is contained in:
Povilas Kanapickas 2018-09-02 01:23:33 +03:00 committed by Cole Robinson
parent c81d722a19
commit bf823fdb3c
2 changed files with 5 additions and 4 deletions

View File

@ -201,10 +201,11 @@ class Details(uiutils.UITestCase):
# Network values
tab = self._select_hw(win, "NIC :54:32:10", "network-tab")
src = tab.find(None, "combo box", "Network source:")
tab.find("Device model:", "text").text = "rtl8139"
src = tab.find("Network source:", "combo box")
src.click()
tab.find_fuzzy("macvtap", "menu item").click()
tab.find("Device model:", "combo box").click_combo_entry()
tab.find("rtl8139", "menu item").click()
mode = tab.find_fuzzy("Source mode:", "combo box")
mode.click_combo_entry()
self.assertTrue(mode.find("Bridge", "menu item").selected)

View File

@ -3971,7 +3971,7 @@
<property name="halign">end</property>
<property name="label" translatable="yes">Device mode_l:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">network-model-combobox</property>
<property name="mnemonic_widget">network-model</property>
</object>
<packing>
<property name="left_attach">0</property>
@ -4000,7 +4000,7 @@
<property name="has_entry">True</property>
<signal name="changed" handler="on_network_model_combo_changed" swapped="no"/>
<child internal-child="entry">
<object class="GtkEntry" id="network-model-combobox">
<object class="GtkEntry" id="network-model-entry">
<property name="can_focus">True</property>
</object>
</child>