WebEditor: spinach
This commit is contained in:
parent
42bdfd021b
commit
358d7eff7d
|
@ -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
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue