[ARVADOS] updated: 4108d902330bb04a70885f316700cf1da9e7d920
git at public.curoverse.com
git at public.curoverse.com
Tue Mar 31 10:10:07 EDT 2015
Summary of changes:
.../views/application/_getting_started_shown.html.erb | 9 ---------
apps/workbench/app/views/layouts/body.html.erb | 6 +++++-
.../test/integration/application_layout_test.rb | 19 +++++++++++++++++++
3 files changed, 24 insertions(+), 10 deletions(-)
delete mode 100644 apps/workbench/app/views/application/_getting_started_shown.html.erb
via 4108d902330bb04a70885f316700cf1da9e7d920 (commit)
from 15303f9cf99f00ccdef948e5ce593d9a3a88d21a (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 4108d902330bb04a70885f316700cf1da9e7d920
Author: Radhika Chippada <radhika at curoverse.com>
Date: Tue Mar 31 09:55:59 2015 -0400
5493: improve test to verify Next button disables when last page is accessed
diff --git a/apps/workbench/app/views/application/_getting_started_shown.html.erb b/apps/workbench/app/views/application/_getting_started_shown.html.erb
deleted file mode 100644
index bbf2314..0000000
--- a/apps/workbench/app/views/application/_getting_started_shown.html.erb
+++ /dev/null
@@ -1,9 +0,0 @@
-<%
- if current_user
- prefs = current_user.prefs
- if !prefs[:getting_started_shown]
- prefs[:getting_started_shown] = Time.now
- current_user.update_attributes prefs: prefs.to_json
- end
- end
-%>
diff --git a/apps/workbench/app/views/layouts/body.html.erb b/apps/workbench/app/views/layouts/body.html.erb
index 8550535..e126cab 100644
--- a/apps/workbench/app/views/layouts/body.html.erb
+++ b/apps/workbench/app/views/layouts/body.html.erb
@@ -218,5 +218,9 @@
<script>
$("#getting-started-modal-window").modal('show');
</script>
- <%= render partial: 'getting_started_shown' %>
+ <%
+ prefs = current_user.prefs
+ prefs[:getting_started_shown] = Time.now
+ current_user.update_attributes prefs: prefs.to_json
+ %>
<% end %>
diff --git a/apps/workbench/test/integration/application_layout_test.rb b/apps/workbench/test/integration/application_layout_test.rb
index b85977f..667fd30 100644
--- a/apps/workbench/test/integration/application_layout_test.rb
+++ b/apps/workbench/test/integration/application_layout_test.rb
@@ -156,10 +156,29 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
assert_text 'Getting Started'
assert_selector 'button:not([disabled])', text: 'Next'
assert_no_selector 'button:not([disabled])', text: 'Prev'
+
+ # Use Next button to enable Prev button
click_button 'Next'
assert_selector 'button:not([disabled])', text: 'Prev' # Prev button is now enabled
click_button 'Prev'
assert_no_selector 'button:not([disabled])', text: 'Prev' # Prev button is again disabled
+
+ # Click Next until last page is reached and verify that it is disabled
+ foundDisabledNext = false
+ (0..20).each do |i| # currently we only have 4 pages, and don't expect to have more than 20 in future
+ click_button 'Next'
+ begin
+ find('button:not([disabled])', text: 'Next')
+ rescue => e
+ foundDisabledNext = true if e.message.include?('Unable to find')
+ break
+ end
+ end
+ assert_no_selector 'button:not([disabled])', text: 'Next' # Next button is disabled
+ assert_selector 'button:not([disabled])', text: 'Prev' # Prev button is enabled
+ click_button 'Prev'
+ assert_selector 'button:not([disabled])', text: 'Next' # Next button is now enabled
+
first('button', text: 'x').click
end
assert_text 'Active pipelines' # seeing dashboard now
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list