diff --git a/test/features/steps/steps.py b/test/features/steps/steps.py index ff61141..f9c41dc 100644 --- a/test/features/steps/steps.py +++ b/test/features/steps/steps.py @@ -69,10 +69,11 @@ def log_in_directly(context): :return: """ - assert context.persona, "A persona is required to log in, found [{}] in context. Have you configured the personas in before_scenario?".format(context.persona) + assert context.persona, "A persona is required to log in, found [{}] in context." \ + " Have you configured the personas in before_scenario?".format(context.persona) context.execute_steps(u""" When I attempt to log in with password "$password" - Then I should see an element with xpath "//*[@title='Log out']/i[contains(@class, 'fa-sign-out')]" + Then I should see an element with xpath "//*[@title='Log out' or @data-bs-title='Log out']/i[contains(@class, 'fa-sign-out')]" """) @@ -161,7 +162,8 @@ def go_to_new_resource_form(context, name): """) else: # Existing dataset, browse to the resource form - if context.browser.is_element_present_by_xpath("//a[contains(string(), 'Resources') and contains(@href, '/dataset/resources/')]"): + if context.browser.is_element_present_by_xpath( + "//a[contains(string(), 'Resources') and contains(@href, '/dataset/resources/')]"): context.execute_steps(u""" When I press "Resources" """) @@ -254,7 +256,7 @@ def fill_in_default_link_resource_fields(context): @when(u'I upload "{file_name}" of type "{file_format}" to resource') def upload_file_to_resource(context, file_name, file_format): context.execute_steps(u""" - When I execute the script "$('#resource-upload-button').trigger(click);" + When I execute the script "$('#resource-upload-button').trigger('click');" And I attach the file "{file_name}" to "upload" # Don't quote the injected string since it can have trailing spaces And I execute the script "document.getElementById('field-format').value='{file_format}'" @@ -476,7 +478,7 @@ def go_to_admin_config(context): @when(u'I log out') def log_out(context): context.execute_steps(u""" - When I press the element with xpath "//*[@title='Log out']" + When I press the element with xpath "//*[@title='Log out' or @data-bs-title='Log out']" Then I should see "Log in" """)