Skip to content

Commit 370b5f5

Browse files
author
Jaume Pujantell
committed
add test for comment width
This is a test for commit 5ff7f51 (browser: do not let comments get too slim). Signed-off-by: Jaume Pujantell <jaume.pujantell@collabora.com> Change-Id: I5ff0e58230d2753ee6ec191d5c10e160c5adc72d
1 parent 45536b8 commit 370b5f5

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

cypress_test/integration_tests/desktop/writer/annotation_spec.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,27 @@ describe(['tagdesktop'], 'Annotation Tests', function() {
297297
cy.get('@windowOpen').should('be.called');
298298
});
299299

300+
it.only('Annotation minimum width', function () {
301+
desktopHelper.insertComment();
302+
303+
cy.cGet('.cool-annotation-content-wrapper').should('exist');
304+
cy.cGet('#annotation-content-area-1').should('contain', 'some text');
305+
306+
// Add several nested replies to create a deep thread
307+
var replyCount = 5;
308+
for (var i = 1; i <= replyCount; i++) {
309+
cy.cGet('#comment-annotation-menu-' + i).click({ force: true });
310+
cy.cGet('body').contains('.context-menu-item', 'Reply').click();
311+
cy.cGet('#annotation-reply-textarea-' + i).type('reply ' + i);
312+
cy.cGet('#annotation-reply-' + i).click();
313+
cy.cGet('#annotation-content-area-' + (i + 1)).should('contain', 'reply ' + i);
314+
}
315+
316+
// Check that the last reply content is wide enough
317+
cy.cGet('#comment-container-' + (replyCount + 1) + ' .cool-annotation-content')
318+
.should(el => expect(el.width()).gte(200));
319+
});
320+
300321
});
301322

302323
describe(['tagdesktop'], 'Collapsed Annotation Tests', function() {

0 commit comments

Comments
 (0)