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:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-09-04 16:47:54 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-09-04 16:47:54 +0400
commit18e4e997644aa0772153938106e4fc798a12e10f (patch)
tree5fd8c0e15471eba848bb2f26db76a327eb5958f4 /features
parentd5c569118cf3a928b3f7e77a017a0df39c2cb1f1 (diff)
parent81336bd2b52bdbee9a1199f78e7da001814fae84 (diff)
Merge branch 'sha-link' of https://github.com/cirosantilli/gitlabhq into cirosantilli-sha-link
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> Conflicts: CHANGELOG
Diffstat (limited to 'features')
-rw-r--r--features/project/source/browse_files.feature12
-rw-r--r--features/steps/project/browse_files.rb13
-rw-r--r--features/steps/shared/paths.rb6
3 files changed, 31 insertions, 0 deletions
diff --git a/features/project/source/browse_files.feature b/features/project/source/browse_files.feature
index f8934da8de5..a674800ccb8 100644
--- a/features/project/source/browse_files.feature
+++ b/features/project/source/browse_files.feature
@@ -51,3 +51,15 @@ Feature: Project Browse files
Scenario: I can browse code with Browse Code
Given I click on history link
Then I see Browse code link
+
+ # Permalink
+
+ Scenario: I click on the permalink link from a branch ref
+ Given I click on ".gitignore" file in repo
+ And I click on permalink
+ Then I am redirected to the permalink URL
+
+ Scenario: I don't see the permalink link from a SHA ref
+ Given I visit project source page for "6d394385cf567f80a8fd85055db1ab4c5295806f"
+ And I click on ".gitignore" file in repo
+ Then I don't see the permalink link
diff --git a/features/steps/project/browse_files.rb b/features/steps/project/browse_files.rb
index 6fd0c2c2ded..bd395a0d26e 100644
--- a/features/steps/project/browse_files.rb
+++ b/features/steps/project/browse_files.rb
@@ -90,4 +90,17 @@ class ProjectBrowseFiles < Spinach::FeatureSteps
page.should_not have_link 'Browse File »'
page.should_not have_link 'Browse Dir »'
end
+
+ step 'I click on permalink' do
+ click_link 'permalink'
+ end
+
+ step 'I am redirected to the permalink URL' do
+ expect(current_path).to eq(project_blob_path(
+ @project, @project.repository.commit.sha + '/.gitignore'))
+ end
+
+ step "I don't see the permalink link" do
+ expect(page).not_to have_link('permalink')
+ end
end
diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb
index 0d06383509f..276947dc060 100644
--- a/features/steps/shared/paths.rb
+++ b/features/steps/shared/paths.rb
@@ -269,6 +269,12 @@ module SharedPaths
visit project_tree_path(@project, "6d39438")
end
+ step 'I visit project source page for' \
+ ' "6d394385cf567f80a8fd85055db1ab4c5295806f"' do
+ visit project_tree_path(@project,
+ '6d394385cf567f80a8fd85055db1ab4c5295806f')
+ end
+
step 'I visit project tags page' do
visit project_tags_path(@project)
end