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] [10/50] Commit e7a5967: get navigation working
Date Fri, 22 Jan 2016 02:40:53 GMT
Commit e7a5967c483570257961cc3007daa2f22c0d8187:
    get navigation working


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

------------------------------------------------------------
spec/navigate_spec.rb                                        | ++++++++++++++ 
------------------------------------------------------------
27 changes: 27 additions, 0 deletions.
------------------------------------------------------------


diff --git a/spec/navigate_spec.rb b/spec/navigate_spec.rb
new file mode 100644
index 0000000..3ae309c
--- /dev/null
+++ b/spec/navigate_spec.rb
@@ -0,0 +1,27 @@
+require_relative 'spec_helper'
+
+feature 'navigation', js: true do
+  it "should navigate to the Executive Vice President report" do
+    visit '/2014-02-19/Secretary'
+    expect(page).to have_selector '.navbar-fixed-top .navbar-brand', 
+      text: 'Secretary'
+
+    find('body').native.send_keys(:Right)
+    expect(page).to have_selector '.navbar-fixed-top .navbar-brand', 
+      text: 'Executive Vice President'
+    expect(page).to have_selector 'pre', text: /venues in Europe/
+    expect(page).to have_selector '.backlink[href="Secretary"]', 
+     text: 'Secretary'
+    expect(page).to have_selector '.nextlink[href="Vice-Chairman"]', 
+     text: 'Vice Chairman'
+
+    page.evaluate_script('window.history.back()')
+    expect(page).to have_selector '.navbar-fixed-top .navbar-brand', 
+      text: 'Secretary'
+    expect(page).to have_selector 'pre', text: /December doldrums/
+    expect(page).to have_selector '.backlink[href="Treasurer"]', 
+     text: 'Treasurer'
+    expect(page).to have_selector '.nextlink[href="Executive-Vice-President"]', 
+     text: 'Executive Vice President'
+  end
+end

Mime
View raw message