[ARVADOS] updated: 862a1fd23f072b7107595755996fc2ec1c62162b

git at public.curoverse.com git at public.curoverse.com
Thu Aug 7 09:09:24 EDT 2014


Summary of changes:
 apps/workbench/app/views/application/_choose.html.erb |  6 ++++--
 apps/workbench/test/integration/projects_test.rb      | 12 +++++++++---
 2 files changed, 13 insertions(+), 5 deletions(-)

       via  862a1fd23f072b7107595755996fc2ec1c62162b (commit)
      from  572400db0f322f365e2bf6849ceebc432a69191a (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 862a1fd23f072b7107595755996fc2ec1c62162b
Author: Brett Smith <brett at curoverse.com>
Date:   Thu Aug 7 09:10:31 2014 -0400

    Re-disable preview pane in project sharing popup.
    
    This was the original behavior, but was lost in a later merge.
    No issue #.

diff --git a/apps/workbench/app/views/application/_choose.html.erb b/apps/workbench/app/views/application/_choose.html.erb
index 37382df..3ef552c 100644
--- a/apps/workbench/app/views/application/_choose.html.erb
+++ b/apps/workbench/app/views/application/_choose.html.erb
@@ -36,10 +36,10 @@
         </div>
         <div style="height: 1em" />
 
-        <% preview_pane = (params[:preview_pane] != "false")
+        <% preview_pane = (params[:preview_pane].to_s != "false")
            pane_col_class = preview_pane ? "col-sm-6" : "" %>
         <div class="row" style="height: 20em">
-	  <div class="col-sm-6 container arv-filterable-list selectable-container <%= 'multiple' if multiple %>"
+	  <div class="<%= pane_col_class %> container arv-filterable-list selectable-container <%= 'multiple' if multiple %>"
 	       style="height: 100%; overflow-y: scroll"
 	       data-infinite-scroller="#choose-scroll"
 	       id="choose-scroll"
@@ -47,8 +47,10 @@
 	       data-infinite-content-href0="<%= url_for partial: true %>">
 	    <%= render partial: 'choose_rows' %>
 	  </div>
+          <% if preview_pane %>
           <div class="col-sm-6 modal-dialog-preview-pane" style="height: 100%; overflow-y: scroll">
           </div>
+          <% end %>
         </div>
 
         <div class="modal-footer">
diff --git a/apps/workbench/test/integration/projects_test.rb b/apps/workbench/test/integration/projects_test.rb
index 9b5e65d..38d4063 100644
--- a/apps/workbench/test/integration/projects_test.rb
+++ b/apps/workbench/test/integration/projects_test.rb
@@ -97,14 +97,20 @@ class ProjectsTest < ActionDispatch::IntegrationTest
     assert(page.has_no_text?(name), "project is already shared with #{name}")
     start_share_count = share_rows.size
     click_on("Share with #{share_type}")
-    within("div.modal-container") do
+    within(".modal-container") do
+      # Order is important here: we should find something that appears in the
+      # modal before we make any assertions about what's not in the modal.
+      # Otherwise, the not-included assertions might falsely pass because
+      # the modal hasn't loaded yet.
+      find(".selectable", text: name).click
+      assert(has_no_selector?(".modal-dialog-preview-pane"),
+             "preview pane available in sharing dialog")
       assert_raises(Capybara::ElementNotFound,
                     "Projects pulldown available from sharing dialog") do
         click_on "All projects"
       end
+      click_on "Add"
     end
-    find(".selectable", text: name).click
-    find(".modal-footer a,button", text: "Add").click
     using_wait_time(Capybara.default_wait_time * 3) do
       assert(page.has_link?(name),
              "new share was not added to sharing table")

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list