Commit 13c7fdaa authored by Anastasia McDonald's avatar Anastasia McDonald

Merge branch 'rewrite-content-editor-spec' into 'master'

Fix and dequarantine content_editor_spec.rb

See merge request gitlab-org/gitlab!79271
parents 9211231d 87ee351f
......@@ -38,7 +38,7 @@ module QA
def click_submit
click_element(:wiki_submit_button)
wait_until(reload: false) do
QA::Support::Retrier.retry_on_exception do
has_no_element?(:wiki_title_textbox)
end
end
......@@ -48,15 +48,8 @@ module QA
Page::Modal::DeleteWiki.perform(&:confirm_deletion)
end
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
def use_new_editor
click_element(:editing_mode_button, mode: 'Edit rich text')
wait_until(reload: false) do
has_element?(:content_editor_container)
......
# frozen_string_literal: true
module QA
RSpec.describe 'Create', :requires_admin, quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/350220', type: :investigating } do # remove :requires_admin once the ff is enabled by default in https://gitlab.com/gitlab-org/gitlab/-/issues/345398
RSpec.describe 'Create' do
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
......@@ -24,7 +23,7 @@ module QA
Page::Project::Wiki::Edit.perform do |edit|
edit.set_title(page_title)
edit.use_new_editor(toggle)
edit.use_new_editor
edit.add_heading('Heading 1', heading_text)
edit.upload_image(File.absolute_path(File.join('qa', 'fixtures', 'designs', image_file_name)))
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment