diff options
author | Clement Ho <ClemMakesApps@gmail.com> | 2016-09-13 21:43:25 -0500 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2016-09-16 14:38:59 -0500 |
commit | a147b43dcce7da64512efed392041c37ef45851c (patch) | |
tree | 65bc121dbcc8e5c7fe3d3add1dbbcbc00859a407 /spec/features/calendar_spec.rb | |
parent | 1c2aa4f879bdcbfca6c2dd5e52ec486f9995801b (diff) | |
download | gitlab-ce-a147b43dcce7da64512efed392041c37ef45851c.tar.gz |
Replace contributions calendar timezone payload with dates
Diffstat (limited to 'spec/features/calendar_spec.rb')
-rw-r--r-- | spec/features/calendar_spec.rb | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/spec/features/calendar_spec.rb b/spec/features/calendar_spec.rb new file mode 100644 index 00000000000..fd5fbaf2af4 --- /dev/null +++ b/spec/features/calendar_spec.rb @@ -0,0 +1,39 @@ +require 'spec_helper' + +feature 'Contributions Calendar', js: true, feature: true do + include WaitForAjax + + let(:contributed_project) { create(:project, :public) } + + before do + login_as :user + + issue_params = { title: 'Bug in old browser' } + Issues::CreateService.new(contributed_project, @user, issue_params).execute + + # Push code contribution + push_params = { + project: contributed_project, + action: Event::PUSHED, + author_id: @user.id, + data: { commit_count: 3 } + } + + Event.create(push_params) + + visit @user.username + wait_for_ajax + end + + it 'displays calendar', js: true do + expect(page).to have_css('.js-contrib-calendar') + end + + it 'displays calendar activity log', js: true do + expect(find('.content_list .event-note')).to have_content "Bug in old browser" + end + + it 'displays calendar activity square color', js: true do + expect(page).to have_selector('.user-contrib-cell[fill=\'#acd5f2\']', count: 1) + end +end |