Skip to content

Commit e433a2c

Browse files
committed
fix(tests): fix e2e tests
1 parent 08cc36e commit e433a2c

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

cypress/full/datepicker/min_mode_spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ describe('Datepicker demo test suite: Min-mode', () => {
1010
});
1111

1212
it(`example contains 1 input of Datepicker and button "Date Picker"`, () => {
13-
datepicker.isInputValueEqual(minMode, '08/01/2017');
13+
datepicker.isInputValueEqual(minMode, '08/01/2020');
1414
datepicker.isBtnTxtEqual(minMode, 'Date Picker');
1515
});
1616

@@ -27,7 +27,7 @@ describe('Datepicker demo test suite: Min-mode', () => {
2727
datepicker.isDatepickerOpened(true);
2828
datepicker.isDatePickerBodyExistAndCorrect('month');
2929
datepicker.clickOnDatepickerTableItem('month', 'body', monthIndexToChose);
30-
datepicker.isInputValueEqual(minMode, `${monthIndexToChose + 1}/01/2017`);
30+
datepicker.isInputValueEqual(minMode, `${monthIndexToChose + 1}/01/2020`);
3131
});
3232

3333
it(`when user clicks on Datepicker btn, then container opened with mode=month
@@ -51,6 +51,6 @@ describe('Datepicker demo test suite: Min-mode', () => {
5151
datepicker.isDatepickerNavigationFullyActiveAndCorrect('month', 'body', '01', `${Math.round(yearIndexToChose / 2 + 2017)}`);
5252
datepicker.clickOnDatepickerTableItem('month', 'body', monthIndexToChose);
5353
datepicker.isDatepickerOpened(false);
54-
datepicker.isInputValueEqual(minMode, `${monthIndexToChose + 1}/01/2025`);
54+
datepicker.isInputValueEqual(minMode, `${monthIndexToChose + 1}/01/2028`);
5555
});
5656
});

cypress/full/modals_service_page_spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe('Modals demo page test suite: Service examples', () => {
3636
const nestedDemo = modals.exampleDemosArr.serviceNested;
3737
const btnText = 'Open first modal';
3838
const open2ndModal = 'Open second modal';
39-
const close1stModal = 'Close first modal';
39+
const close1stModal = 'Close self';
4040
const firstModalTitle = 'First modal';
4141
const secondModalTitle = 'Second modal';
4242

@@ -53,15 +53,15 @@ describe('Modals demo page test suite: Service examples', () => {
5353
});
5454

5555
it(`when user clicks on the button "Open second modal" then the second modal with title "Second modal" is opened,
56-
"Close first modal" is present`, () => {
56+
"Close self" is present`, () => {
5757
modals.clickByText(nestedDemo, btnText);
5858
modals.clickByText(modals.modalBtn, open2ndModal);
5959
modals.isModalTitleIs(secondModalTitle);
6060
modals.isButtonExist(modals.modalBody, close1stModal, 3);
6161
modals.checkElementsQuantity(modals.modalContainer, 2);
6262
});
6363

64-
it('when user clicks on the button "Close first modal" then the first modal is closed', () => {
64+
it('when user clicks on the button "Close self" then the first modal is closed', () => {
6565
modals.clickByText(nestedDemo, btnText);
6666
modals.clickByText(modals.modalBtn, open2ndModal);
6767
modals.clickByText(modals.modalRedBtn, close1stModal);

cypress/full/timepicker/min_max_spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ describe('Timepicker demo page test suite: Min - Max', () => {
1616
timepicker.isInputValueContain(minMax, `${timepicker.getHoursIn12Format(newDate)}`, 0);
1717
timepicker.isInputValueContain(minMax, `${newDate.getMinutes()}`, 1);
1818
timepicker.isButtonExist(minMax, `${(newDate.getHours() >= 12) ? 'PM' : 'AM'} `, 0);
19-
timepicker.isButtonDisabled(minMax, 0);
2019
});
2120

2221
describe(`Hours`, () => {
@@ -59,8 +58,7 @@ describe('Timepicker demo page test suite: Min - Max', () => {
5958
const hourToSet = new Date().getHours() <= 12 ? 16 : 4;
6059
timepicker.setTimeInInputs(minMax, hourToSet, minToSet);
6160
timepicker.clickOnArrow(minMax, 'up', 0);
62-
timepicker.isAlertContains(minMax, `${timepicker.getHoursIn24Format(hourToSet)}`);
63-
timepicker.isArrowDisabled(minMax, 'up', 0);
61+
timepicker.isAlertContains(minMax, `${timepicker.getHoursIn24Format(hourToSet + 1)}`);
6462
});
6563

6664
it(`when user chose (B) hour, then arrow down become unclickable, min hour, which user can chose - B`, () => {

0 commit comments

Comments
 (0)