You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2018/04/22 18:24:44 UTC
[whimsy] branch master updated: don't show pending updates unless
they are for this agenda
This is an automated email from the ASF dual-hosted git repository.
rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new f7bd326 don't show pending updates unless they are for this agenda
f7bd326 is described below
commit f7bd326b3e8802bf8e5b5d42a39cf1b6199bbf19
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Sun Apr 22 14:24:16 2018 -0400
don't show pending updates unless they are for this agenda
---
www/board/agenda/spec/index_spec.rb | 24 ++++++++++++++++++++----
www/board/agenda/spec/other_views_spec.rb | 22 +++++++++-------------
www/board/agenda/views/models/pending.js.rb | 12 ++++++++++--
3 files changed, 39 insertions(+), 19 deletions(-)
diff --git a/www/board/agenda/spec/index_spec.rb b/www/board/agenda/spec/index_spec.rb
index 0264671..b3c7a10 100644
--- a/www/board/agenda/spec/index_spec.rb
+++ b/www/board/agenda/spec/index_spec.rb
@@ -5,14 +5,13 @@
require_relative 'spec_helper'
feature 'index' do
- it "should show an index page" do
+ it "should show an index page - without an index page" do
visit '/2015-02-18/'
# header
expect(page).to have_selector '.navbar-fixed-top.blank .navbar-brand',
text: '2015-02-18'
- expect(page).to have_selector '.navbar-fixed-top .label-danger a',
- text: '5'
+ expect(page).not_to have_selector '.navbar-fixed-top .label-danger a'
expect(page).to have_selector '#agenda', text: 'Agenda'
# navigation
@@ -21,7 +20,6 @@ feature 'index' do
# rows with colors and titles
expect(page).to have_selector 'tr.missing td', text: 'Abdera'
- expect(page).to have_selector 'tr.commented td', text: 'Axis'
expect(page).to have_selector 'tr.reviewed td', text: 'Buildr'
expect(page).to have_selector 'tr.reviewed td', text: 'Celix'
expect(page).to have_selector 'tr.commented td', text: 'Lenya'
@@ -48,6 +46,24 @@ feature 'index' do
text: 'Select Item Type'
end
+ it "should show an index page - with pending changes" do
+ visit '/2015-01-21/'
+
+ # header
+ expect(page).to have_selector '.navbar-fixed-top.blank .navbar-brand',
+ text: '2015-01-21'
+ expect(page).to have_selector '.navbar-fixed-top .label-danger a',
+ text: '5'
+
+ # footer
+ expect(page).to have_selector '.nextlink[href="../2015-02-18/"]',
+ text: '2015-02-18'
+ expect(page).to have_selector 'button', text: 'refresh'
+ expect(page).to have_selector 'button', text: 'add item'
+ expect(page).to have_selector '.backlink[href="help"]', text: 'Help'
+ end
+
+
it "should show a summary" do
visit '/2015-02-18/'
diff --git a/www/board/agenda/spec/other_views_spec.rb b/www/board/agenda/spec/other_views_spec.rb
index e225252..00a0196 100644
--- a/www/board/agenda/spec/other_views_spec.rb
+++ b/www/board/agenda/spec/other_views_spec.rb
@@ -30,25 +30,25 @@ feature 'other reports' do
end
it "should support queued/pending approvals and comments" do
- visit '/2015-02-18/queue'
+ visit '/2015-01-21/queue'
expect(page).to have_selector :xpath,
'//p[1]/a[@href="queue/W3C-Relations"]', text: 'W3C Relations'
expect(page).to have_selector :xpath,
'//p[2]/a[@href="Security-Team"]', text: 'Security Team'
expect(page).to have_selector :xpath,
- '//p[3]/a[@href="Axis"]', text: 'Axis'
+ '//p[3]/a[@href="Attic"]', text: 'Attic'
expect(page).to have_selector :xpath,
- '//p[4]/a[@href="queue/Celix"]', text: 'Celix'
- expect(page).to have_selector 'a.default', text: 'January 21, 2015'
- expect(page).to have_selector 'dt a[href="BookKeeper"]', text: 'BookKeeper'
+ '//p[4]/a[@href="queue/Avro"]', text: 'Avro'
+ expect(page).to have_selector 'a.default', text: 'Legal Affairs'
+ expect(page).to have_selector 'dt a[href="Avro"]', text: 'Avro'
expect(page).to have_selector 'dd p', text: 'Nice report!'
expect(page).to have_selector 'li',
text: 'follow up with PMC for clarification'
expect(page).to have_selector '#commit-text', text:
- ['Approve W3C Relations', 'Unapprove Security Team', 'Flag Axis',
- 'Comment on BookKeeper',
+ ['Approve W3C Relations', 'Unapprove Security Team', 'Flag Attic',
+ 'Comment on Avro',
'Update AI: follow up with PMC for clarification'].join(' ')
end
@@ -167,13 +167,9 @@ feature 'other reports' do
it "should show flagged items" do
visit '/2015-02-18/flagged'
- expect(page).to have_selector 'h3 a', text: 'Axis'
- expect(page).to have_selector 'h4', text: 'Comments'
- expect(page).to have_selector 'pre span', text: 'jj: Reminder email sent'
- expect(page).to have_selector 'h4', text: 'Minutes'
- expect(page).to have_selector 'pre', text: '@Sam: follow up with Axis PMC.'
-
expect(page).to have_selector 'h3 a', text: 'Lenya'
+ expect(page).to have_selector 'h4', text: 'Comments'
+ expect(page).to have_selector 'pre span', text: 'rg: Last quarter'
end
it "should show missing items" do
diff --git a/www/board/agenda/views/models/pending.js.rb b/www/board/agenda/views/models/pending.js.rb
index 1df50f2..f60d824 100644
--- a/www/board/agenda/views/models/pending.js.rb
+++ b/www/board/agenda/views/models/pending.js.rb
@@ -45,7 +45,7 @@ class Pending
end
def self.count
- return 0 unless Server.pending
+ return 0 unless Server.pending and Agenda.file == Server.pending.agenda
self.comments.keys().length +
self.approved.length +
self.unapproved.length +
@@ -55,35 +55,43 @@ class Pending
end
def self.comments
- (Server.pending && Server.pending.comments) || {}
+ return {} unless Server.pending and Agenda.file == Server.pending.agenda
+ Server.pending.comments || {}
end
def self.approved
+ return [] unless Server.pending and Agenda.file == Server.pending.agenda
Server.pending.approved || []
end
def self.unapproved
+ return [] unless Server.pending and Agenda.file == Server.pending.agenda
Server.pending.unapproved || []
end
def self.flagged
+ return [] unless Server.pending and Agenda.file == Server.pending.agenda
Server.pending.flagged || []
end
def self.unflagged
+ return [] unless Server.pending and Agenda.file == Server.pending.agenda
Server.pending.unflagged || []
end
def self.seen
+ return {} unless Server.pending and Agenda.file == Server.pending.agenda
Server.pending.seen || {}
end
def self.status
+ return [] unless Server.pending and Agenda.file == Server.pending.agenda
Server.pending.status || []
end
# find a pending status update that matches a given action item
def self.find_status(action)
+ return nil unless Server.pending and Agenda.file == Server.pending.agenda
match = nil
Pending.status.each do |status|
--
To stop receiving notification emails like this one, please contact
rubys@apache.org.