Fixed issue on focus mat calendar

This commit is contained in:
VitoAlbano
2024-06-12 11:19:45 +01:00
parent 325768c278
commit cf75196990
2 changed files with 2 additions and 1 deletions

View File

@@ -29,7 +29,7 @@ export class DatePickerCalendarPage {
todayDate = TestElement.byCss(`${materialLocators.Calendar.body.today.class}`); todayDate = TestElement.byCss(`${materialLocators.Calendar.body.today.class}`);
periodButton = $(`button[class*=${materialLocators.Calendar.button('period')}]`); periodButton = $(`button[class*=${materialLocators.Calendar.button('period')}]`);
focusedElement = `div${materialLocators.Calendar.body.cell.content.class}${materialLocators.Focus.indicator}`; focusedElement = `div${materialLocators.Calendar.body.cell.content.class}${materialLocators.Calendar.focus}`;
async getSelectedDate(): Promise<string> { async getSelectedDate(): Promise<string> {
return BrowserActions.getAttribute($(`button[class*="${materialLocators.Calendar.body.active.root}"]`), 'aria-label'); return BrowserActions.getAttribute($(`button[class*="${materialLocators.Calendar.body.active.root}"]`), 'aria-label');

View File

@@ -35,6 +35,7 @@ export const materialLocators = {
}, },
Calendar: { Calendar: {
root: 'mat-calendar', root: 'mat-calendar',
focus: '.mat-focus-indicator',
body: { body: {
cell: { cell: {
root: 'mat-calendar-body-cell', root: 'mat-calendar-body-cell',