mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
tests: functional: Fix setting first ethernet connection as internal
Tested that all samba tests pass in testing container. Also checked that connection type texts are not translated, thus safe to use in xpath search. Fixes #2333. Signed-off-by: Veiko Aasa <veiko17@disroot.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
e048e6814c
commit
485107604f
@ -555,7 +555,10 @@ def backup_restore(browser, app_name, archive_name=None):
|
||||
def networks_set_firewall_zone(browser, zone):
|
||||
""""Set the network device firewall zone as internal or external."""
|
||||
nav_to_module(browser, 'networks')
|
||||
# First active Ethernet connection
|
||||
device = browser.find_by_xpath(
|
||||
'//span[contains(@class, "connection-type-label") and '
|
||||
'contains(., "Ethernet") ]/../..'
|
||||
'//span[contains(@class, "badge-success") '
|
||||
'and contains(@class, "connection-status-label")]/following::a').first
|
||||
network_id = device['href'].split('/')[-3]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user