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:
authorStan Hu <stanhu@gmail.com>2015-09-15 16:58:49 +0300
committerStan Hu <stanhu@gmail.com>2015-09-15 23:07:32 +0300
commitd9af6f79ed439308d13f44a0cfade6a355607f14 (patch)
tree99ea6028fee1cf0b506fc9aacd810daa1ad1b326 /features
parent0a8ef29b3d2504ba66cd0a98992c1f5f70b11daa (diff)
Change the replace placeholder to use the filename
Dynamically adjust placedholder for uploads and fix Dropzone event handlers Override error handler to prevent error messages from being inserted underneath image preview Fix tests Use regexp instead of startsWith for better browser compatibility Remove duplicate code in _replace.html.haml and use one template Remove files upon error and retain alert messages until user adds a new file
Diffstat (limited to 'features')
-rw-r--r--features/project/source/browse_files.feature6
-rw-r--r--features/steps/project/source/browse_files.rb10
2 files changed, 8 insertions, 8 deletions
diff --git a/features/project/source/browse_files.feature b/features/project/source/browse_files.feature
index b5b6abe6aff..58574166ef3 100644
--- a/features/project/source/browse_files.feature
+++ b/features/project/source/browse_files.feature
@@ -33,13 +33,13 @@ Feature: Project Source Browse Files
And I click on "Commit Changes"
Then I am redirected to the new file
And I should see its new content
-
+
@javascript
Scenario: I can upload file and commit
Given I click on "new file" link in repo
Then I can see new file page
- And I can see "upload existing one"
- And I click on "upload existing one"
+ And I can see "upload an existing one"
+ And I click on "upload"
And I upload a new text file
And I fill the upload file commit message
And I click on "Upload file"
diff --git a/features/steps/project/source/browse_files.rb b/features/steps/project/source/browse_files.rb
index 7a0ee4df45e..a1a49dd58a6 100644
--- a/features/steps/project/source/browse_files.rb
+++ b/features/steps/project/source/browse_files.rb
@@ -119,12 +119,12 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
expect(page).to have_content "Commit message"
end
- step 'I can see "upload existing one"' do
- expect(page).to have_content "upload existing one"
+ step 'I can see "upload an existing one"' do
+ expect(page).to have_content "upload an existing one"
end
- step 'I click on "upload existing one"' do
- click_link 'upload existing one'
+ step 'I click on "upload"' do
+ click_link 'upload'
end
step 'I click on "Upload file"' do
@@ -150,7 +150,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
end
step 'I fill the replace file commit message' do
- page.within('#modal-replace-blob') do
+ page.within('#modal-upload-blob') do
fill_in :commit_message, with: 'Replacement file commit message'
end
end