test: rework ui tests for new layout

This commit is contained in:
Thea Schöbl
2022-08-25 14:40:33 +00:00
committed by Rainer Killinger
parent 0bce9e5452
commit de10654675
11 changed files with 143 additions and 132 deletions

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2021 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
* Copyright (C) 2022 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {Component, Input, OnDestroy, OnInit} from '@angular/core';
import {ActivatedRoute} from '@angular/router';
@@ -126,13 +126,6 @@ export class CalendarComponent implements OnInit, OnDestroy {
}
onInit() {
this.dateRange.startDate = this.calculateDateFromIndex(0, 0, 'DD.MM.YY');
this.dateRange.endDate = this.calculateDateFromIndex(
0,
this.layout.days - 1,
'DD.MM.YY',
);
let dayString: string | number | null =
this.activatedRoute.snapshot.paramMap.get('date');
if (dayString == undefined || dayString === 'now') {
@@ -154,6 +147,13 @@ export class CalendarComponent implements OnInit, OnDestroy {
},
);
});
this.dateRange.startDate = this.calculateDateFromIndex(0, 0, 'DD.MM.YY');
this.dateRange.endDate = this.calculateDateFromIndex(
0,
this.layout.days - 1,
'DD.MM.YY',
);
}
onDestroy() {