BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
394ac378
Unverified
Commit
394ac378
authored
Jul 31, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix markdown tests. Use new repo for testing. Fixed gitlab-shell test setup
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
faaedbf0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
31 deletions
+29
-31
markdown_render.feature
features/project/source/markdown_render.feature
+12
-12
markdown_render.rb
features/steps/project/markdown_render.rb
+15
-17
shell.rake
lib/tasks/gitlab/shell.rake
+1
-1
test_env.rb
spec/support/test_env.rb
+1
-1
No files found.
features/project/source/markdown_render.feature
View file @
394ac378
...
...
@@ -2,7 +2,7 @@ Feature: Project markdown render
Background
:
Given
I sign in as a user
And
I own project
"Delta"
Given
I visit project source page
And
I visit markdown branch
# Tree README
...
...
@@ -11,26 +11,26 @@ Feature: Project markdown render
And
I click on a relative link in README
Then
I should see the correct markdown
Scenario
:
I
browse files from ma
ster
branch
Then
I should see files from repository in ma
ster
Scenario
:
I
browse files from ma
rkdown
branch
Then
I should see files from repository in ma
rkdown
And
I should see rendered README which contains correct links
And
I click on Gitlab API in README
Then
I should see correct document rendered
Scenario
:
I
view README in ma
ster
branch
Then
I should see files from repository in ma
ster
Scenario
:
I
view README in ma
rkdown
branch
Then
I should see files from repository in ma
rkdown
And
I should see rendered README which contains correct links
And
I click on Rake tasks in README
Then
I should see correct directory rendered
Scenario
:
I
view README in ma
ster
branch to see reference links to directory
Then
I should see files from repository in ma
ster
Scenario
:
I
view README in ma
rkdown
branch to see reference links to directory
Then
I should see files from repository in ma
rkdown
And
I should see rendered README which contains correct links
And
I click on GitLab API doc directory in README
Then
I should see correct doc/api directory rendered
Scenario
:
I
view README in ma
ster
branch to see reference links to file
Then
I should see files from repository in ma
ster
Scenario
:
I
view README in ma
rkdown
branch to see reference links to file
Then
I should see files from repository in ma
rkdown
And
I should see rendered README which contains correct links
And
I click on Maintenance in README
Then
I should see correct maintenance file rendered
...
...
@@ -41,19 +41,19 @@ Feature: Project markdown render
# Blob
Scenario
:
I
navigate to doc directory to view documentation in ma
ster
Scenario
:
I
navigate to doc directory to view documentation in ma
rkdown
And
I navigate to the doc/api/README
And
I see correct file rendered
And
I click on users in doc/api/README
Then
I should see the correct document file
Scenario
:
I
navigate to doc directory to view user doc in ma
ster
Scenario
:
I
navigate to doc directory to view user doc in ma
rkdown
And
I navigate to the doc/api/README
And
I see correct file rendered
And
I click on raketasks in doc/api/README
Then
I should see correct directory rendered
Scenario
:
I
navigate to doc directory to view user doc in ma
ster
Scenario
:
I
navigate to doc directory to view user doc in ma
rkdown
And
I navigate to the doc/api/README
And
Header
"GitLab API"
should have correct id and link
...
...
features/steps/project/markdown_render.rb
View file @
394ac378
...
...
@@ -12,11 +12,10 @@ class Spinach::Features::ProjectMarkdownRender < Spinach::FeatureSteps
@project
.
team
<<
[
@user
,
:master
]
end
Then
'I should see files from repository in master'
do
current_path
.
should
==
project_tree_path
(
@project
,
"master"
)
page
.
should
have_content
"Gemfile"
page
.
should
have_content
"app"
page
.
should
have_content
"README"
Then
'I should see files from repository in markdown'
do
current_path
.
should
==
project_tree_path
(
@project
,
"markdown"
)
page
.
should
have_content
"README.md"
page
.
should
have_content
"CHANGELOG"
end
And
'I should see rendered README which contains correct links'
do
...
...
@@ -34,7 +33,7 @@ class Spinach::Features::ProjectMarkdownRender < Spinach::FeatureSteps
end
Then
'I should see correct document rendered'
do
current_path
.
should
==
project_blob_path
(
@project
,
"ma
ster
/doc/api/README.md"
)
current_path
.
should
==
project_blob_path
(
@project
,
"ma
rkdown
/doc/api/README.md"
)
page
.
should
have_content
"All API requests require authentication"
end
...
...
@@ -43,7 +42,7 @@ class Spinach::Features::ProjectMarkdownRender < Spinach::FeatureSteps
end
Then
'I should see correct directory rendered'
do
current_path
.
should
==
project_tree_path
(
@project
,
"ma
ster
/doc/raketasks"
)
current_path
.
should
==
project_tree_path
(
@project
,
"ma
rkdown
/doc/raketasks"
)
page
.
should
have_content
"backup_restore.md"
page
.
should
have_content
"maintenance.md"
end
...
...
@@ -53,7 +52,7 @@ class Spinach::Features::ProjectMarkdownRender < Spinach::FeatureSteps
end
Then
'I should see correct doc/api directory rendered'
do
current_path
.
should
==
project_tree_path
(
@project
,
"ma
ster
/doc/api"
)
current_path
.
should
==
project_tree_path
(
@project
,
"ma
rkdown
/doc/api"
)
page
.
should
have_content
"README.md"
page
.
should
have_content
"users.md"
end
...
...
@@ -63,7 +62,7 @@ class Spinach::Features::ProjectMarkdownRender < Spinach::FeatureSteps
end
Then
'I should see correct maintenance file rendered'
do
current_path
.
should
==
project_blob_path
(
@project
,
"ma
ster
/doc/raketasks/maintenance.md"
)
current_path
.
should
==
project_blob_path
(
@project
,
"ma
rkdown
/doc/raketasks/maintenance.md"
)
page
.
should
have_content
"bundle exec rake gitlab:env:info RAILS_ENV=production"
end
...
...
@@ -86,7 +85,7 @@ class Spinach::Features::ProjectMarkdownRender < Spinach::FeatureSteps
end
And
'I see correct file rendered'
do
current_path
.
should
==
project_blob_path
(
@project
,
"ma
ster
/doc/api/README.md"
)
current_path
.
should
==
project_blob_path
(
@project
,
"ma
rkdown
/doc/api/README.md"
)
page
.
should
have_content
"Contents"
page
.
should
have_link
"Users"
page
.
should
have_link
"Rake tasks"
...
...
@@ -97,7 +96,7 @@ class Spinach::Features::ProjectMarkdownRender < Spinach::FeatureSteps
end
Then
'I should see the correct document file'
do
current_path
.
should
==
project_blob_path
(
@project
,
"ma
ster
/doc/api/users.md"
)
current_path
.
should
==
project_blob_path
(
@project
,
"ma
rkdown
/doc/api/users.md"
)
page
.
should
have_content
"Get a list of users."
end
...
...
@@ -125,9 +124,8 @@ class Spinach::Features::ProjectMarkdownRender < Spinach::FeatureSteps
Then
'I should see files from repository in markdown branch'
do
current_path
.
should
==
project_tree_path
(
@project
,
"markdown"
)
page
.
should
have_content
"Gemfile"
page
.
should
have_content
"app"
page
.
should
have_content
"README"
page
.
should
have_content
"README.md"
page
.
should
have_content
"CHANGELOG"
end
And
'I see correct file rendered in markdown branch'
do
...
...
@@ -256,8 +254,8 @@ class Spinach::Features::ProjectMarkdownRender < Spinach::FeatureSteps
end
Given
'I go directory which contains README file'
do
visit
project_tree_path
(
@project
,
"ma
ster
/doc/api"
)
current_path
.
should
==
project_tree_path
(
@project
,
"ma
ster
/doc/api"
)
visit
project_tree_path
(
@project
,
"ma
rkdown
/doc/api"
)
current_path
.
should
==
project_tree_path
(
@project
,
"ma
rkdown
/doc/api"
)
end
And
'I click on a relative link in README'
do
...
...
@@ -265,7 +263,7 @@ class Spinach::Features::ProjectMarkdownRender < Spinach::FeatureSteps
end
Then
'I should see the correct markdown'
do
current_path
.
should
==
project_blob_path
(
@project
,
"ma
ster
/doc/api/users.md"
)
current_path
.
should
==
project_blob_path
(
@project
,
"ma
rkdown
/doc/api/users.md"
)
page
.
should
have_content
"List users"
end
...
...
lib/tasks/gitlab/shell.rake
View file @
394ac378
...
...
@@ -5,7 +5,7 @@ namespace :gitlab do
warn_user_is_not_gitlab
default_version
=
File
.
read
(
File
.
join
(
Rails
.
root
,
"GITLAB_SHELL_VERSION"
)).
strip
args
.
with_defaults
(
tag:
default_version
,
repo:
"https://gitlab.com/gitlab-org/gitlab-shell.git"
)
args
.
with_defaults
(
tag:
'v'
+
default_version
,
repo:
"https://gitlab.com/gitlab-org/gitlab-shell.git"
)
user
=
Settings
.
gitlab
.
user
home_dir
=
Settings
.
gitlab
.
user_home
...
...
spec/support/test_env.rb
View file @
394ac378
...
...
@@ -45,7 +45,7 @@ module TestEnv
def
setup_factory_repo
repo_path
=
repos_path
+
"/root/testme.git"
clone_url
=
'https://gitlab.com/gitlab-org/
testme
.git'
clone_url
=
'https://gitlab.com/gitlab-org/
gitlab-test
.git'
unless
File
.
directory?
(
repo_path
)
git_cmd
=
%W(git clone --bare
#{
clone_url
}
#{
repo_path
}
)
...
...
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