summaryrefslogtreecommitdiff
path: root/spec/support/helpers/features
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/helpers/features')
-rw-r--r--spec/support/helpers/features/admin_users_helpers.rb25
-rw-r--r--spec/support/helpers/features/invite_members_modal_helper.rb2
-rw-r--r--spec/support/helpers/features/snippet_helpers.rb11
-rw-r--r--spec/support/helpers/features/source_editor_spec_helpers.rb (renamed from spec/support/helpers/features/editor_lite_spec_helpers.rb)4
-rw-r--r--spec/support/helpers/features/top_nav_spec_helpers.rb2
5 files changed, 36 insertions, 8 deletions
diff --git a/spec/support/helpers/features/admin_users_helpers.rb b/spec/support/helpers/features/admin_users_helpers.rb
new file mode 100644
index 00000000000..99b19eedcff
--- /dev/null
+++ b/spec/support/helpers/features/admin_users_helpers.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+module Spec
+ module Support
+ module Helpers
+ module Features
+ module AdminUsersHelpers
+ def click_user_dropdown_toggle(user_id)
+ page.within("[data-testid='user-actions-#{user_id}']") do
+ find("[data-testid='dropdown-toggle']").click
+ end
+ end
+
+ def click_action_in_user_dropdown(user_id, action)
+ click_user_dropdown_toggle(user_id)
+
+ within find("[data-testid='user-actions-#{user_id}']") do
+ find('li button', exact_text: action).click
+ end
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/spec/support/helpers/features/invite_members_modal_helper.rb b/spec/support/helpers/features/invite_members_modal_helper.rb
index 1127c817656..7b8cd6963c0 100644
--- a/spec/support/helpers/features/invite_members_modal_helper.rb
+++ b/spec/support/helpers/features/invite_members_modal_helper.rb
@@ -9,7 +9,7 @@ module Spec
click_on 'Invite members'
page.within '#invite-members-modal' do
- fill_in 'Select members or type email addresses', with: name
+ find('[data-testid="members-token-select-input"]').set(name)
wait_for_requests
click_button name
diff --git a/spec/support/helpers/features/snippet_helpers.rb b/spec/support/helpers/features/snippet_helpers.rb
index c26849a9680..dc718b1b212 100644
--- a/spec/support/helpers/features/snippet_helpers.rb
+++ b/spec/support/helpers/features/snippet_helpers.rb
@@ -1,14 +1,17 @@
# frozen_string_literal: true
-# These helpers help you interact within the Editor Lite (single-file editor, snippets, etc.).
+# These helpers help you interact within the Source Editor (single-file editor, snippets, etc.).
#
+
+require Rails.root.join("spec/support/helpers/features/source_editor_spec_helpers.rb")
+
module Spec
module Support
module Helpers
module Features
module SnippetSpecHelpers
include ActionView::Helpers::JavaScriptHelper
- include Spec::Support::Helpers::Features::EditorLiteSpecHelpers
+ include Spec::Support::Helpers::Features::SourceEditorSpecHelpers
def snippet_description_locator
'snippet-description'
@@ -31,7 +34,7 @@ module Spec
end
def snippet_get_first_blob_value
- page.find('.gl-editor-lite', match: :first)
+ page.find('.gl-source-editor', match: :first)
end
def snippet_description_value
@@ -53,7 +56,7 @@ module Spec
end
def snippet_fill_in_content(value)
- page.within('.gl-editor-lite') do
+ page.within('.gl-source-editor') do
el = find('.inputarea')
el.send_keys value
end
diff --git a/spec/support/helpers/features/editor_lite_spec_helpers.rb b/spec/support/helpers/features/source_editor_spec_helpers.rb
index 0a67e753379..57057b47fbb 100644
--- a/spec/support/helpers/features/editor_lite_spec_helpers.rb
+++ b/spec/support/helpers/features/source_editor_spec_helpers.rb
@@ -1,12 +1,12 @@
# frozen_string_literal: true
-# These helpers help you interact within the Editor Lite (single-file editor, snippets, etc.).
+# These helpers help you interact within the Source Editor (single-file editor, snippets, etc.).
#
module Spec
module Support
module Helpers
module Features
- module EditorLiteSpecHelpers
+ module SourceEditorSpecHelpers
include ActionView::Helpers::JavaScriptHelper
def editor_set_value(value)
diff --git a/spec/support/helpers/features/top_nav_spec_helpers.rb b/spec/support/helpers/features/top_nav_spec_helpers.rb
index ab664ce4283..87ed897ec74 100644
--- a/spec/support/helpers/features/top_nav_spec_helpers.rb
+++ b/spec/support/helpers/features/top_nav_spec_helpers.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-# These helpers help you interact within the Editor Lite (single-file editor, snippets, etc.).
+# These helpers help you interact within the Source Editor (single-file editor, snippets, etc.).
#
module Spec
module Support