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
Léo-Paul Géneau
gitlab-ce
Commits
67bda08c
Commit
67bda08c
authored
Mar 20, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3266 from DanKnox/fix_wiki_cancel_edit_button
Fix the Cancel button on the Edit Wiki page.
parents
6880ace1
8300ae36
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
1 deletion
+31
-1
app/views/wikis/_form.html.haml
app/views/wikis/_form.html.haml
+4
-1
features/project/wiki.feature
features/project/wiki.feature
+11
-0
features/steps/project/project_wiki.rb
features/steps/project/project_wiki.rb
+16
-0
No files found.
app/views/wikis/_form.html.haml
View file @
67bda08c
...
@@ -30,4 +30,7 @@
...
@@ -30,4 +30,7 @@
.input
=
f
.
text_field
:message
,
class:
'span8'
.input
=
f
.
text_field
:message
,
class:
'span8'
.actions
.actions
=
f
.
submit
'Save'
,
class:
"btn-save btn"
=
f
.
submit
'Save'
,
class:
"btn-save btn"
=
link_to
"Cancel"
,
project_wiki_path
(
@project
,
:index
),
class:
"btn btn-cancel"
-
if
@wiki
&&
@wiki
.
persisted?
=
link_to
"Cancel"
,
project_wiki_path
(
@project
,
@wiki
),
class:
"btn btn-cancel"
-
else
=
link_to
"Cancel"
,
project_wiki_path
(
@project
,
:home
),
class:
"btn btn-cancel"
features/project/wiki.feature
View file @
67bda08c
...
@@ -8,6 +8,10 @@ Feature: Project Wiki
...
@@ -8,6 +8,10 @@ Feature: Project Wiki
Given
I create the Wiki Home page
Given
I create the Wiki Home page
Then
I should see the newly created wiki page
Then
I should see the newly created wiki page
Scenario
:
Pressing Cancel while editing a brand new Wiki
Given
I click on the Cancel button
Then
I should be redirected back to the Edit Home Wiki page
Scenario
:
Edit existing page
Scenario
:
Edit existing page
Given
I have an existing Wiki page
Given
I have an existing Wiki page
And
I browse to that Wiki page
And
I browse to that Wiki page
...
@@ -15,6 +19,13 @@ Feature: Project Wiki
...
@@ -15,6 +19,13 @@ Feature: Project Wiki
And
I change the content
And
I change the content
Then
I should see the updated content
Then
I should see the updated content
Scenario
:
Pressing Cancel while editing an existing Wiki page
Given
I have an existing Wiki page
And
I browse to that Wiki page
And
I click on the Edit button
And
I click on the Cancel button
Then
I should be redirected back to that Wiki page
Scenario
:
View page history
Scenario
:
View page history
Given
I have an existing wiki page
Given
I have an existing wiki page
And
That page has two revisions
And
That page has two revisions
...
...
features/steps/project/project_wiki.rb
View file @
67bda08c
...
@@ -4,6 +4,17 @@ class ProjectWiki < Spinach::FeatureSteps
...
@@ -4,6 +4,17 @@ class ProjectWiki < Spinach::FeatureSteps
include
SharedNote
include
SharedNote
include
SharedPaths
include
SharedPaths
Given
'I click on the Cancel button'
do
within
(
:css
,
".actions"
)
do
click_on
"Cancel"
end
end
Then
'I should be redirected back to the Edit Home Wiki page'
do
url
=
URI
.
parse
(
current_url
)
url
.
path
.
should
==
project_wiki_path
(
project
,
:home
)
end
Given
'I create the Wiki Home page'
do
Given
'I create the Wiki Home page'
do
fill_in
"Content"
,
:with
=>
'[link test](test)'
fill_in
"Content"
,
:with
=>
'[link test](test)'
click_on
"Save"
click_on
"Save"
...
@@ -39,6 +50,11 @@ class ProjectWiki < Spinach::FeatureSteps
...
@@ -39,6 +50,11 @@ class ProjectWiki < Spinach::FeatureSteps
page
.
should
have_content
"Updated Wiki Content"
page
.
should
have_content
"Updated Wiki Content"
end
end
Then
'I should be redirected back to that Wiki page'
do
url
=
URI
.
parse
(
current_url
)
url
.
path
.
should
==
project_wiki_path
(
project
,
@page
)
end
And
'That page has two revisions'
do
And
'That page has two revisions'
do
@page
.
update
(
"new content"
,
:markdown
,
"second commit"
)
@page
.
update
(
"new content"
,
:markdown
,
"second commit"
)
end
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