Skip to content

Commit 6ea4af1

Browse files
committed
fix testcafe test and POM
1 parent 248ce40 commit 6ea4af1

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

  • e2e/testcafe-devextreme/tests/scheduler/common/appointments
  • packages/testcafe-models/scheduler/appointment

e2e/testcafe-devextreme/tests/scheduler/common/appointments/legacyEditing.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ test('Should correctly update appointment if dataSource is a simple array', asyn
1717
const scheduler = new Scheduler(SCHEDULER_SELECTOR);
1818
const appointment = scheduler.getAppointment(INITIAL_APPOINTMENT_TITLE);
1919
const updatedAppointment = scheduler.getAppointment(UPDATED_APPOINTMENT_TITLE);
20-
const { appointmentPopup } = scheduler;
20+
const { legacyAppointmentPopup: appointmentPopup } = scheduler;
2121

2222
await t
2323
.doubleClick(appointment.element, CLICK_OPTIONS)
24-
.click(appointmentPopup.textEditor.element)
25-
.typeText(appointmentPopup.textEditor.element, ADDITIONAL_TITLE_TEXT)
26-
.expect(appointmentPopup.textEditor.element.value)
24+
.click(appointmentPopup.subjectElement)
25+
.typeText(appointmentPopup.subjectElement, ADDITIONAL_TITLE_TEXT)
26+
.expect(appointmentPopup.subjectElement.value)
2727
.eql(UPDATED_APPOINTMENT_TITLE)
28-
.click(appointmentPopup.saveButton.element)
28+
.click(appointmentPopup.doneButton)
2929
.expect(updatedAppointment.element.exists)
3030
.ok();
3131
}).before(async () => createWidget('dxScheduler', {
@@ -48,15 +48,15 @@ test('Should correctly update appointment if dataSource is a Store with key arra
4848
const scheduler = new Scheduler(SCHEDULER_SELECTOR);
4949
const appointment = scheduler.getAppointment(INITIAL_APPOINTMENT_TITLE);
5050
const updatedAppointment = scheduler.getAppointment(UPDATED_APPOINTMENT_TITLE);
51-
const { appointmentPopup } = scheduler;
51+
const { legacyAppointmentPopup: appointmentPopup } = scheduler;
5252

5353
await t
5454
.doubleClick(appointment.element, CLICK_OPTIONS)
55-
.click(appointmentPopup.textEditor.element)
56-
.typeText(appointmentPopup.textEditor.element, ADDITIONAL_TITLE_TEXT)
57-
.expect(appointmentPopup.textEditor.element.value)
55+
.click(appointmentPopup.subjectElement)
56+
.typeText(appointmentPopup.subjectElement, ADDITIONAL_TITLE_TEXT)
57+
.expect(appointmentPopup.subjectElement.value)
5858
.eql(UPDATED_APPOINTMENT_TITLE)
59-
.click(appointmentPopup.saveButton.element)
59+
.click(appointmentPopup.doneButton)
6060
.expect(updatedAppointment.element.exists)
6161
.ok();
6262
}).before(async () => {

packages/testcafe-models/scheduler/appointment/popup.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import DateBox from '../../dateBox';
88
import Button from '../../button';
99

1010
export const SELECTORS = {
11-
appointmentPopup: `.dx-scheduler-appointment-popup.dx-overlay-wrapper`,
11+
appointmentPopup: `.dx-scheduler-appointment-popup.dx-popup.dx-widget`,
1212
form: `.dx-scheduler-form`,
1313
doneButton: `.dx-popup-done.dx-button.dx-widget`,
1414
cancelButton: `.dx-popup-cancel.dx-button.dx-widget`,
@@ -27,8 +27,8 @@ export const SELECTORS = {
2727
export default class AppointmentPopup {
2828
popup: Popup = new Popup(SELECTORS.appointmentPopup);
2929

30-
saveButton: Button = new Button(this.popup.topToolbar.find(SELECTORS.doneButton));
31-
cancelButton: Button = new Button(this.popup.topToolbar.find(SELECTORS.cancelButton));
30+
saveButton: Button = new Button(this.popup.getToolbar().find(SELECTORS.doneButton));
31+
cancelButton: Button = new Button(this.popup.getToolbar().find(SELECTORS.cancelButton));
3232

3333
form: Form = new Form(this.popup.content.find(SELECTORS.form));
3434

0 commit comments

Comments
 (0)