diff options
Diffstat (limited to 'qa/qa/page/project/web_ide/edit.rb')
-rw-r--r-- | qa/qa/page/project/web_ide/edit.rb | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/qa/qa/page/project/web_ide/edit.rb b/qa/qa/page/project/web_ide/edit.rb index fd68ac0de16..78b2db7d723 100644 --- a/qa/qa/page/project/web_ide/edit.rb +++ b/qa/qa/page/project/web_ide/edit.rb @@ -18,8 +18,8 @@ module QA end view 'app/assets/javascripts/ide/components/ide_tree.vue' do - element :new_file_button - element :new_directory_button + element :new_file_button, required: true + element :new_directory_button, required: true end view 'app/assets/javascripts/ide/components/ide_tree_list.vue' do @@ -36,7 +36,7 @@ module QA end view 'app/assets/javascripts/ide/components/commit_sidebar/actions.vue' do - element :commit_to_current_branch_radio + element :commit_to_current_branch_radio_container end view 'app/assets/javascripts/ide/components/commit_sidebar/form.vue' do @@ -44,6 +44,10 @@ module QA element :commit_button end + view 'app/assets/javascripts/ide/components/commit_sidebar/radio_group.vue' do + element :commit_type_radio + end + view 'app/assets/javascripts/ide/components/repo_editor.vue' do element :editor_container end @@ -216,7 +220,9 @@ module QA # animation is still in process even when the buttons have the # expected visibility. commit_success = retry_until(sleep_interval: 5) do - click_element(:commit_to_current_branch_radio) if has_element?(:commit_to_current_branch_radio) + within_element(:commit_to_current_branch_radio_container) do + choose_element(:commit_type_radio) + end click_element(:commit_button) if has_element?(:commit_button) # If this is the first commit, the commit SHA only appears after reloading @@ -299,10 +305,30 @@ module QA def switch_to_commit_tab click_element(:commit_mode_tab) end + + def select_file(file_name) + # wait for the list of files to load + wait_until(reload: true) do + has_element?(:file_name_content, file_name: file_name) + end + click_element(:file_name_content, file_name: file_name) + end + + def link_line(line_number) + previous_url = page.current_url + wait_for_animated_element(:editor_container) + within_element(:editor_container) do + find('.line-numbers', text: line_number).hover.click + end + wait_until(max_duration: 5, reload: false) do + page.current_url != previous_url + end + page.current_url.to_s + end end end end end end -QA::Page::Project::WebIDE::Edit.prepend_if_ee('QA::EE::Page::Component::WebIDE::WebTerminalPanel') +QA::Page::Project::WebIDE::Edit.prepend_mod_with('Page::Component::WebIDE::WebTerminalPanel', namespace: QA) |