Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix jsunit failures
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Aug 31, 2022
commit aa85e1c2afccdd210fdeeda3bae1999f9a62c15c
42 changes: 0 additions & 42 deletions core/js/tests/specs/coreSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,48 +308,6 @@ describe('Core base tests', function() {
expect(OC.generateUrl('apps/files/download{file}')).toEqual(OC.getRootPath() + '/index.php/apps/files/download%7Bfile%7D');
});
});
describe('Main menu mobile toggle', function() {
var clock;
var $toggle;
var $navigation;

beforeEach(function() {
jQuery.fx.off = true;
clock = sinon.useFakeTimers();
$('#testArea').append('<div id="header">' +
'<a class="menutoggle header-appname-container" href="#">' +
'<h1 class="header-appname"></h1>' +
'<div class="icon-caret"></div>' +
'</a>' +
'</div>' +
'<div id="navigation"></div>');
$toggle = $('#header').find('.menutoggle');
$navigation = $('#navigation');
});
afterEach(function() {
jQuery.fx.off = false;
clock.restore();
$(document).off('ajaxError');
});
it('Sets up menu toggle', function() {
window.initCore();
expect($navigation.hasClass('menu')).toEqual(true);
});
it('Clicking menu toggle toggles navigation in', function() {
window.initCore();
// fore show more apps icon since otherwise it would be hidden since no icons are available
clock.tick(1 * 1000);
$('#more-apps').show();

expect($navigation.is(':visible')).toEqual(false);
$toggle.click();
clock.tick(1 * 1000);
expect($navigation.is(':visible')).toEqual(true);
$toggle.click();
clock.tick(1 * 1000);
expect($navigation.is(':visible')).toEqual(false);
});
});
describe('Util', function() {
describe('computerFileSize', function() {
it('correctly parses file sizes from a human readable formated string', function() {
Expand Down
3 changes: 2 additions & 1 deletion core/src/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ import { setUp as setUpMainMenu } from './components/MainMenu'
import { setUp as setUpUserMenu } from './components/UserMenu'
import PasswordConfirmation from './OC/password-confirmation'

const breakpointMobileWidth = getComputedStyle(document.documentElement).getPropertyValue('--breakpoint-mobile')
// keep in sync with core/css/variables.scss
const breakpointMobileWidth = 1024
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about this... yet another place where we need to maintain this number...

Copy link
Member Author

@juliusknorr juliusknorr Aug 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is breaking the jsunit tests it seems, so I only reverted to the previous state. Something to look into at some later point.


const initLiveTimestamps = () => {
// Update live timestamps every 30 seconds
Expand Down
4 changes: 2 additions & 2 deletions dist/core-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-main.js.map

Large diffs are not rendered by default.