Commit b17cd1fd authored by Kai Koehne's avatar Kai Koehne
Browse files

QuickDesigner: Fix core test

Since fa640f66 we're always switching to the base state when going
from state A to state B. Fix autotests accordingly.
parent e5efa55a
......@@ -1106,8 +1106,10 @@ void TestCore::testBasicStates()
// state2 -> state1
view->setCurrentState(state1);
QCOMPARE(view->currentState(), state1);
QCOMPARE(view->methodCalls().size(), ++expectedViewMethodCount);
QCOMPARE(view->methodCalls().last(), TestView::MethodCall("stateChanged", QStringList() << "state1" << "state2"));
expectedViewMethodCount += 2; // Since commit fa640f66db we're always going through the base state
QCOMPARE(view->methodCalls().size(), expectedViewMethodCount);
QCOMPARE(view->methodCalls().at(view->methodCalls().size()-2), TestView::MethodCall("stateChanged", QStringList() << QString() << "state2"));
QCOMPARE(view->methodCalls().at(view->methodCalls().size()-1), TestView::MethodCall("stateChanged", QStringList() << "state1" << QString()));
QCOMPARE(rect2Instance.property("x").toInt(), 0);
// state1 -> baseState
......
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