Commit 358d7eff7d1f4b7a3150d38d9dbe03fe02491ae2

Authored by Valeriy Sizov
1 parent 42bdfd02

WebEditor: spinach

features/project/source/browse_files.feature
... ... @@ -19,3 +19,9 @@ Feature: Project Browse files
19 19 Given I visit blob file from repo
20 20 And I click link "raw"
21 21 Then I should see raw file content
  22 +
  23 + @javascript
  24 + Scenario: I can edit file
  25 + Given I click on "Gemfile" file in repo
  26 + And I click button "Edit"
  27 + Then I can edit file
... ...
features/steps/project/project_browse_files.rb
... ... @@ -31,4 +31,14 @@ class ProjectBrowseFiles < Spinach::FeatureSteps
31 31 Then 'I should see raw file content' do
32 32 page.source.should == ValidCommit::BLOB_FILE
33 33 end
  34 +
  35 + Given 'I click button "Edit"' do
  36 + click_link 'Edit'
  37 + end
  38 +
  39 + Given 'I can edit file' do
  40 + page.execute_script('editor.setValue("GitlabFileEditor")')
  41 + page.evaluate_script('editor.getValue()').should == "GitlabFileEditor"
  42 + end
  43 +
34 44 end
... ...