diff --git a/ui/tests/test.core.js b/ui/tests/test.core.js index 38e385952b5..5bdc969008c 100644 --- a/ui/tests/test.core.js +++ b/ui/tests/test.core.js @@ -1,4 +1,5 @@ (function($) { + // Main widget tests test('Main widget', function() { var cloudStack = { sections: { @@ -24,9 +25,15 @@ // Header var $header = $cloudStack.find('#header'); var $userOptions = $cloudStack.find('#user-options'); + var $notifications = $header.find('.button.notifications'); + var $notificationTotal = $notifications.find('.total span'); + var $viewSwitcher = $header.find('.button.view-switcher'); equal($header.size(), 1, 'Header present'); equal($userOptions.size(), 1, 'User options present'); equal($userOptions.find('a').size(), 2, 'User options has correct # of options'); + equal($notifications.size(), 1, 'Notifications present'); + equal($notificationTotal.html(), '0', 'Notifications initialized properly'); + equal($viewSwitcher.size(), 1, 'View switcher present'); // Navigation var $navigation = $cloudStack.find('#navigation'); @@ -34,9 +41,14 @@ equal($navigation.find('li').size(), 4, 'Navigation has correct # of nav items'); // Browser / page generation - var $browser = $cloudStack.find('#browser .container'); - var $homePage = $browser.find('.panel div.test123'); + var $browser = $cloudStack.find('#browser'); + var $browserContainer = $browser.find('.container'); + var $homePage = $browserContainer.find('.panel div.test123'); + var $breadcrumbs = $browser.find('#breadcrumbs li'); + var $homeBreadcrumb = $browser.find('#breadcrumbs .home'); equal($browser.size(), 1, 'Browser intialized'); equal($homePage.size(), 1, 'Home page is visible'); + equal($breadcrumbs.size(), 0, 'No initial breadcrumbs'); + equal($homeBreadcrumb.size(), 1, 'Home breadcrumb active'); }); }(jQuery));