summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-10-12 21:43:24 -0700
committerStan Hu <stanhu@gmail.com>2015-10-12 22:24:19 -0700
commitd02d02c672bcac0d2ef46204d132645bc69827a8 (patch)
treec0052740b3617bcba60174238f93f1ea108f6709 /features
parente12b6f30efef3f607cacc5da51f8c49c3be4643a (diff)
downloadgitlab-ce-d02d02c672bcac0d2ef46204d132645bc69827a8.tar.gz
Fix error preventing displaying of commit data for a directory with a leading dot
Closes https://github.com/gitlabhq/gitlabhq/issues/8763
Diffstat (limited to 'features')
-rw-r--r--features/project/source/browse_files.feature6
-rw-r--r--features/steps/project/source/browse_files.rb13
2 files changed, 19 insertions, 0 deletions
diff --git a/features/project/source/browse_files.feature b/features/project/source/browse_files.feature
index 377c5e1a9a7..6b0484b6a38 100644
--- a/features/project/source/browse_files.feature
+++ b/features/project/source/browse_files.feature
@@ -205,3 +205,9 @@ Feature: Project Source Browse Files
And I see the ref 'test' has been selected
And I visit the 'test' tree
Then I see the commit data
+
+ @javascript
+ Scenario: I browse code with a leading dot in the directory
+ Given I switch ref to fix
+ And I visit the fix tree
+ Then I see the commit data for a directory with a leading dot
diff --git a/features/steps/project/source/browse_files.rb b/features/steps/project/source/browse_files.rb
index cb100ca0f54..1b27500497a 100644
--- a/features/steps/project/source/browse_files.rb
+++ b/features/steps/project/source/browse_files.rb
@@ -286,6 +286,10 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
select "'test'", from: 'ref'
end
+ step "I switch ref to fix" do
+ select "fix", from: 'ref'
+ end
+
step "I see the ref 'test' has been selected" do
expect(page).to have_selector '.select2-chosen', text: "'test'"
end
@@ -294,11 +298,20 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
visit namespace_project_tree_path(@project.namespace, @project, "'test'")
end
+ step "I visit the fix tree" do
+ visit namespace_project_tree_path(@project.namespace, @project, "fix/.testdir")
+ end
+
step 'I see the commit data' do
expect(page).to have_css('.tree-commit-link', visible: true)
expect(page).not_to have_content('Loading commit data...')
end
+ step 'I see the commit data for a directory with a leading dot' do
+ expect(page).to have_css('.tree-commit-link', visible: true)
+ expect(page).not_to have_content('Loading commit data...')
+ end
+
private
def set_new_content