whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Ruby <ru...@apache.org>
Subject [whimsy.git] [18/50] Commit 0adecb1: Missing reports
Date Fri, 22 Jan 2016 02:40:54 GMT
Commit 0adecb1a8ffcafd64a4142e24a063dce5740902f:
    Missing reports


Branch: refs/heads/master
Author: Sam Ruby <rubys@intertwingly.net>
Committer: Sam Ruby <rubys@intertwingly.net>
Pusher: rubys <rubys@apache.org>

------------------------------------------------------------
spec/report_spec.rb                                          | +++++ ---
views/agenda.js.rb                                           | + -
views/header.js.rb                                           | + -
views/report.js.rb                                           | +++++++++ -
------------------------------------------------------------
45 changes: 31 additions, 14 deletions.
------------------------------------------------------------


diff --git a/spec/report_spec.rb b/spec/report_spec.rb
index 3b04f1f..3ec259f 100644
--- a/spec/report_spec.rb
+++ b/spec/report_spec.rb
@@ -5,24 +5,33 @@
 require_relative 'spec_helper'
 
 feature 'report' do
-  it "should show the Secretary report" do
-    visit '/2015-01-21/Secretary'
+  it "should show the Avro report" do
+    visit '/2015-01-21/Avro'
 
     # header
-    expect(page).to have_selector '.navbar-fixed-top.available .navbar-brand', 
-      text: 'Secretary'
+    expect(page).to have_selector '.navbar-fixed-top.reviewed .navbar-brand', 
+      text: 'Avro'
 
     # info
-    expect(page).to have_selector 'dd', text: '4D'
-    expect(page).to have_selector 'dd', text: 'Craig'
+    expect(page).to have_selector 'dd', text: 'I'
+    expect(page).to have_selector 'dd', text: 'Tom White'
+    expect(page).to have_selector 'dd', text: 'Chris'
+    expect(page).to have_selector 'dd', text: /, sr,/
 
     # content
-    expect(page).to have_selector 'pre', text: /is running well/
+    expect(page).to have_selector 'pre', 
+      text: /no issues that require the board's attention/
 
     # footer
-    expect(page).to have_selector '.backlink[href="Treasurer"]', 
-     text: 'Treasurer'
-    expect(page).to have_selector '.nextlink[href="Executive-Vice-President"]', 
-     text: 'Executive Vice President'
+    expect(page).to have_selector '.backlink[href="Attic"]', 
+     text: 'Attic'
+    expect(page).to have_selector '.nextlink[href="Axis"]', 
+     text: 'Axis'
+  end
+
+  it "should show missing reports" do
+    visit '/2015-02-18/Abdera'
+    expect(page).to have_selector 'pre em', text: 'Missing'
+    expect(page).not_to have_selector 'dt', text: 'Approved'
   end
 end
diff --git a/views/agenda.js.rb b/views/agenda.js.rb
index b0a9b49..1850ac3 100644
--- a/views/agenda.js.rb
+++ b/views/agenda.js.rb
@@ -33,7 +33,7 @@ def initialize(entry)
   end
 
   attr_reader :attach, :title, :owner, :shepherd, :index
-  attr_reader :approved, :roster, :prior_reports
+  attr_reader :approved, :roster, :prior_reports, :missing
 
   def href
     @title.gsub(/[^a-zA-Z0-9]+/, '-')
diff --git a/views/header.js.rb b/views/header.js.rb
index 2c45b9c..cd5e626 100644
--- a/views/header.js.rb
+++ b/views/header.js.rb
@@ -31,7 +31,7 @@ def render
                 _dd @@item.shepherd
               end
 
-              if @@item.approved # and not @@item.approved.empty?
+              if @@item.approved and not @@item.approved.empty?
                 _dt 'Approved'
                 _dd @@item.approved.join(', ')
               end
diff --git a/views/report.js.rb b/views/report.js.rb
index 3570e2e..4c3bbb3 100644
--- a/views/report.js.rb
+++ b/views/report.js.rb
@@ -1,5 +1,13 @@
 class Report < React
   def render
-    _pre @@data.text
+    _section.flexbox do
+      if @@data.missing
+        _pre.report do
+          _em 'Missing'
+        end
+      else
+        _pre @@data.text
+      end
+    end
   end
 end

Mime
View raw message