def test(data): project_name = actions.random_str(prefix='project_') actions.click(index.create_project_button) actions.wait_for_element_displayed(index.project_name_input) actions.send_keys(index.project_name_input, project_name) actions.click(index.create_button) actions.wait_for_element_not_displayed(index.create_button) index.assert_project_exists(project_name.replace(' ', '_'))
def test_create_project_spaces_replaced_with_underscores(data): actions.navigate(data.env.url) project_name = actions.random_str(prefix='project ') actions.click(index.create_project_button) actions.wait_for_element_displayed(index.project_name_input) actions.send_keys(index.project_name_input, project_name) actions.click(index.create_button) actions.wait_for_element_not_displayed(index.create_button) assert index.project_is_present(project_name.replace(' ', '_'))
def test_create_project(data): actions.navigate(data.env.url) project_name = actions.random_str() actions.click(index.create_project_button) actions.wait_for_element_displayed(index.project_name_input) actions.send_keys(index.project_name_input, project_name) actions.click(index.create_button) actions.wait_for_element_not_displayed(index.create_button) assert index.project_is_present(project_name)
def test(data): actions.navigate(data.env.url+'dynamic-elements/?delay=3') button = '#button-two' actions.wait_for_element_not_displayed(button, timeout=5) golem_steps.assert_last_step_message('Wait for element #button-two to be not displayed') actions.verify_element_not_displayed(button) # time out waiting for element to be not displayed actions.navigate(data.env.url + 'dynamic-elements/?delay=5') msg = "Timeout waiting for element {} to be not displayed".format(button) with expected_exception(TimeoutException, msg): actions.wait_for_element_not_displayed(button, timeout=3)
def add_new_page(page_name): actions.click(new_page_button) prompt_input = element('#promptModal #promptModalInput') actions.send_keys(prompt_input, page_name) actions.click('#promptModal #prompSaveButton') actions.wait_for_element_not_displayed('#promptModal')