tests: functional: Fix setting domain name with active notifications

Looking for .btn-primary could yield two results when a notification is active
with an action button of type primary. This results in form not getting
submitted properly and test failing with wait timeout. Fix this by making the
lookup for submit button more specific.

Tests:

- Run matrix-synapse functional tests on a fresh container.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2022-01-12 22:23:40 -08:00 committed by James Valleroy
parent 01e2896724
commit ec3236d89c
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -407,7 +407,7 @@ def app_can_be_disabled(browser, app_name):
def set_domain_name(browser, domain_name):
nav_to_module(browser, 'config')
browser.find_by_id('id_domainname').fill(domain_name)
update_setup = browser.find_by_css('.btn-primary')
update_setup = browser.find_by_css('.btn-primary[type="submit"]')
submit(browser, element=update_setup)