Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
08f6a0fb
Commit
08f6a0fb
authored
Nov 25, 2021
by
Anastasia McDonald
Committed by
Ramya Authappan
Nov 25, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rewrite content_editor_spec to run with ff on and off
parent
89099ed4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
6 deletions
+22
-6
app/assets/javascripts/pages/shared/wikis/components/wiki_form.vue
...s/javascripts/pages/shared/wikis/components/wiki_form.vue
+2
-0
qa/qa/page/component/wiki_page_form.rb
qa/qa/page/component/wiki_page_form.rb
+17
-4
qa/qa/specs/features/browser_ui/3_create/wiki/content_editor_spec.rb
.../features/browser_ui/3_create/wiki/content_editor_spec.rb
+3
-2
No files found.
app/assets/javascripts/pages/shared/wikis/components/wiki_form.vue
View file @
08f6a0fb
...
...
@@ -442,6 +442,8 @@ export default {
>
<gl-button
data-testid=
"toggle-editing-mode-button"
data-qa-selector=
"editing_mode_button"
:data-qa-mode=
"toggleEditingModeButtonText"
variant=
"link"
@
click=
"toggleEditingMode"
>
{{
toggleEditingModeButtonText
}}
</gl-button
...
...
qa/qa/page/component/wiki_page_form.rb
View file @
08f6a0fb
...
...
@@ -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
...
...
qa/qa/specs/features/browser_ui/3_create/wiki/content_editor_spec.rb
View file @
08f6a0fb
# 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment