WebEditor: spinach

This commit is contained in:
Valeriy Sizov 2012-10-12 19:56:06 +03:00
parent 42bdfd021b
commit 358d7eff7d
2 changed files with 16 additions and 0 deletions

View file

@ -19,3 +19,9 @@ Feature: Project Browse files
Given I visit blob file from repo
And I click link "raw"
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

View file

@ -31,4 +31,14 @@ class ProjectBrowseFiles < Spinach::FeatureSteps
Then 'I should see raw file content' do
page.source.should == ValidCommit::BLOB_FILE
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