[ARVADOS] updated: 2d0dd74fb0446f8cda195147d45a6ab4ca0e2431

git at public.curoverse.com git at public.curoverse.com
Tue Mar 10 14:58:57 EDT 2015


Summary of changes:
 apps/workbench/test/integration/ajax_errors_test.rb | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

       via  2d0dd74fb0446f8cda195147d45a6ab4ca0e2431 (commit)
      from  bc25cf11db28299cfb3cce8d51e253c4d7b6b7c1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 2d0dd74fb0446f8cda195147d45a6ab4ca0e2431
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Mar 10 14:50:14 2015 -0400

    5105: Clarify "no double-layout" asserts. Remove redundant "not on welcome page" asserts.

diff --git a/apps/workbench/test/integration/ajax_errors_test.rb b/apps/workbench/test/integration/ajax_errors_test.rb
index f1c33fa..14ce35d 100644
--- a/apps/workbench/test/integration/ajax_errors_test.rb
+++ b/apps/workbench/test/integration/ajax_errors_test.rb
@@ -14,9 +14,8 @@ class AjaxErrorsTest < ActionDispatch::IntegrationTest
     ActionDispatch::Request::Session.any_instance.stubs(:[]).returns(nil)
     click_link "Subprojects"
     wait_for_ajax
-    assert_no_selector '.container-fluid .container-fluid'
-    assert_no_text 'If you have never used'
-    assert_text 'Reload tab'
+    assert_no_double_layout
+    assert_selector 'a,button', text: 'Reload tab'
     assert_selector '.pane-error-display'
     page.driver.browser.switch_to.frame 0
     assert_text 'You are not logged in.'
@@ -37,11 +36,21 @@ class AjaxErrorsTest < ActionDispatch::IntegrationTest
     end
     click_link "Subprojects"
     wait_for_ajax
-    assert_no_selector '.container-fluid .container-fluid'
-    assert_no_text 'If you have never used'
-    assert_text 'Reload tab'
+    assert_no_double_layout
+    assert_selector 'a,button', text: 'Reload tab'
     assert_selector '.pane-error-display'
     page.driver.browser.switch_to.frame 0
     assert_text 'You are not logged in.'
   end
+
+  protected
+
+  def assert_no_double_layout
+    # Check we're not rendering a full page layout within a tab
+    # pane. Bootstrap responsive layouts require exactly one
+    # div.container-fluid. Checking "body body" would be more generic,
+    # but doesn't work when the browser/driver automatically collapses
+    # syntatically invalid tags.
+    assert_no_selector '.container-fluid .container-fluid'
+  end
 end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list