mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[PRODSEC-6575] Shared link not accessible now after the expiry date which was earlier accessible even after that expiration date (#8540)
* Shared link expiry date code implementation * test case updated * removed unsed code * design changes as per the new design of Share dialog * test cases modification as per new design changes * placeholder modified for expiration date * look and feel changes for share dialog as per Shane comments * boolean name changed as per naming convention * review comments addressed * review comments addressed * type specified for node object * linting corrections * resolved nested ternary date operation into an independent statement * review comments addressed * used date-fns instead of moment.js in code as well as in test cases * review comments for date-fns addressed * removed extra line * removed extra empty lines in template * import changes and indentation correction * error in console resolved which was occuring after selecting date and time * used mat-datepicker instead of mat-datetimepicker * package-lock.json file updated for date-fns implementation * made type 'date' as default and removed the settings coming from the ACA * unit test case modifications as per calender changes * e2e modifications as per new calendar component
This commit is contained in:
@@ -21,8 +21,8 @@ import { BrowserActions } from '../../utils/browser-actions';
|
||||
|
||||
export class DateTimePickerCalendarPage {
|
||||
|
||||
datePicker = $(`.mat-datetimepicker-calendar`);
|
||||
today = $(`.mat-datetimepicker-calendar-body-today`);
|
||||
datePicker = $(`.mat-datepicker-calendar`);
|
||||
today = $(`.mat-calendar-body-today`);
|
||||
timePicker = $('.mat-datetimepicker-clock');
|
||||
hourTime = $$('.mat-datetimepicker-clock-hours .mat-datetimepicker-clock-cell').first();
|
||||
minutesTime = $$('.mat-datetimepicker-clock-minutes .mat-datetimepicker-clock-cell').first();
|
||||
@@ -47,7 +47,7 @@ export class DateTimePickerCalendarPage {
|
||||
async setDate(date?: string): Promise<boolean> {
|
||||
try {
|
||||
if (date) {
|
||||
await BrowserActions.clickScript(element.all(by.cssContainingText(`.mat-datetimepicker-calendar-body-cell-content`, date)).first());
|
||||
await BrowserActions.clickScript(element.all(by.cssContainingText(`.mat-datepicker-calendar-body-cell-content`, date)).first());
|
||||
} else {
|
||||
await this.setToday();
|
||||
}
|
||||
@@ -59,7 +59,7 @@ export class DateTimePickerCalendarPage {
|
||||
}
|
||||
|
||||
async checkCalendarTodayDayIsDisabled(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsPresent(element(by.cssContainingText('.mat-datetimepicker-calendar-body-disabled', await BrowserActions.getText(this.today))));
|
||||
await BrowserVisibility.waitUntilElementIsPresent(element(by.cssContainingText('.mat-calendar-body-cell-content', await BrowserActions.getText(this.today))));
|
||||
}
|
||||
|
||||
async setDefaultEnabledHour(): Promise<void> {
|
||||
|
@@ -23,12 +23,14 @@ export class DateTimePickerPage {
|
||||
|
||||
rootElement: ElementFinder;
|
||||
dateTimePicker = $('.mat-datetimepicker-toggle');
|
||||
datePicker = $('.mat-datepicker-toggle');
|
||||
dateTime = new DateTimePickerCalendarPage();
|
||||
|
||||
constructor(rootElement?: ElementFinder) {
|
||||
if (rootElement) {
|
||||
this.rootElement = rootElement;
|
||||
this.dateTimePicker = this.rootElement.$('.mat-datetimepicker-toggle');
|
||||
this.datePicker = this.rootElement.$('.mat-datepicker-toggle');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,12 +48,12 @@ export class DateTimePickerPage {
|
||||
}
|
||||
|
||||
async setDate(date?: string): Promise<boolean> {
|
||||
await BrowserActions.click(this.dateTimePicker);
|
||||
await BrowserActions.click(this.datePicker);
|
||||
return this.dateTime.setDate(date);
|
||||
}
|
||||
|
||||
async clickDateTimePicker(): Promise<void> {
|
||||
await BrowserActions.click(this.dateTimePicker);
|
||||
await BrowserActions.click(this.datePicker);
|
||||
}
|
||||
|
||||
async checkCalendarTodayDayIsDisabled(): Promise<void> {
|
||||
|
Reference in New Issue
Block a user