Skip to content
Snippets Groups Projects
Verified Commit 8ebd4e48 authored by Maarten de Waard's avatar Maarten de Waard :angel:
Browse files

implement a step that only closes the first run wizard if it exists

parent 454fe684
No related branches found
No related tags found
No related merge requests found
......@@ -20,9 +20,8 @@ Scenario: Login to nextcloud
And I expect that cookie "nc_username" exists
Scenario: Close welcome to nextcloud modal
Given the element "#firstrunwizard" is visible
When I click on the element "a.close.icon-close"
Then I wait on element "#firstrunwizard" for 1000ms to not be visible
When I close the nextcloud welcome wizard if it exists
Then I wait on element "#firstrunwizard" for 500ms to not exist
Scenario: Create a new document in OnlyOffice
When I click on the element ".actions a.button.new"
......
......@@ -41,3 +41,10 @@ def step_impl(context, element):
context.execute_steps(
'When I add "{}" to the inputfield "{}"'.format(
random_string, element))
@when(u'I close the nextcloud welcome wizard if it exists')
def step_impl(context):
"""Checks if the #firstrunwizard element exists and closes it if so"""
if context.behave_driver.element_exists("#firstrunwizard"):
context.execute_steps(
'When I click on the element "a.close.icon-close"')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment