summaryrefslogtreecommitdiff
path: root/features/steps/project/source/browse_files.rb
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2015-12-14 18:14:07 -0200
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2015-12-14 18:22:28 -0200
commit5afe03315d12d1379c31a87a02fc9d9b6952f539 (patch)
tree180f790d751940e912a7b53ae925bf282aee3429 /features/steps/project/source/browse_files.rb
parentb95f7b1864672b873501792775521a6bd6393520 (diff)
downloadgitlab-ce-5afe03315d12d1379c31a87a02fc9d9b6952f539.tar.gz
Preserve trailing new lines at the end of file on the online editor
Because Haml automatically indents the HTML source code, the contents of whitespace-sensitive tags like pre and textarea can get screwed up.
Diffstat (limited to 'features/steps/project/source/browse_files.rb')
-rw-r--r--features/steps/project/source/browse_files.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/features/steps/project/source/browse_files.rb b/features/steps/project/source/browse_files.rb
index f2b95764267..b88709620ab 100644
--- a/features/steps/project/source/browse_files.rb
+++ b/features/steps/project/source/browse_files.rb
@@ -37,6 +37,10 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
expect(page).to have_content new_gitignore_content
end
+ step 'I should see its content with new lines preserved at end of file' do
+ expect(evaluate_script('blob.editor.getValue()')).to eq "Sample\n\n\n"
+ end
+
step 'I click link "Raw"' do
click_link 'Raw'
end
@@ -62,6 +66,10 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
set_new_content
end
+ step 'I edit code with new lines at end of file' do
+ execute_script('blob.editor.setValue("Sample\n\n\n")')
+ end
+
step 'I fill the new file name' do
fill_in :file_name, with: new_file_name
end