Commit 51073f0d authored by Sheetal Umesh Kumar's avatar Sheetal Umesh Kumar Committed by GitHub

Merge pull request #302 from hypothesis/fix-mod-banner

Fix annotation ID not being passed to moderation banner correctly.
parents 967f89f7 e389b750
......@@ -25,7 +25,13 @@ function PageObject(element) {
describe('annotationThread', function () {
before(function () {
angular.module('app', [])
.component('annotationThread', annotationThread);
.component('annotationThread', annotationThread)
.component('moderationBanner', {
bindings: {
annotationId: '<',
isReply: '<',
},
});
});
beforeEach(function () {
......@@ -176,4 +182,22 @@ describe('annotationThread', function () {
assert.calledWith(onForceVisible, thread.children[0]);
});
});
it('renders the moderation banner', function () {
var thread = {
id: '123',
parent: null,
children: [],
};
var element = util.createDirective(document, 'annotationThread', {
thread: thread,
});
var moderationBanner = element
.find('moderation-banner')
.controller('moderationBanner');
assert.deepEqual(moderationBanner, {
isReply: false,
annotationId: '123',
});
});
});
......@@ -11,7 +11,7 @@
</div>
<div class="annotation-thread__content">
<moderation-banner is-reply="!vm.isTopLevelThread()"
annotation-id="thread.id">
annotation-id="vm.thread.id">
</moderation-banner>
<annotation ng-class="vm.annotationClasses()"
annotation="vm.thread.annotation"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment