Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarin Jankovski <marin@gitlab.com>2014-07-09 12:12:02 +0400
committerMarin Jankovski <marin@gitlab.com>2014-07-09 12:12:09 +0400
commit91e01275cb7c63e8f101c016d83f725d0e7e6cb9 (patch)
tree48efe0aec7b09ea58de11fed86aa08b647de60e6 /features
parent6b121aa5a7d2a02bf758c13cb9b5ef9845700b08 (diff)
Add tests to check for correct browse link name.
Diffstat (limited to 'features')
-rw-r--r--features/project/source/browse_files.feature14
-rw-r--r--features/steps/project/browse_files.rb28
2 files changed, 41 insertions, 1 deletions
diff --git a/features/project/source/browse_files.feature b/features/project/source/browse_files.feature
index a204c3e10c7..4af2cc83581 100644
--- a/features/project/source/browse_files.feature
+++ b/features/project/source/browse_files.feature
@@ -38,4 +38,16 @@ Feature: Project Browse files
And I click link "Diff"
Then I see diff
-
+ Scenario: I can browse directory with Browse Dir
+ Given I click on app directory
+ And I click on history link
+ Then I see Browse dir link
+
+ Scenario: I can browse file with Browse File
+ Given I click on readme file
+ And I click on history link
+ Then I see Browse file link
+
+ Scenario: I can browse code with Browse Code
+ Given I click on history link
+ Then I see Browse code link
diff --git a/features/steps/project/browse_files.rb b/features/steps/project/browse_files.rb
index 7cdd1101ac5..7134050da69 100644
--- a/features/steps/project/browse_files.rb
+++ b/features/steps/project/browse_files.rb
@@ -62,4 +62,32 @@ class ProjectBrowseFiles < Spinach::FeatureSteps
page.should have_content "File name"
page.should have_content "Commit message"
end
+
+ step 'I click on app directory' do
+ click_link 'app'
+ end
+
+ step 'I click on history link' do
+ click_link 'history'
+ end
+
+ step 'I see Browse dir link' do
+ page.should have_link 'Browse Dir »'
+ page.should_not have_link 'Browse Code »'
+ end
+
+ step 'I click on readme file' do
+ click_link 'README.md'
+ end
+
+ step 'I see Browse file link' do
+ page.should have_link 'Browse File »'
+ page.should_not have_link 'Browse Code »'
+ end
+
+ step 'I see Browse code link' do
+ page.should have_link 'Browse Code »'
+ page.should_not have_link 'Browse File »'
+ page.should_not have_link 'Browse Dir »'
+ end
end