Commit c6b9767e74421bae7f0532ce7fab8753863e94f0

Authored by Marin Jankovski
1 parent 462161a3

Test if the views behave correctly with reference style relative links.

features/project/source/markdown_render.feature
... ... @@ -16,6 +16,18 @@ Feature: Project markdown render
16 16 And I click on Rake tasks in README
17 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 31 Scenario: I navigate to doc directory to view documentation in master
20 32 And I navigate to the doc/api/README
21 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 21 page.should have_link "GitLab API website"
22 22 page.should have_link "Rake tasks"
23 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 26 end
25 27  
26 28 And 'I click on Gitlab API in README' do
... ... @@ -42,6 +44,26 @@ class Spinach::Features::ProjectMarkdownRender < Spinach::FeatureSteps
42 44 page.should have_content "maintenance.md"
43 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 67 And 'I navigate to the doc/api/README' do
46 68 click_link "doc"
47 69 click_link "api"
... ...
spec/seed_project.tar.gz
No preview for this file type