diff --git a/front/core/components/tooltip/tooltip.spec.js b/front/core/components/tooltip/tooltip.spec.js index 15595c61b..feec7c62a 100644 --- a/front/core/components/tooltip/tooltip.spec.js +++ b/front/core/components/tooltip/tooltip.spec.js @@ -1,7 +1,6 @@ import './tooltip'; -// #1615 migrar karma a jest -xdescribe('Component vnTooltip', () => { +describe('Component vnTooltip', () => { let $element; let controller; let $parent; @@ -21,8 +20,8 @@ xdescribe('Component vnTooltip', () => { $parent.css({ backgroundColor: 'red', position: 'absolute', - width: '10px', - height: '10px', + width: '100px', + height: '100px', top: '0', left: '0' }); @@ -36,13 +35,13 @@ xdescribe('Component vnTooltip', () => { describe('show()', () => { it(`should check that tooltip is visible into the screen`, () => { + expect(element.classList).not.toContain('show'); + controller.show($parent[0]); let rect = element.getBoundingClientRect(); - let style = window.getComputedStyle(element); - expect(style.visibility).toEqual('visible'); - expect(style.display).not.toEqual('none'); + expect(element.classList).toContain('show'); expect(0).toBeLessThanOrEqual(rect.top); expect(0).toBeLessThanOrEqual(rect.left); @@ -54,14 +53,16 @@ xdescribe('Component vnTooltip', () => { describe('hide()', () => { it(`should check that tooltip is not visible`, () => { controller.show($parent[0]); - controller.hide(); - let style = window.getComputedStyle(element); - expect(style.display).toEqual('none'); + expect(element.classList).toContain('show'); + controller.hide(); + + expect(element.classList).not.toContain('show'); }); }); - describe('relocate()', () => { + // #1892 reparar unitarios front tooltip.js + xdescribe('relocate()', () => { it(`should reallocate tooltip on top-left`, () => { controller.show($parent[0]); let rect = element.getBoundingClientRect(); @@ -117,3 +118,6 @@ xdescribe('Component vnTooltip', () => { }); }); }); + +['onafterprint', 'onbeforeprint', 'onbeforeunload', 'onhashchange', 'onlanguagechange', 'onmessage', 'onmessageerror', 'onoffline', 'ononline', 'onpagehide', 'onpageshow', 'onpopstate', 'onrejectionhandled', 'onstorage', 'onunhandledrejection', 'onunload', 'onblur', 'onerror', 'onfocus', 'onload', 'onresize', 'onscroll', 'onabort', 'onautocomplete', 'onautocompleteerror', 'oncancel', 'oncanplay', 'oncanplaythrough', 'onchange', 'onclick', 'onclose', 'oncontextmenu', 'oncuechange', 'ondblclick', 'ondrag', 'ondragend', 'ondragenter', 'ondragexit', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'ondurationchange', 'onemptied', 'onended', 'oninput', 'oninvalid', 'onkeydown', 'onkeypress', 'onkeyup', 'onloadeddata', 'onloadedmetadata', 'onloadstart', 'onmousedown', 'onmouseenter', 'onmouseleave', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onwheel', 'onpause', 'onplay', 'onplaying', 'onprogress', 'onratechange', 'onreset', 'onsecuritypolicyviolation', 'onseeked', 'onseeking', 'onselect', 'onsort', 'onstalled', 'onsubmit', 'onsuspend', 'ontimeupdate', 'ontoggle', 'onvolumechange', 'onwaiting', '_registeredHandlers', '_eventHandlers', '_globalProxy', '_document', '_sessionHistory', '_virtualConsole', '_runScripts', '_top', '_parent', '_frameElement', '_length', '_pretendToBeVisual', '_storageQuota', '_commonForOrigin', '_currentOriginData', '_localStorage', '_sessionStorage', 'length', 'window', 'frameElement', 'frames', 'self', 'parent', 'top', 'document', 'external', 'location', 'history', 'navigator', 'locationbar', 'menubar', 'personalbar', 'scrollbars', 'statusbar', 'toolbar', 'performance', 'screen', 'localStorage', 'sessionStorage', 'addEventListener', 'removeEventListener', 'dispatchEvent', 'setTimeout', 'setInterval', 'clearInterval', 'clearTimeout', 'requestAnimationFrame', 'cancelAnimationFrame', '__stopAllTimers', 'postMessage', 'atob', 'btoa', 'FileReader', 'WebSocket', 'AbortSignal', 'AbortController', 'XMLHttpRequest', 'ArrayBuffer', 'Int8Array', 'Uint8Array', 'Uint8ClampedArray', 'Int16Array', 'Uint16Array', 'Int32Array', 'Uint32Array', 'Float32Array', 'Float64Array', 'stop', 'close', 'getComputedStyle', 'captureEvents', 'releaseEvents', 'console', 'name', 'devicePixelRatio', 'innerWidth', 'innerHeight', 'outerWidth', 'outerHeight', 'pageXOffset', 'pageYOffset', 'screenX', 'screenY', 'scrollX', 'scrollY', 'screenLeft', 'screenTop', 'alert', 'blur', 'confirm', 'focus', 'moveBy', 'moveTo', 'open', 'print', 'prompt', 'resizeBy', 'resizeTo', 'scroll', 'scrollBy', 'scrollTo', 'process', 'DTRACE_NET_SERVER_CONNECTION', 'DTRACE_NET_STREAM_END', 'DTRACE_HTTP_SERVER_REQUEST', 'DTRACE_HTTP_SERVER_RESPONSE', 'DTRACE_HTTP_CLIENT_REQUEST', 'DTRACE_HTTP_CLIENT_RESPONSE', 'Buffer', 'setImmediate', 'clearImmediate', 'describe', 'xdescribe', 'fdescribe', 'it', 'xit', 'fit', 'beforeEach', 'afterEach', 'beforeAll', 'afterAll', 'pending', 'fail', 'spyOn', 'jsApiReporter', 'jasmine', 'test', 'xtest', 'expect', 'angular', 'module', 'inject', 'browserTrigger', '__core-js_shared__', 'core', 'parseInt', 'parseFloat', 'regeneratorRuntime', '_babelPolyfill', 'magicCrudAngular', 'ngModule'] +; diff --git a/modules/worker/front/time-control/index.html b/modules/worker/front/time-control/index.html index c3700992b..10691d301 100644 --- a/modules/worker/front/time-control/index.html +++ b/modules/worker/front/time-control/index.html @@ -4,7 +4,7 @@ filter="::$ctrl.filter" data="$ctrl.hours"> - + @@ -31,8 +31,8 @@ - -
+ +
{{::hour.timed | date: 'HH:mm'}} diff --git a/modules/worker/front/time-control/style.scss b/modules/worker/front/time-control/style.scss index 5d82c6d31..8555e827b 100644 --- a/modules/worker/front/time-control/style.scss +++ b/modules/worker/front/time-control/style.scss @@ -12,6 +12,7 @@ vn-worker-time-control { & > section { display: flex; align-items: center; + justify-content: center; padding: .3em 0; & > vn-icon {