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