summaryrefslogtreecommitdiff
path: root/spec/support/helpers/features/web_ide_spec_helpers.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-18 19:00:14 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-18 19:00:14 +0000
commit05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch)
tree11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /spec/support/helpers/features/web_ide_spec_helpers.rb
parentec73467c23693d0db63a797d10194da9e72a74af (diff)
downloadgitlab-ce-05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2.tar.gz
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'spec/support/helpers/features/web_ide_spec_helpers.rb')
-rw-r--r--spec/support/helpers/features/web_ide_spec_helpers.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/spec/support/helpers/features/web_ide_spec_helpers.rb b/spec/support/helpers/features/web_ide_spec_helpers.rb
index 551749a43de..4793c9479fe 100644
--- a/spec/support/helpers/features/web_ide_spec_helpers.rb
+++ b/spec/support/helpers/features/web_ide_spec_helpers.rb
@@ -13,14 +13,18 @@
module WebIdeSpecHelpers
include Spec::Support::Helpers::Features::SourceEditorSpecHelpers
+ # Open the IDE from anywhere by first visiting the given project's page
def ide_visit(project)
visit project_path(project)
- wait_for_requests
+ ide_visit_from_link
+ end
- click_link('Web IDE')
+ # 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) }
- wait_for_requests
+ switch_to_window new_tab
end
def ide_tree_body