summaryrefslogtreecommitdiff
path: root/qa/qa/page/project/web_ide/edit.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 11:18:50 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 11:18:50 +0000
commit8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch)
treea77e7fe7a93de11213032ed4ab1f33a3db51b738 /qa/qa/page/project/web_ide/edit.rb
parent00b35af3db1abfe813a778f643dad221aad51fca (diff)
downloadgitlab-ce-8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781.tar.gz
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'qa/qa/page/project/web_ide/edit.rb')
-rw-r--r--qa/qa/page/project/web_ide/edit.rb22
1 files changed, 12 insertions, 10 deletions
diff --git a/qa/qa/page/project/web_ide/edit.rb b/qa/qa/page/project/web_ide/edit.rb
index 7809f9246ec..29f431d81df 100644
--- a/qa/qa/page/project/web_ide/edit.rb
+++ b/qa/qa/page/project/web_ide/edit.rb
@@ -20,12 +20,6 @@ module QA
element :file_list
end
- view 'app/assets/javascripts/ide/components/new_dropdown/modal.vue' do
- element :full_file_path
- element :new_file_modal
- element :template_list
- end
-
view 'app/assets/javascripts/ide/components/file_templates/bar.vue' do
element :file_templates_bar
element :file_template_dropdown
@@ -52,6 +46,10 @@ module QA
element :editor_container
end
+ view 'app/assets/javascripts/ide/components/ide.vue' do
+ element :first_file_button
+ end
+
def has_file?(file_name)
within_element(:file_list) do
page.has_content? file_name
@@ -59,10 +57,7 @@ module QA
end
def create_new_file_from_template(file_name, template)
- click_element :new_file
-
- # Wait for the modal animation to complete before clicking on the file name
- wait_for_animated_element(:new_file_modal)
+ click_element(:new_file, Page::Component::WebIDE::Modal::CreateNewFile)
within_element(:template_list) do
click_on file_name
@@ -130,6 +125,13 @@ module QA
find('.modified textarea.inputarea')
end
end
+
+ def create_first_file(file_name)
+ finished_loading?
+ click_element(:first_file_button, Page::Component::WebIDE::Modal::CreateNewFile)
+ fill_element(:file_name_field, file_name)
+ click_button('Create file')
+ end
end
end
end