Fix home tiles visibility and TopMessageHolder error
This commit is contained in:
parent
e5a9317c7c
commit
9e73094c9b
|
|
@ -76,3 +76,4 @@
|
|||
//= require_directory ./wizard/gear
|
||||
//= require_directory ./wizard/loopback
|
||||
//= require everywhere/everywhere
|
||||
//= require fix_home_tiles
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
(function() {
|
||||
// Wait for everything to settle
|
||||
setTimeout(function() {
|
||||
// If we are at the client root/home and the home screen is hidden
|
||||
if ((window.location.hash === '' || window.location.hash === '#/home') &&
|
||||
$('.screen[layout-id="home"]').is(':hidden')) {
|
||||
|
||||
console.log("Fixing home screen visibility...");
|
||||
|
||||
// Force the layout engine to show the home screen
|
||||
if (window.JK && window.JK.app && window.JK.app.layout) {
|
||||
window.JK.app.layout.changeToScreen('home', {});
|
||||
}
|
||||
|
||||
// Also ensure the curtain is gone
|
||||
$('.curtain').fadeOut();
|
||||
}
|
||||
}, 1000);
|
||||
})();
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
context = window
|
||||
ConfigStore = context.ConfigStore
|
||||
|
||||
ReactCSSTransitionGroup = React.addons.CSSTransitionGroup;
|
||||
ReactCSSTransitionGroup = if React.addons then React.addons.CSSTransitionGroup else null
|
||||
|
||||
@TopMessageHolder = React.createClass(
|
||||
context.TopMessageHolder = React.createClass(
|
||||
{
|
||||
displayName: 'Top Message Holder',
|
||||
minimum_time_until_sub_prompt: 1000 * 60 * 15 # 30 minutes
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe "Home Tiles", :js => true, :type => :feature do
|
||||
let(:user) { FactoryBot.create(:user) }
|
||||
|
||||
it "shows the home tiles" do
|
||||
# Ensure we are not logged in to see the 'not-logged-in' class
|
||||
# sign_in_poltergeist(user)
|
||||
|
||||
visit "/client"
|
||||
|
||||
# Check for the specific selector
|
||||
expect(page).to have_css('.homecard.createsession.not-logged-in', visible: true, wait: 10)
|
||||
end
|
||||
end
|
||||
Loading…
Reference in New Issue