diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-08-26 04:42:46 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-08-26 04:42:46 +0300 |
commit | 046b28312704f3131e72dcd2dbdacc5264d4aa62 (patch) | |
tree | a8c2b14a6e1db3b662fee2c79af70d9fcb643c2e /spec/ci/features/projects_spec.rb | |
parent | e449426a4e7d15cdd582d4f136add52cbfb5e04e (diff) |
Groundwork for merging CI into CE
Diffstat (limited to 'spec/ci/features/projects_spec.rb')
-rw-r--r-- | spec/ci/features/projects_spec.rb | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/spec/ci/features/projects_spec.rb b/spec/ci/features/projects_spec.rb new file mode 100644 index 00000000000..3f21af92a2b --- /dev/null +++ b/spec/ci/features/projects_spec.rb @@ -0,0 +1,57 @@ +require 'spec_helper' + +describe "Projects" do + before do + login_as :user + @project = FactoryGirl.create :project, name: "GitLab / gitlab-shell" + end + + describe "GET /projects", js: true do + before do + stub_js_gitlab_calls + visit projects_path + end + + it { page.should have_content "GitLab / gitlab-shell" } + it { page.should have_selector ".search input#search" } + end + + describe "GET /projects/:id" do + before do + visit project_path(@project) + end + + it { page.should have_content @project.name } + it { page.should have_content 'All commits' } + end + + describe "GET /projects/:id/edit" do + before do + visit edit_project_path(@project) + end + + it { page.should have_content @project.name } + it { page.should have_content 'Build Schedule' } + + it "updates configuration" do + fill_in 'Timeout', with: '70' + click_button 'Save changes' + + page.should have_content 'was successfully updated' + + find_field('Timeout').value.should eq '70' + end + end + + describe "GET /projects/:id/charts" do + before do + visit project_charts_path(@project) + end + + it { page.should have_content 'Overall' } + it { page.should have_content 'Builds chart for last week' } + it { page.should have_content 'Builds chart for last month' } + it { page.should have_content 'Builds chart for last year' } + it { page.should have_content 'Commit duration in minutes for last 30 commits' } + end +end |