@@ -28,16 +28,22 @@ Rectangle {
2828
2929 property var comment: {
3030 "author": "Claire Thompson",
31− "date": "28/04/2015 3:48pm",
31+ "subtitle": "28/04/2015 3:48pm",
3232 "comment": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
3333 "source": "../../graphics/avatars/amanda@12.png"
3434 }
3535
3636 property var commentNoImage: {
3737 "author": "Claire Thompson",
38− "date": "28/04/2015 3:48pm",
38+ "subtitle": "28/04/2015 3:48pm",
3939 "comment": "Been quite a while since I really liked one.",
40− "source": "null"
40+ "source": ""
41+ }
42+
43+ property var commentNoSubtitle: {
44+ "author": "Claire Thompson",
45+ "comment": "Been quite a while since I really liked one.",
46+ "source": "../../graphics/avatars/amanda@12.png"
4147 }
4248
4349 PreviewSocialComment {
@@ -52,7 +58,11 @@ Rectangle {
5258 name: "PreviewSocialCommentTest"
5359 when: windowShown
5460
55− function testAnchorsNoAvatar() {
61+ function init() {
62+ previewCommentInput.widgetData = comment;
63+ }
64+
65+ function test_AnchorsNoAvatar() {
5666 var column = findChild(previewCommentInput, "column");
5767 var avatar = findChild(previewCommentInput, "avatar");
5868
@@ -64,5 +74,11 @@ Rectangle {
6474 tryCompare(avatar, "visible", false);
6575 compare(column.anchors.left, previewCommentInput.anchors.left);
6676 }
77+
78+ function test_OptionalSubtitle() {
79+ var subtitle = findChild(previewCommentInput, "subtitle");
80+ previewCommentInput.widgetData = commentNoSubtitle;
81+ tryCompare(subtitle, "visible", false);
82+ }
6783 }
6884}