diff options
author | Valeriy Sizov <vsv2711@gmail.com> | 2012-10-12 20:56:06 +0400 |
---|---|---|
committer | Valeriy Sizov <vsv2711@gmail.com> | 2012-10-12 21:07:24 +0400 |
commit | 358d7eff7d1f4b7a3150d38d9dbe03fe02491ae2 (patch) | |
tree | 777236572ad99a20823fc4bb35fafabe6e638cc5 /features | |
parent | 42bdfd021ba8cc8b634a23e3c5c2ac605f4c602c (diff) |
WebEditor: spinach
Diffstat (limited to 'features')
-rw-r--r-- | features/project/source/browse_files.feature | 6 | ||||
-rw-r--r-- | features/steps/project/project_browse_files.rb | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/features/project/source/browse_files.feature b/features/project/source/browse_files.feature index b12b0ee3e36..9a635fa6bbd 100644 --- a/features/project/source/browse_files.feature +++ b/features/project/source/browse_files.feature @@ -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 diff --git a/features/steps/project/project_browse_files.rb b/features/steps/project/project_browse_files.rb index 652daba01c0..17b81a6f7e3 100644 --- a/features/steps/project/project_browse_files.rb +++ b/features/steps/project/project_browse_files.rb @@ -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 |