class ActionsController < ApplicationController
- skip_filter :require_thread_api_token, only: [:report_issue_popup, :report_issue, :getting_started_popup]
+ skip_filter :require_thread_api_token, only: [:report_issue_popup, :report_issue]
skip_filter :check_user_agreements, only: [:report_issue_popup, :report_issue]
@@exposed_actions = {}
<% end %>
<%= render partial: 'browser_unsupported' %><%# requires JS support below %>
- <%= render partial: 'getting_started_popup' %><%# requires JS support below %>
+ <%= render partial: 'getting_started_popup' %>
<div id="page-wrapper">
<%= yield %>
<div class="panel-body">
<% if !missing_required_profile? && params[:offer_return_to] %>
<div class="alert alert-success">
- <% if current_user.prefs['getting_started_shown'] %>
+ <% if current_user.prefs[:getting_started_shown] %>
<p>Thank you for filling in your profile. <%= link_to 'Back to work!', params[:offer_return_to], class: 'btn btn-sm btn-primary' %></p>
<% else %>
<p>Thank you for filling in your profile. <%= link_to 'Get started', params[:offer_return_to], class: 'btn btn-sm btn-primary' %></p>
['active_no_prefs', api_fixture('users')['active_no_prefs'], true, false],
['active_no_prefs_profile_no_getting_started_shown',
api_fixture('users')['active_no_prefs_profile_no_getting_started_shown'], true, false],
- ['active_no_prefs_profile_with_getting_started_shown',
- api_fixture('users')['active_no_prefs_profile_with_getting_started_shown'], true, false],
].each do |token, user, invited, has_profile|
test "visit home page for user #{token}" do
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
['active_no_prefs', api_fixture('users')['active_no_prefs']],
['active_no_prefs_profile_no_getting_started_shown',
api_fixture('users')['active_no_prefs_profile_no_getting_started_shown']],
- ['active_no_prefs_profile_with_getting_started_shown',
- api_fixture('users')['active_no_prefs_profile_with_getting_started_shown']],
].each do |token, user|
test "check version info and report issue for user #{token}" do
Rails.configuration.user_profile_form_fields = @user_profile_form_fields
end
- def verify_homepage_with_profile user, invited, has_profile, getting_started_shown=false
+ def verify_homepage_with_profile user, invited, has_profile
profile_config = Rails.configuration.user_profile_form_fields
if !user
elsif user['is_active']
if profile_config && !has_profile
assert page.has_text?('Save profile'), 'No text - Save profile'
- add_profile user, invited, has_profile, getting_started_shown
+ add_profile user
else
assert page.has_text?('Active pipelines'), 'Not found text - Active pipelines'
assert page.has_no_text?('Save profile'), 'Found text - Save profile'
end
# Check manage profile page and add missing profile to the user
- def add_profile user, invited, has_profile, getting_started_shown
+ def add_profile user
assert page.has_no_text?('My projects'), 'Found text - My projects'
assert page.has_no_text?('Projects shared with me'), 'Found text - Projects shared with me'
click_button "Save profile"
# profile saved and in profile page now with success
assert page.has_text?('Thank you for filling in your profile'), 'No text - Thank you for filling'
- if getting_started_shown
+ if user['prefs']['getting_started_shown']
click_link 'Back to work!'
else
click_link 'Get started'
['active_no_prefs_profile_no_getting_started_shown',
api_fixture('users')['active_no_prefs_profile_no_getting_started_shown'], true, false],
['active_no_prefs_profile_with_getting_started_shown',
- api_fixture('users')['active_no_prefs_profile_with_getting_started_shown'], true, false, true],
+ api_fixture('users')['active_no_prefs_profile_with_getting_started_shown'], true, false],
].each do |token, user, invited, has_profile|
test "visit home page when profile is configured for user #{token}" do