@@ -72,28 +72,15 @@ Rectangle {
72 tryCompare(textLabel, "y", 0)
72 tryCompare(textLabel, "y", 0)
75− function test_see_more() {
75+ function test_show_collapsed() {
76− var seeMore = findChild(previewTextSummary, "seeMore")
78 // when it's more than textLabel.maximumCollapsedLineCount lines of text, show SeeMore component
76 // when it's more than textLabel.maximumCollapsedLineCount lines of text, show SeeMore component
79 verify(textLabel.lineCount > textLabel.maximumCollapsedLineCount)
77 verify(textLabel.lineCount > textLabel.maximumCollapsedLineCount)
80− compare(seeMore.visible, true)
81− verify(seeMore.more === false)
82− verify(textLabel.height < textLabel.contentHeight)
84− // test interactions with SeeMore
79+ previewTextSummary.expanded = false;
85− var seeMoreLabel = findChild(seeMore, "seeMoreLabel")
80+ tryCompareFunction(function() { return textLabel.height < textLabel.contentHeight; }, true)
86− var seeLessLabel = findChild(seeMore, "seeLessLabel")
87− var initialTextLabelHeight = textLabel.height
88− mouseClick(seeMoreLabel, seeMoreLabel.width / 2, seeMoreLabel.height / 2)
89− tryCompare(textLabel, "height", textLabel.contentHeight)
90− mouseClick(seeLessLabel, seeLessLabel.width / 2, seeLessLabel.height / 2)
91− tryCompare(textLabel, "height", initialTextLabelHeight)
93− // text SeeMore automatic hiding
94 previewTextSummary.widgetData = widgetDataShortText
82 previewTextSummary.widgetData = widgetDataShortText
95 verify(textLabel.lineCount <= textLabel.maximumCollapsedLineCount)
83 verify(textLabel.lineCount <= textLabel.maximumCollapsedLineCount)
96− compare(seeMore.visible, false)
97 tryCompare(textLabel, "height", textLabel.contentHeight)
84 tryCompare(textLabel, "height", textLabel.contentHeight)
98 tryCompare(previewTextSummary, "height", titleLabel.height + textLabel.height)
85 tryCompare(previewTextSummary, "height", titleLabel.height + textLabel.height)