Commit 65cb51af authored by Marin Jankovski's avatar Marin Jankovski

Add a feature for readme on project show page.

parent 49157242
...@@ -27,7 +27,6 @@ Feature: Project Feature ...@@ -27,7 +27,6 @@ Feature: Project Feature
Scenario: I should see project readme and version Scenario: I should see project readme and version
When I visit project "Shop" page When I visit project "Shop" page
Then I should see project "Shop" README link
And I should see project "Shop" version And I should see project "Shop" version
Scenario: I should change project default branch Scenario: I should change project default branch
...@@ -35,3 +34,11 @@ Feature: Project Feature ...@@ -35,3 +34,11 @@ Feature: Project Feature
And change project default branch And change project default branch
And I save project And I save project
Then I should see project default branch changed Then I should see project default branch changed
@javascript
Scenario: I should have default tab per my preference
And I own project "Forum"
When I select project "Forum" README tab
Then I should see project "Forum" README
And I visit project "Shop" page
Then I should see project "Shop" README
...@@ -25,12 +25,6 @@ class Spinach::Features::ProjectFeature < Spinach::FeatureSteps ...@@ -25,12 +25,6 @@ class Spinach::Features::ProjectFeature < Spinach::FeatureSteps
project.path.should == "new-path" project.path.should == "new-path"
end end
step 'I should see project "Shop" README link' do
within '.project-side' do
page.should have_content "README.md"
end
end
step 'I should see project "Shop" version' do step 'I should see project "Shop" version' do
within '.project-side' do within '.project-side' do
page.should have_content "Version: 6.7.0.pre" page.should have_content "Version: 6.7.0.pre"
...@@ -45,4 +39,18 @@ class Spinach::Features::ProjectFeature < Spinach::FeatureSteps ...@@ -45,4 +39,18 @@ class Spinach::Features::ProjectFeature < Spinach::FeatureSteps
step 'I should see project default branch changed' do step 'I should see project default branch changed' do
find(:css, 'select#project_default_branch').value.should == 'fix' find(:css, 'select#project_default_branch').value.should == 'fix'
end end
step 'I select project "Forum" README tab' do
click_link 'Readme'
end
step 'I should see project "Forum" README' do
page.should have_link "README.md"
page.should have_content "Sample repo for testing gitlab features"
end
step 'I should see project "Shop" README' do
page.should have_link "README.md"
page.should have_content "testme"
end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment