summaryrefslogtreecommitdiff
path: root/spec/support/helpers/features/web_ide_spec_helpers.rb
diff options
context:
space:
mode:
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