Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClement Ho <ClemMakesApps@gmail.com>2016-09-14 05:43:25 +0300
committerClement Ho <ClemMakesApps@gmail.com>2016-09-16 22:38:59 +0300
commita147b43dcce7da64512efed392041c37ef45851c (patch)
tree65bc121dbcc8e5c7fe3d3add1dbbcbc00859a407 /spec/features/calendar_spec.rb
parent1c2aa4f879bdcbfca6c2dd5e52ec486f9995801b (diff)
Replace contributions calendar timezone payload with dates
Diffstat (limited to 'spec/features/calendar_spec.rb')
-rw-r--r--spec/features/calendar_spec.rb39
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