diff --git a/ui/desktop/app/controllers/application.js b/ui/desktop/app/controllers/application.js index 27471994d..8d9c53da5 100644 --- a/ui/desktop/app/controllers/application.js +++ b/ui/desktop/app/controllers/application.js @@ -19,8 +19,7 @@ export default class ApplicationController extends Controller { * @type {boolean} */ @computed('isMacOS', 'isFrameless') - get hasMacOSFrame() { - console.log('hasMacOSFrame ', this.isMacOS && !this.isFrameless); + get isFrameMacOS() { return this.isMacOS && !this.isFrameless; } } diff --git a/ui/desktop/app/templates/application.hbs b/ui/desktop/app/templates/application.hbs index 482661bd4..e4cf86c72 100644 --- a/ui/desktop/app/templates/application.hbs +++ b/ui/desktop/app/templates/application.hbs @@ -8,7 +8,7 @@ diff --git a/ui/desktop/tests/acceptance/application-test.js b/ui/desktop/tests/acceptance/application-test.js index 23a254e0e..4f9cabdee 100644 --- a/ui/desktop/tests/acceptance/application-test.js +++ b/ui/desktop/tests/acceptance/application-test.js @@ -48,20 +48,30 @@ module('Acceptance | origin', function (hooks) { }); test('visiting index on MacOS hides custom window actions', async function (assert) { - assert.expect(3); + assert.expect(4); stubs.ipcService.withArgs('isMacOS').returns(true); + stubs.ipcService.withArgs('isFrameless').returns(false); await visit(urls.origin); - assert.notOk(find('.button-window-close')); - assert.notOk(find('.button-window-minimize')); - assert.notOk(find('.button-window-fullscreen')); + assert.notOk(find('.button-window-close'), 'Window close button'); + assert.notOk(find('.button-window-minimize'), 'Window minimize button'); + assert.notOk(find('.button-window-fullscreen'), 'Window fullscreen button'); + assert.ok( + find('.rose-header.header-cushion'), + 'Adds header padding around native window actions' + ); }); test('visiting index on non-MacOS shows custom window actions', async function (assert) { - assert.expect(3); + assert.expect(4); stubs.ipcService.withArgs('isMacOS').returns(false); + stubs.ipcService.withArgs('isFrameless').returns(true); await visit(urls.origin); - assert.ok(find('.button-window-close')); - assert.ok(find('.button-window-minimize')); - assert.ok(find('.button-window-fullscreen')); + assert.ok(find('.button-window-close'), 'Window close button'); + assert.ok(find('.button-window-minimize'), 'Window minimize button'); + assert.ok(find('.button-window-fullscreen'), 'Window fullscreen button'); + assert.notOk( + find('.rose-header.header-cushion'), + 'Disables header padding around native window actions' + ); }); }); diff --git a/ui/desktop/tests/helpers/window-mock-ipc.js b/ui/desktop/tests/helpers/window-mock-ipc.js index 8151c8cbc..bb9214b15 100644 --- a/ui/desktop/tests/helpers/window-mock-ipc.js +++ b/ui/desktop/tests/helpers/window-mock-ipc.js @@ -18,6 +18,7 @@ class MockIPC { resetOrigin() {} isMacOS() {} + isFrameless() {} } /**