Commit 87a09deb authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner: extending auto tests

parent 8e53076c
...@@ -3941,6 +3941,9 @@ void TestCore::testStatesBaseState() ...@@ -3941,6 +3941,9 @@ void TestCore::testStatesBaseState()
QVERIFY(textItem.propertyAffectedByCurrentState("text")); QVERIFY(textItem.propertyAffectedByCurrentState("text"));
QCOMPARE(textItem.instanceValue("text"), QVariant("state 1")); QCOMPARE(textItem.instanceValue("text"), QVariant("state 1"));
ModelNode newNode = view->createModelNode("Qt/Rectangle", 4, 7);
QVERIFY(!QmlObjectNode(newNode).currentState().isBaseState());
view->setCurrentState(view->baseState()); //set currentState base state view->setCurrentState(view->baseState()); //set currentState base state
QVERIFY(view->currentState().isBaseState()); QVERIFY(view->currentState().isBaseState());
...@@ -3948,6 +3951,7 @@ void TestCore::testStatesBaseState() ...@@ -3948,6 +3951,7 @@ void TestCore::testStatesBaseState()
view->setCurrentState(state1); //set currentState "state 1" view->setCurrentState(state1); //set currentState "state 1"
QCOMPARE(view->currentState(), state1); QCOMPARE(view->currentState(), state1);
QVERIFY(!view->currentState().isBaseState());
QCOMPARE(textItem.instanceValue("text"), QVariant("state 1")); QCOMPARE(textItem.instanceValue("text"), QVariant("state 1"));
view->setCurrentState(view->baseState()); //set currentState base state view->setCurrentState(view->baseState()); //set currentState base state
......
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