2012-09-10 14:34:01 +02:00
|
|
|
class ProjectBrowseFiles < Spinach::FeatureSteps
|
2012-09-10 17:35:03 +02:00
|
|
|
include SharedAuthentication
|
|
|
|
include SharedProject
|
|
|
|
include SharedPaths
|
|
|
|
|
2012-09-10 14:34:01 +02:00
|
|
|
Then 'I should see files from repository' do
|
|
|
|
page.should have_content "app"
|
2012-10-16 00:57:15 +02:00
|
|
|
page.should have_content "history"
|
2012-09-10 14:34:01 +02:00
|
|
|
page.should have_content "Gemfile"
|
|
|
|
end
|
|
|
|
|
|
|
|
Then 'I should see files from repository for "8470d70"' do
|
2012-09-17 18:39:57 +02:00
|
|
|
current_path.should == project_tree_path(@project, "8470d70")
|
2012-09-10 14:34:01 +02:00
|
|
|
page.should have_content "app"
|
2012-10-16 00:57:15 +02:00
|
|
|
page.should have_content "history"
|
2012-09-10 14:34:01 +02:00
|
|
|
page.should have_content "Gemfile"
|
|
|
|
end
|
|
|
|
|
2013-02-21 11:27:52 +01:00
|
|
|
Given 'I click on "Gemfile.lock" file in repo' do
|
|
|
|
click_link "Gemfile.lock"
|
2012-09-10 14:34:01 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
Then 'I should see it content' do
|
2013-02-21 11:27:52 +01:00
|
|
|
page.should have_content "DEPENDENCIES"
|
2012-09-10 14:34:01 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
And 'I click link "raw"' do
|
|
|
|
click_link "raw"
|
|
|
|
end
|
|
|
|
|
|
|
|
Then 'I should see raw file content' do
|
|
|
|
page.source.should == ValidCommit::BLOB_FILE
|
|
|
|
end
|
2012-10-12 18:56:06 +02:00
|
|
|
|
2012-10-15 18:51:11 +02:00
|
|
|
Given 'I click button "edit"' do
|
|
|
|
click_link 'edit'
|
2012-10-12 18:56:06 +02:00
|
|
|
end
|
|
|
|
|
2012-10-12 19:27:50 +02:00
|
|
|
Then 'I can edit code' do
|
2012-10-12 18:56:06 +02:00
|
|
|
page.execute_script('editor.setValue("GitlabFileEditor")')
|
|
|
|
page.evaluate_script('editor.getValue()').should == "GitlabFileEditor"
|
|
|
|
end
|
|
|
|
|
2012-09-10 14:34:01 +02:00
|
|
|
end
|