From 880a8143e0a407fca82465ac9aa7de6ea9f18133 Mon Sep 17 00:00:00 2001 From: Angel Garbarino Date: Thu, 17 Feb 2022 16:52:06 -0700 Subject: [PATCH] Calendar widget test and small styling fix on wide screens (#14139) * setup component test * fix * fixes * make more clear --- ui/app/adapters/clients/monthly.js | 1 - ui/app/components/calendar-widget.js | 2 +- ui/app/styles/components/calendar-widget.scss | 6 +- .../templates/components/calendar-widget.hbs | 11 +- .../components/calendar-widget-test.js | 125 ++++++++++++++++++ ui/tests/pages/components/calendar-widget.js | 15 +++ 6 files changed, 154 insertions(+), 6 deletions(-) create mode 100644 ui/tests/integration/components/calendar-widget-test.js create mode 100644 ui/tests/pages/components/calendar-widget.js diff --git a/ui/app/adapters/clients/monthly.js b/ui/app/adapters/clients/monthly.js index fa299a0b5..a960e91aa 100644 --- a/ui/app/adapters/clients/monthly.js +++ b/ui/app/adapters/clients/monthly.js @@ -6,7 +6,6 @@ export default class MonthlyAdapter extends ApplicationAdapter { // Query has startTime defined. The API will return the endTime if none is provided. return this.ajax(url, 'GET').then((resp) => { let response = resp || {}; - // if the response is a 204 it has no request id (ARG TODO test that it returns a 204) response.id = response.request_id || 'no-data'; return response; }); diff --git a/ui/app/components/calendar-widget.js b/ui/app/components/calendar-widget.js index 414da959e..eb43ae801 100644 --- a/ui/app/components/calendar-widget.js +++ b/ui/app/components/calendar-widget.js @@ -13,7 +13,7 @@ import { tracked } from '@glimmer/tracking'; * .menu { margin-bottom: 0px; diff --git a/ui/app/templates/components/calendar-widget.hbs b/ui/app/templates/components/calendar-widget.hbs index 5c44e1cd8..d8c12b0f7 100644 --- a/ui/app/templates/components/calendar-widget.hbs +++ b/ui/app/templates/components/calendar-widget.hbs @@ -9,12 +9,13 @@ {{@endTimeDisplay}} - + {{#if this.showCalendar}} -
+
-

{{this.displayYear}}

+

{{this.displayYear}}