Skip to content

Commit

Permalink
Separate test (#12779)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewmakarov committed May 18, 2020
1 parent ea7e38b commit a68f4e3
Showing 1 changed file with 17 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,23 @@ QUnit.module('Appointment popup form', moduleConfig, () => {
});
});

QUnit.test('Appointment popup shouldn\'t render recurrence editor, if previous was with recurrence', function(assert) {
const scheduler = createScheduler();

scheduler.appointments.dblclick();
scheduler.appointmentPopup.dialog.clickEditSeries();

assert.ok(scheduler.appointmentPopup.form.isRecurrenceEditorVisible(), 'Recurrence editor should visible');
assert.equal(scheduler.appointmentPopup.form.getSubject(), 'recurrent-app', 'Subject should equal selected recurrence appointment');

scheduler.appointmentPopup.clickCancelButton();

scheduler.appointments.dblclick(5);

assert.notOk(scheduler.appointmentPopup.form.isRecurrenceEditorVisible(), 'Recurrence editor shouldn\'t visible');
assert.equal(scheduler.appointmentPopup.form.getSubject(), 'common-app', 'Subject in form should equal selected common appointment');
});

QUnit.test('Appointment popup should work properly', function(assert) {
const NEW_EXPECTED_SUBJECT = 'NEW SUBJECT';
const scheduler = createScheduler();
Expand All @@ -257,15 +274,6 @@ QUnit.module('Appointment popup form', moduleConfig, () => {

assert.ok(appointmentPopup.form.isRecurrenceEditorVisible(), 'Recurrence editor should be visible after click on recurrence appointment');
assert.equal(appointmentPopup.form.getSubject(), defaultData[0].text, 'Subject in form should equal selected appointment');

// TODO: Fix unstable test asserts
// scheduler.appointmentPopup.clickDoneButton();

// scheduler.appointments.click(); // click on common appointment, due to redrawing its index has changed
// scheduler.tooltip.clickOnItem();

// assert.notOk(scheduler.appointmentPopup.form.isRecurrenceEditorVisible(), 'Recurrence editor shouldn\'t visible on click on common appointment');
// assert.equal(scheduler.appointmentPopup.form.getSubject(), NEW_EXPECTED_SUBJECT, 'Subject in form should equal selected common appointment');
});


Expand Down

0 comments on commit a68f4e3

Please sign in to comment.