diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-13 18:10:17 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-13 18:10:17 +0300 |
commit | effc12bf9dac4bf1e48f1397c25e0381ac1bd76f (patch) | |
tree | e2ff447fff4e156a94b684df6edddc108a767365 /spec/support | |
parent | c3eeb6a8d6a4b11f0bc5e5eb1ed43b0726f1ea26 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/helpers/features/blob_spec_helpers.rb | 10 | ||||
-rw-r--r-- | spec/support/helpers/features/web_ide_spec_helpers.rb | 7 |
2 files changed, 11 insertions, 6 deletions
diff --git a/spec/support/helpers/features/blob_spec_helpers.rb b/spec/support/helpers/features/blob_spec_helpers.rb index 8254e1d76bd..91969107a17 100644 --- a/spec/support/helpers/features/blob_spec_helpers.rb +++ b/spec/support/helpers/features/blob_spec_helpers.rb @@ -5,12 +5,14 @@ module Features module BlobSpecHelpers include ActionView::Helpers::JavaScriptHelper - def set_default_button(type) - evaluate_script("localStorage.setItem('gl-web-ide-button-selected', '#{type}')") + def edit_in_single_file_editor + click_button 'Edit' + click_link_or_button 'Edit single file' end - def unset_default_button - set_default_button('') + def edit_in_web_ide + click_button 'Edit' + click_link_or_button 'Web IDE' end end end diff --git a/spec/support/helpers/features/web_ide_spec_helpers.rb b/spec/support/helpers/features/web_ide_spec_helpers.rb index c51116b55b2..32b27864e0b 100644 --- a/spec/support/helpers/features/web_ide_spec_helpers.rb +++ b/spec/support/helpers/features/web_ide_spec_helpers.rb @@ -12,6 +12,7 @@ module Features module WebIdeSpecHelpers include Features::SourceEditorSpecHelpers + include Features::BlobSpecHelpers # Open the IDE from anywhere by first visiting the given project's page def ide_visit(project) @@ -21,8 +22,10 @@ module Features end # Open the IDE from the current page by clicking the Web IDE link - def ide_visit_from_link(link_sel = 'Web IDE') - new_tab = window_opened_by { click_link(link_sel) } + def ide_visit_from_link + new_tab = window_opened_by do + edit_in_web_ide + end switch_to_window new_tab end |