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>2021-11-25 15:10:23 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-11-25 15:10:23 +0300
commit85a825bbbfe51615f447d632a5f53c297ec1b33a (patch)
treefacb7d0de4b1d40f58d83d438587d6404bc74845 /qa
parent4d60d012f859c066d21d69d461705236df389788 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/page/component/wiki_page_form.rb21
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/wiki/content_editor_spec.rb5
2 files changed, 20 insertions, 6 deletions
diff --git a/qa/qa/page/component/wiki_page_form.rb b/qa/qa/page/component/wiki_page_form.rb
index fd536ff1dd3..bc73fe0c3ab 100644
--- a/qa/qa/page/component/wiki_page_form.rb
+++ b/qa/qa/page/component/wiki_page_form.rb
@@ -15,6 +15,7 @@ module QA
element :wiki_message_textbox
element :wiki_submit_button
element :try_new_editor_container
+ element :editing_mode_button
end
base.view 'app/assets/javascripts/pages/shared/wikis/components/delete_wiki_modal.vue' do
@@ -36,6 +37,10 @@ module QA
def click_submit
click_element(:wiki_submit_button)
+
+ wait_until(reload: false) do
+ has_no_element?(:wiki_title_textbox)
+ end
end
def delete_page
@@ -43,11 +48,19 @@ module QA
Page::Modal::DeleteWiki.perform(&:confirm_deletion)
end
- def use_new_editor
- within_element(:try_new_editor_container) do
- click_button('Use the new editor')
+ def use_new_editor(toggle)
+ # Update once the feature is released, see https://gitlab.com/gitlab-org/gitlab/-/issues/345398
+ if toggle
+ click_element(:editing_mode_button, mode: 'Edit rich text')
+ else
+ within_element(:try_new_editor_container) do
+ click_button('Use the new editor')
+ end
+ end
+
+ wait_until(reload: false) do
+ has_element?(:content_editor_container)
end
- has_element?(:content_editor_container)
end
end
end
diff --git a/qa/qa/specs/features/browser_ui/3_create/wiki/content_editor_spec.rb b/qa/qa/specs/features/browser_ui/3_create/wiki/content_editor_spec.rb
index 295c5cbdec3..c3dea30746d 100644
--- a/qa/qa/specs/features/browser_ui/3_create/wiki/content_editor_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/wiki/content_editor_spec.rb
@@ -1,12 +1,13 @@
# frozen_string_literal: true
module QA
- RSpec.describe 'Create', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/346149', type: :stale } do
+ RSpec.describe 'Create', :requires_admin do # remove :requires_admin once the ff is enabled by default in https://gitlab.com/gitlab-org/gitlab/-/issues/345398
context 'Content Editor' do
let(:initial_wiki) { Resource::Wiki::ProjectPage.fabricate_via_api! }
let(:page_title) { 'Content Editor Page' }
let(:heading_text) { 'My New Heading' }
let(:image_file_name) { 'testfile.png' }
+ let!(:toggle) { Runtime::Feature.enabled?(:wiki_switch_between_content_editor_raw_markdown) }
before do
Flow::Login.sign_in
@@ -23,7 +24,7 @@ module QA
Page::Project::Wiki::Edit.perform do |edit|
edit.set_title(page_title)
- edit.use_new_editor
+ edit.use_new_editor(toggle)
edit.add_heading('Heading 1', heading_text)
edit.upload_image(File.absolute_path(File.join('qa', 'fixtures', 'designs', image_file_name)))
end