summaryrefslogtreecommitdiff
path: root/tests/auto/controls/data/tst_tableview.qml
diff options
context:
space:
mode:
authorCaroline Chao <caroline.chao@digia.com>2013-04-29 14:37:31 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-03 16:51:42 +0200
commitf4bfc438bb3d412555c92884c45d1549e253e8e8 (patch)
tree24d2c07bd89517dd3e355571d5e5c30219540ad1 /tests/auto/controls/data/tst_tableview.qml
parent321fbffe6706bf7eb4ea881f278296740dd084ac (diff)
downloadqtquickcontrols-f4bfc438bb3d412555c92884c45d1549e253e8e8.tar.gz
Tests: Add autotests for TableView (rowCount & columnCount)
Change-Id: I953d0b1803a69acec04ab4ff542ab4629a4df1c4 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'tests/auto/controls/data/tst_tableview.qml')
-rw-r--r--tests/auto/controls/data/tst_tableview.qml18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_tableview.qml b/tests/auto/controls/data/tst_tableview.qml
index b03d58fe..65d7c72c 100644
--- a/tests/auto/controls/data/tst_tableview.qml
+++ b/tests/auto/controls/data/tst_tableview.qml
@@ -180,6 +180,24 @@ TestCase {
table.destroy()
}
+ function test_columnCount() {
+ var component = Qt.createComponent("tableview/table_multicolumns.qml")
+ compare(component.status, Component.Ready)
+ var table = component.createObject(container);
+ verify(table !== null, "table created is null")
+ compare(table.columnCount, 3)
+ table.destroy()
+ }
+
+ function test_rowCount() {
+ var component = Qt.createComponent("tableview/table_multicolumns.qml")
+ compare(component.status, Component.Ready)
+ var table = component.createObject(container);
+ verify(table !== null, "table created is null")
+ compare(table.rowCount, 3)
+ table.destroy()
+ }
+
// In TableView, drawn text = table.currentRowItem.children[1].children[1].itemAt(0).children[0].children[0].text
function findAChild(item, name)