fix dispatcher test

pull/2478/head
Mihail Maxacov 10 years ago
parent d0d758a282
commit dee5c75ea7
  1. 1
      frontend/app/ui_components/inplace-editor-directive.js
  2. 2
      frontend/tests/integration/work-package-details-spec.js
  3. 4
      frontend/tests/unit/tests/work_packages/directives/inplace-editor-directive-test.js

@ -169,7 +169,6 @@ module.exports = function(
'workPackageRefreshRequired',
function(workPackage) {
OverviewTabInplaceEditorConfig.dispatchChanges(workPackage);
// $scope.acceptChanges(workPackage);
}
);
}

@ -102,7 +102,7 @@ describe('OpenProject', function() {
}
describe('subject', function() {
var subjectEditor = $('h2 .inplace-editor');
var subjectEditor = $('.wp-subject .inplace-editor');
context('work package with updateImmediately link', function() {
beforeEach(function() {

@ -320,6 +320,7 @@ describe('inplaceEditor Directive', function() {
'deregisterActiveEditorScope'
);
elementScope.discardEditing();
$timeout.flush();
});
it('should register the scope to a list of actives', function() {
deregisterActiveEditorScopeSpy.should.have.been.calledWith(elementScope);
@ -345,9 +346,8 @@ describe('inplaceEditor Directive', function() {
it('should switch to read view', function() {
expect(elementScope.isEditing).to.eq(false);
});
it('should propagate changes to all editor including self', function() {
it('should propagate changes to all editors', function() {
dispatchChangesSpy.should.have.been.calledWith(elementScope.entity);
acceptChangesSpy.should.have.been.calledWith(elementScope.entity);
});
});
describe('onFail', function() {

Loading…
Cancel
Save