summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorskv-headless <skv-headless@yandex.ru>2014-04-15 19:02:02 +0400
committerskv-headless <skv-headless@yandex.ru>2014-04-15 19:02:02 +0400
commitd859d080942175082c1a0cf34d89c0eefd1a3c39 (patch)
tree50dc1d374da6a1563a8b4958225d937e182401c5 /features
parentcd6232187b707b0a278bd91986ec85dcfe66046f (diff)
downloadgitlab-ce-d859d080942175082c1a0cf34d89c0eefd1a3c39.tar.gz
Editing preview
Diffstat (limited to 'features')
-rw-r--r--features/project/source/browse_files.feature10
-rw-r--r--features/steps/project/browse_files.rb12
2 files changed, 22 insertions, 0 deletions
diff --git a/features/project/source/browse_files.feature b/features/project/source/browse_files.feature
index fd9a2f01a28..a204c3e10c7 100644
--- a/features/project/source/browse_files.feature
+++ b/features/project/source/browse_files.feature
@@ -29,3 +29,13 @@ Feature: Project Browse files
Given I click on "Gemfile.lock" file in repo
And I click button "edit"
Then I can edit code
+
+ @javascript
+ Scenario: I can see editing preview
+ Given I click on "Gemfile.lock" file in repo
+ And I click button "edit"
+ And I edit code
+ And I click link "Diff"
+ Then I see diff
+
+
diff --git a/features/steps/project/browse_files.rb b/features/steps/project/browse_files.rb
index 069086d5eac..7cdd1101ac5 100644
--- a/features/steps/project/browse_files.rb
+++ b/features/steps/project/browse_files.rb
@@ -41,6 +41,18 @@ class ProjectBrowseFiles < Spinach::FeatureSteps
page.evaluate_script('editor.getValue()').should == "GitlabFileEditor"
end
+ step 'I edit code' do
+ page.execute_script('editor.setValue("GitlabFileEditor")')
+ end
+
+ step 'I click link "Diff"' do
+ click_link 'Diff'
+ end
+
+ step 'I see diff' do
+ page.should have_css '.line_holder.new'
+ end
+
step 'I click on "new file" link in repo' do
click_link 'new-file-link'
end