diff options
author | Stan Hu <stanhu@gmail.com> | 2015-09-15 06:58:49 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-09-15 13:07:32 -0700 |
commit | d9af6f79ed439308d13f44a0cfade6a355607f14 (patch) | |
tree | 99ea6028fee1cf0b506fc9aacd810daa1ad1b326 /features | |
parent | 0a8ef29b3d2504ba66cd0a98992c1f5f70b11daa (diff) | |
download | gitlab-ce-d9af6f79ed439308d13f44a0cfade6a355607f14.tar.gz |
Change the replace placeholder to use the filenamefix-upload-ui
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.feature | 6 | ||||
-rw-r--r-- | features/steps/project/source/browse_files.rb | 10 |
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 |