Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-07-29 00:10:46 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-07-29 00:10:46 +0300
commit0e2a219d6a82935ec564dfb68a1d721d7a24cd6a (patch)
treef3ef106082cd32a6e10d0540f2c1e553257eebf5 /qa
parent7c5f1bfac791045e54386b9c9bb56ee24afc68ca (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/page/component/listbox_filter.rb16
-rw-r--r--qa/qa/page/file/form.rb19
2 files changed, 21 insertions, 14 deletions
diff --git a/qa/qa/page/component/listbox_filter.rb b/qa/qa/page/component/listbox_filter.rb
new file mode 100644
index 00000000000..b8ddab23819
--- /dev/null
+++ b/qa/qa/page/component/listbox_filter.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+module QA
+ module Page
+ module Component
+ module ListboxFilter
+ def filter_and_select(item)
+ page.has_css?('.gl-listbox-search-input', wait: QA::Support::Repeater::DEFAULT_MAX_WAIT_TIME)
+
+ find('.gl-listbox-search-input').set(item)
+ find('.gl-new-dropdown-item', text: item, exact_text: true).click
+ end
+ end
+ end
+ end
+end
diff --git a/qa/qa/page/file/form.rb b/qa/qa/page/file/form.rb
index 06b75f42e4d..cfc689daa32 100644
--- a/qa/qa/page/file/form.rb
+++ b/qa/qa/page/file/form.rb
@@ -4,7 +4,7 @@ module QA
module Page
module File
class Form < Page::Base
- include Page::Component::DropdownFilter
+ include Page::Component::ListboxFilter
include Page::Component::BlobContent
include Shared::CommitMessage
include Shared::CommitButton
@@ -14,11 +14,8 @@ module QA
element :file_name_field
end
- view 'app/views/projects/blob/_template_selectors.html.haml' do
- element :gitignore_dropdown
- element :gitlab_ci_yml_dropdown
- element :dockerfile_dropdown
- element :license_dropdown
+ view 'app/assets/javascripts/blob/filepath_form/components/template_selector.vue' do
+ element :template_selector
end
def add_name(name)
@@ -37,14 +34,8 @@ module QA
def select_template(template_type, template)
case template_type
- when '.gitignore'
- click_element :gitignore_dropdown
- when '.gitlab-ci.yml'
- click_element :gitlab_ci_yml_dropdown
- when 'Dockerfile'
- click_element :dockerfile_dropdown
- when 'LICENSE'
- click_element :license_dropdown
+ when '.gitignore', '.gitlab-ci.yml', 'Dockerfile', 'LICENSE'
+ click_element :template_selector
else
raise %(Unsupported template_type "#{template_type}". Please confirm that it is a valid option.)
end