[ARVADOS] updated: a28be6d77750a6cbded994612d95ee973cb4c01e
git at public.curoverse.com
git at public.curoverse.com
Fri Apr 25 16:51:34 EDT 2014
Summary of changes:
.../app/assets/stylesheets/collections.css.scss | 19 +++++++-
.../workbench/test/integration/collections_test.rb | 45 ++++++++++++++++++++
2 files changed, 61 insertions(+), 3 deletions(-)
create mode 100644 apps/workbench/test/integration/collections_test.rb
via a28be6d77750a6cbded994612d95ee973cb4c01e (commit)
via 58dd340f19c3e0225ad189e60a58872d3aa3f7c2 (commit)
from 1c5176d87df0dbd25db6ff1fb2ab82ae17472145 (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 a28be6d77750a6cbded994612d95ee973cb4c01e
Author: Tom Clegg <tom at curoverse.com>
Date: Fri Apr 25 16:42:40 2014 -0400
Increase contrast between active/inactive sides of toggle switch.
diff --git a/apps/workbench/app/assets/stylesheets/collections.css.scss b/apps/workbench/app/assets/stylesheets/collections.css.scss
index c21e96d..2edd683 100644
--- a/apps/workbench/app/assets/stylesheets/collections.css.scss
+++ b/apps/workbench/app/assets/stylesheets/collections.css.scss
@@ -1,3 +1,16 @@
-// Place all the styles related to the Collections controller here.
-// They will automatically be included in application.css.
-// You can use Sass (SCSS) here: http://sass-lang.com/
+/*
+ "active" and "inactive" colors are too similar for a toggle switch
+ in the default bootstrap theme.
+ */
+
+$inactive-bg: #5bc0de;
+$active-bg: #39b3d7;
+
+.btn-group[data-toggle=buttons] label {
+ background-color: lighten($inactive-bg, 15%);
+}
+
+.btn-group[data-toggle=buttons] label.active {
+ background-color: $active-bg;
+ opacity: 1;
+}
commit 58dd340f19c3e0225ad189e60a58872d3aa3f7c2
Author: Tom Clegg <tom at curoverse.com>
Date: Fri Apr 25 16:17:48 2014 -0400
Add tests for persistent/cache switch.
diff --git a/apps/workbench/test/integration/collections_test.rb b/apps/workbench/test/integration/collections_test.rb
new file mode 100644
index 0000000..2eb10d6
--- /dev/null
+++ b/apps/workbench/test/integration/collections_test.rb
@@ -0,0 +1,45 @@
+require 'integration_helper'
+require 'selenium-webdriver'
+require 'headless'
+
+class CollectionsTest < ActionDispatch::IntegrationTest
+
+ def change_persist oldstate, newstate
+ find "div[data-persistent-state='#{oldstate}']"
+ assert_raises Capybara::ElementNotFound do
+ find "div[data-persistent-state='#{newstate}']"
+ end
+ find('label', text: newstate.capitalize).click
+ find 'label.active', text: newstate.capitalize
+ find "div[data-persistent-state='#{newstate}']"
+ assert_raises Capybara::ElementNotFound do
+ find "div[data-persistent-state='#{oldstate}']"
+ end
+ end
+
+ ['/collections', '/'].each do |path|
+ test "Flip persistent switch at #{path}" do
+ Capybara.current_driver = Capybara.javascript_driver
+ uuid = api_fixture('collections')['foo_file']['uuid']
+ visit page_with_token('active', path)
+ within "tr[data-object-uuid='#{uuid}']" do
+ change_persist 'cache', 'persistent'
+ end
+ # Refresh page and make sure the change was committed.
+ visit current_path
+ within "tr[data-object-uuid='#{uuid}']" do
+ change_persist 'persistent', 'cache'
+ end
+ end
+ end
+
+ test 'Flip persistent switch on collection#show' do
+ Capybara.current_driver = Capybara.javascript_driver
+ uuid = api_fixture('collections')['foo_file']['uuid']
+ visit page_with_token('active', "/collections/#{uuid}")
+ change_persist 'cache', 'persistent'
+ visit current_path
+ change_persist 'persistent', 'cache'
+ end
+
+end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list