2
필자가 작성한 Ember 구성 요소가있는 수용 테스트를 작성하고 있습니다. 이 구성 요소는 redactor 플러그인을 래핑합니다.Ember Redactor 구성 요소 테스트 - 준비 대기
템플릿의 관련 부분은
<label>Let's begin</label>
{{x-redactor value=lesson.intro}}
이며, 시험은 다음과 같이 보입니다 : 변화에 대한 시험
test('I can edit the lesson title', function() {
visit('/');
$('.Lesson-intro [contenteditable="true"]').html('<p>Blah</p>');
andThen(() => {
var lesson = App.__container__.lookup('controller:application').get('attrs.lesson');
equal(lesson.get('intro'), '<p>Blah</p>');
});
});
가 {{x-redactor}}
구성 요소가 시간에 초기화 작업을 완료하지 않습니다 그것의 가치. 이 문제를 해결할 수있는 방법이 있습니까 (또는 테스트를 작성하는 더 좋은 방법)?