Skip to content

Commit

Permalink
test: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wildergd committed Aug 21, 2020
1 parent ae3b47e commit e2be05d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
9 changes: 9 additions & 0 deletions integration/specs/Calendar/calendar-1.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,4 +209,13 @@ describe('Calendar', () => {
expect(calendar.isNextMonthButtonFocused()).toBe(false);
expect(calendar.isYearSelectFocused()).toBe(true);
});
it('should move from calendar controls to days when TAB key is pressed', () => {
const calendar = new PageCalendar(CALENDAR);
calendar.clickPrevMonthButton();
expect(calendar.isDayFocused(1)).toBe(false);
browser.keys(TAB_KEY);
expect(calendar.isDayFocused(1)).toBe(true);
browser.keys(TAB_KEY);
expect(calendar.isDayFocused(1)).toBe(false);
});
});
12 changes: 0 additions & 12 deletions integration/specs/Calendar/calendar-7.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,22 +218,10 @@ describe('Calendar', () => {
it('should move from calendar controls to days when TAB key is pressed', () => {
const calendar = new PageCalendar(CALENDAR);
calendar.clickPrevMonthButton();
expect(calendar.isPrevMonthButtonFocused()).toBe(true);
expect(calendar.isLeftYearSelectFocused()).toBe(false);
expect(calendar.isRightYearSelectFocused()).toBe(false);
expect(calendar.isNextMonthButtonFocused()).toBe(false);
expect(calendar.isLeftMonthDayFocused(1)).toBe(false);
browser.keys(TAB_KEY);
expect(calendar.isPrevMonthButtonFocused()).toBe(false);
expect(calendar.isLeftYearSelectFocused()).toBe(false);
expect(calendar.isRightYearSelectFocused()).toBe(false);
expect(calendar.isNextMonthButtonFocused()).toBe(false);
expect(calendar.isLeftMonthDayFocused(1)).toBe(true);
browser.keys(TAB_KEY);
expect(calendar.isPrevMonthButtonFocused()).toBe(false);
expect(calendar.isLeftYearSelectFocused()).toBe(false);
expect(calendar.isRightYearSelectFocused()).toBe(false);
expect(calendar.isNextMonthButtonFocused()).toBe(false);
expect(calendar.isLeftMonthDayFocused(1)).toBe(false);
});
});

0 comments on commit e2be05d

Please sign in to comment.