Commit 358d7eff authored by Valeriy Sizov's avatar Valeriy Sizov

WebEditor: spinach

parent 42bdfd02
...@@ -19,3 +19,9 @@ Feature: Project Browse files ...@@ -19,3 +19,9 @@ Feature: Project Browse files
Given I visit blob file from repo Given I visit blob file from repo
And I click link "raw" And I click link "raw"
Then I should see raw file content Then I should see raw file content
@javascript
Scenario: I can edit file
Given I click on "Gemfile" file in repo
And I click button "Edit"
Then I can edit file
...@@ -31,4 +31,14 @@ class ProjectBrowseFiles < Spinach::FeatureSteps ...@@ -31,4 +31,14 @@ class ProjectBrowseFiles < Spinach::FeatureSteps
Then 'I should see raw file content' do Then 'I should see raw file content' do
page.source.should == ValidCommit::BLOB_FILE page.source.should == ValidCommit::BLOB_FILE
end end
Given 'I click button "Edit"' do
click_link 'Edit'
end
Given 'I can edit file' do
page.execute_script('editor.setValue("GitlabFileEditor")')
page.evaluate_script('editor.getValue()').should == "GitlabFileEditor"
end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment