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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
f07051a2
Commit
f07051a2
authored
Feb 15, 2019
by
George Tsiolis
Committed by
Fatih Acet
Feb 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove second primary button on wiki create and edit
parent
d06c3ac3
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
25 deletions
+10
-25
app/views/projects/wikis/edit.html.haml
app/views/projects/wikis/edit.html.haml
+0
-3
changelogs/unreleased/remove-second-primary-button-on-wiki-edit.yml
.../unreleased/remove-second-primary-button-on-wiki-edit.yml
+5
-0
spec/features/projects/wiki/markdown_preview_spec.rb
spec/features/projects/wiki/markdown_preview_spec.rb
+2
-3
spec/features/projects/wiki/user_creates_wiki_page_spec.rb
spec/features/projects/wiki/user_creates_wiki_page_spec.rb
+1
-7
spec/features/projects/wiki/user_updates_wiki_page_spec.rb
spec/features/projects/wiki/user_updates_wiki_page_spec.rb
+1
-6
spec/features/projects/wiki/user_views_wiki_page_spec.rb
spec/features/projects/wiki/user_views_wiki_page_spec.rb
+1
-6
No files found.
app/views/projects/wikis/edit.html.haml
View file @
f07051a2
...
@@ -23,9 +23,6 @@
...
@@ -23,9 +23,6 @@
=
s_
(
"Wiki|Create Page"
)
=
s_
(
"Wiki|Create Page"
)
.nav-controls
.nav-controls
-
if
can?
(
current_user
,
:create_wiki
,
@project
)
=
link_to
'#modal-new-wiki'
,
class:
"add-new-wiki btn btn-success"
,
"data-toggle"
=>
"modal"
do
=
s_
(
"Wiki|New page"
)
-
if
@page
.
persisted?
-
if
@page
.
persisted?
=
link_to
project_wiki_history_path
(
@project
,
@page
),
class:
"btn"
do
=
link_to
project_wiki_history_path
(
@project
,
@page
),
class:
"btn"
do
=
s_
(
"Wiki|Page history"
)
=
s_
(
"Wiki|Page history"
)
...
...
changelogs/unreleased/remove-second-primary-button-on-wiki-edit.yml
0 → 100644
View file @
f07051a2
---
title
:
Remove second primary button on wiki edit
merge_request
:
19959
author
:
George Tsiolis
type
:
changed
spec/features/projects/wiki/markdown_preview_spec.rb
View file @
f07051a2
...
@@ -3,6 +3,7 @@ require 'spec_helper'
...
@@ -3,6 +3,7 @@ require 'spec_helper'
describe
'Projects > Wiki > User previews markdown changes'
,
:js
do
describe
'Projects > Wiki > User previews markdown changes'
,
:js
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:wiki_repo
,
namespace:
user
.
namespace
)
}
let
(
:project
)
{
create
(
:project
,
:wiki_repo
,
namespace:
user
.
namespace
)
}
let
(
:wiki_page
)
{
create
(
:wiki_page
,
wiki:
project
.
wiki
,
attrs:
{
title:
'home'
,
content:
'[some link](other-page)'
})
}
let
(
:wiki_content
)
do
let
(
:wiki_content
)
do
<<-
HEREDOC
<<-
HEREDOC
[regular link](regular)
[regular link](regular)
...
@@ -18,9 +19,7 @@ describe 'Projects > Wiki > User previews markdown changes', :js do
...
@@ -18,9 +19,7 @@ describe 'Projects > Wiki > User previews markdown changes', :js do
sign_in
(
user
)
sign_in
(
user
)
visit
project_path
(
project
)
visit
project_wiki_path
(
project
,
wiki_page
)
find
(
'.shortcuts-wiki'
).
click
click_link
"Create your first page"
end
end
context
"while creating a new wiki page"
do
context
"while creating a new wiki page"
do
...
...
spec/features/projects/wiki/user_creates_wiki_page_spec.rb
View file @
f07051a2
...
@@ -44,13 +44,7 @@ describe "User creates wiki page" do
...
@@ -44,13 +44,7 @@ describe "User creates wiki page" do
end
end
it
"shows non-escaped link in the pages list"
,
:js
do
it
"shows non-escaped link in the pages list"
,
:js
do
click_link
(
"New page"
)
fill_in
(
:wiki_title
,
with:
"one/two/three-test"
)
page
.
within
(
"#modal-new-wiki"
)
do
fill_in
(
:new_wiki_path
,
with:
"one/two/three-test"
)
click_on
(
"Create page"
)
end
page
.
within
(
".wiki-form"
)
do
page
.
within
(
".wiki-form"
)
do
fill_in
(
:wiki_content
,
with:
"wiki content"
)
fill_in
(
:wiki_content
,
with:
"wiki content"
)
...
...
spec/features/projects/wiki/user_updates_wiki_page_spec.rb
View file @
f07051a2
...
@@ -26,12 +26,7 @@ describe 'User updates wiki page' do
...
@@ -26,12 +26,7 @@ describe 'User updates wiki page' do
end
end
it
'updates a page that has a path'
,
:js
do
it
'updates a page that has a path'
,
:js
do
click_on
(
'New page'
)
fill_in
(
:wiki_title
,
with:
'one/two/three-test'
)
page
.
within
(
'#modal-new-wiki'
)
do
fill_in
(
:new_wiki_path
,
with:
'one/two/three-test'
)
click_on
(
'Create page'
)
end
page
.
within
'.wiki-form'
do
page
.
within
'.wiki-form'
do
fill_in
(
:wiki_content
,
with:
'wiki content'
)
fill_in
(
:wiki_content
,
with:
'wiki content'
)
...
...
spec/features/projects/wiki/user_views_wiki_page_spec.rb
View file @
f07051a2
...
@@ -22,12 +22,7 @@ describe 'User views a wiki page' do
...
@@ -22,12 +22,7 @@ describe 'User views a wiki page' do
visit
(
project_wikis_path
(
project
))
visit
(
project_wikis_path
(
project
))
click_link
"Create your first page"
click_link
"Create your first page"
click_on
(
'New page'
)
fill_in
(
:wiki_title
,
with:
'one/two/three-test'
)
page
.
within
(
'#modal-new-wiki'
)
do
fill_in
(
:new_wiki_path
,
with:
'one/two/three-test'
)
click_on
(
'Create page'
)
end
page
.
within
(
'.wiki-form'
)
do
page
.
within
(
'.wiki-form'
)
do
fill_in
(
:wiki_content
,
with:
'wiki content'
)
fill_in
(
:wiki_content
,
with:
'wiki content'
)
...
...
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