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
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/page/project/fork/new.rb')
-rw-r--r--qa/qa/page/project/fork/new.rb29
1 files changed, 25 insertions, 4 deletions
diff --git a/qa/qa/page/project/fork/new.rb b/qa/qa/page/project/fork/new.rb
index e1b5e47dd0b..b622b341685 100644
--- a/qa/qa/page/project/fork/new.rb
+++ b/qa/qa/page/project/fork/new.rb
@@ -6,19 +6,40 @@ module QA
module Fork
class New < Page::Base
view 'app/assets/javascripts/pages/projects/forks/new/components/fork_form.vue' do
- element :fork_namespace_dropdown
element :fork_project_button
element :fork_privacy_button
end
+ view 'app/assets/javascripts/pages/projects/forks/new/components/project_namespace.vue' do
+ element :select_namespace_dropdown
+ element :select_namespace_dropdown_item
+ element :select_namespace_dropdown_search_field
+ element :select_namespace_dropdown_item
+ end
+
def fork_project(namespace = Runtime::Namespace.path)
- select_element(:fork_namespace_dropdown, namespace)
+ choose_namespace(namespace)
click_element(:fork_privacy_button, privacy_level: 'public')
click_element(:fork_project_button)
end
- def fork_namespace_dropdown_values
- find_element(:fork_namespace_dropdown).all(:option).map { |option| option.text.tr("\n", '').strip }
+ def get_list_of_namespaces
+ click_element(:select_namespace_dropdown)
+ wait_until(reload: false) do
+ has_element?(:select_namespace_dropdown_item)
+ end
+ all_elements(:select_namespace_dropdown_item, minimum: 1).map(&:text)
+ end
+
+ def choose_namespace(namespace)
+ retry_on_exception do
+ click_element(:select_namespace_dropdown)
+ fill_element(:select_namespace_dropdown_search_field, namespace)
+ wait_until(reload: false) do
+ has_element?(:select_namespace_dropdown_item, text: namespace)
+ end
+ click_button(namespace)
+ end
end
end
end