Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
67bda08c
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
67bda08c
编写于
3月 20, 2013
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3266 from DanKnox/fix_wiki_cancel_edit_button
Fix the Cancel button on the Edit Wiki page.
上级
6880ace1
8300ae36
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
31 addition
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
未找到文件。
app/views/wikis/_form.html.haml
浏览文件 @
67bda08c
...
...
@@ -30,4 +30,7 @@
.input
=
f
.
text_field
:message
,
class:
'span8'
.actions
=
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
浏览文件 @
67bda08c
...
...
@@ -8,6 +8,10 @@ Feature: Project Wiki
Given
I create the Wiki Home 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
Given
I have an existing Wiki page
And
I browse to that Wiki page
...
...
@@ -15,6 +19,13 @@ Feature: Project Wiki
And
I change the 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
Given
I have an existing wiki page
And
That page has two revisions
...
...
features/steps/project/project_wiki.rb
浏览文件 @
67bda08c
...
...
@@ -4,6 +4,17 @@ class ProjectWiki < Spinach::FeatureSteps
include
SharedNote
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
fill_in
"Content"
,
:with
=>
'[link test](test)'
click_on
"Save"
...
...
@@ -39,6 +50,11 @@ class ProjectWiki < Spinach::FeatureSteps
page
.
should
have_content
"Updated Wiki Content"
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
@page
.
update
(
"new content"
,
:markdown
,
"second commit"
)
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录