Commit c6b9767e74421bae7f0532ce7fab8753863e94f0
1 parent
462161a3
Exists in
spb-stable
and in
3 other branches
Test if the views behave correctly with reference style relative links.
Showing
3 changed files
with
34 additions
and
0 deletions
Show diff stats
features/project/source/markdown_render.feature
| @@ -16,6 +16,18 @@ Feature: Project markdown render | @@ -16,6 +16,18 @@ Feature: Project markdown render | ||
| 16 | And I click on Rake tasks in README | 16 | And I click on Rake tasks in README |
| 17 | Then I should see correct directory rendered | 17 | Then I should see correct directory rendered |
| 18 | 18 | ||
| 19 | + Scenario: I view README in master branch to see reference links to directory | ||
| 20 | + Then I should see files from repository in master | ||
| 21 | + And I should see rendered README which contains correct links | ||
| 22 | + And I click on GitLab API doc directory in README | ||
| 23 | + Then I should see correct doc/api directory rendered | ||
| 24 | + | ||
| 25 | + Scenario: I view README in master branch to see reference links to file | ||
| 26 | + Then I should see files from repository in master | ||
| 27 | + And I should see rendered README which contains correct links | ||
| 28 | + And I click on Maintenance in README | ||
| 29 | + Then I should see correct maintenance file rendered | ||
| 30 | + | ||
| 19 | Scenario: I navigate to doc directory to view documentation in master | 31 | Scenario: I navigate to doc directory to view documentation in master |
| 20 | And I navigate to the doc/api/README | 32 | And I navigate to the doc/api/README |
| 21 | And I see correct file rendered | 33 | And I see correct file rendered |
features/steps/project/project_markdown_render.rb
| @@ -21,6 +21,8 @@ class Spinach::Features::ProjectMarkdownRender < Spinach::FeatureSteps | @@ -21,6 +21,8 @@ class Spinach::Features::ProjectMarkdownRender < Spinach::FeatureSteps | ||
| 21 | page.should have_link "GitLab API website" | 21 | page.should have_link "GitLab API website" |
| 22 | page.should have_link "Rake tasks" | 22 | page.should have_link "Rake tasks" |
| 23 | page.should have_link "backup and restore procedure" | 23 | page.should have_link "backup and restore procedure" |
| 24 | + page.should have_link "GitLab API doc directory" | ||
| 25 | + page.should have_link "Maintenance" | ||
| 24 | end | 26 | end |
| 25 | 27 | ||
| 26 | And 'I click on Gitlab API in README' do | 28 | And 'I click on Gitlab API in README' do |
| @@ -42,6 +44,26 @@ class Spinach::Features::ProjectMarkdownRender < Spinach::FeatureSteps | @@ -42,6 +44,26 @@ class Spinach::Features::ProjectMarkdownRender < Spinach::FeatureSteps | ||
| 42 | page.should have_content "maintenance.md" | 44 | page.should have_content "maintenance.md" |
| 43 | end | 45 | end |
| 44 | 46 | ||
| 47 | + | ||
| 48 | + And 'I click on GitLab API doc directory in README' do | ||
| 49 | + click_link "GitLab API doc directory" | ||
| 50 | + end | ||
| 51 | + | ||
| 52 | + Then 'I should see correct doc/api directory rendered' do | ||
| 53 | + current_path.should == project_tree_path(@project, "master/doc/api") | ||
| 54 | + page.should have_content "README.md" | ||
| 55 | + page.should have_content "users.md" | ||
| 56 | + end | ||
| 57 | + | ||
| 58 | + And 'I click on Maintenance in README' do | ||
| 59 | + click_link "Maintenance" | ||
| 60 | + end | ||
| 61 | + | ||
| 62 | + Then 'I should see correct maintenance file rendered' do | ||
| 63 | + current_path.should == project_blob_path(@project, "doc/raketasks/maintenance.md") | ||
| 64 | + page.should have_content "bundle exec rake gitlab:env:info RAILS_ENV=production" | ||
| 65 | + end | ||
| 66 | + | ||
| 45 | And 'I navigate to the doc/api/README' do | 67 | And 'I navigate to the doc/api/README' do |
| 46 | click_link "doc" | 68 | click_link "doc" |
| 47 | click_link "api" | 69 | click_link "api" |
spec/seed_project.tar.gz
No preview for this file type