Commit e44be6a1 authored by Alexander Stippich's avatar Alexander Stippich
Browse files

wait for test until data is updated

parent 0c629f46
...@@ -1611,6 +1611,7 @@ void MediaPlayListProxyModelTest::testSaveAndRestoreSettings() ...@@ -1611,6 +1611,7 @@ void MediaPlayListProxyModelTest::testSaveAndRestoreSettings()
QSignalSpy randomPlayChangedSaveSpy(&myPlayListSaveProxyModel, &MediaPlayListProxyModel::randomPlayChanged); QSignalSpy randomPlayChangedSaveSpy(&myPlayListSaveProxyModel, &MediaPlayListProxyModel::randomPlayChanged);
QSignalSpy repeatPlayChangedSaveSpy(&myPlayListSaveProxyModel, &MediaPlayListProxyModel::repeatPlayChanged); QSignalSpy repeatPlayChangedSaveSpy(&myPlayListSaveProxyModel, &MediaPlayListProxyModel::repeatPlayChanged);
QSignalSpy playListFinishedSaveSpy(&myPlayListSaveProxyModel, &MediaPlayListProxyModel::playListFinished); QSignalSpy playListFinishedSaveSpy(&myPlayListSaveProxyModel, &MediaPlayListProxyModel::playListFinished);
QSignalSpy dataChangedSaveSpy(&myPlayListSaveProxyModel, &MediaPlayListProxyModel::dataChanged);
QSignalSpy currentTrackChangedRestoreSpy(&myPlayListRestoreProxyModel, &MediaPlayListProxyModel::currentTrackChanged); QSignalSpy currentTrackChangedRestoreSpy(&myPlayListRestoreProxyModel, &MediaPlayListProxyModel::currentTrackChanged);
QSignalSpy randomPlayChangedRestoreSpy(&myPlayListRestoreProxyModel, &MediaPlayListProxyModel::randomPlayChanged); QSignalSpy randomPlayChangedRestoreSpy(&myPlayListRestoreProxyModel, &MediaPlayListProxyModel::randomPlayChanged);
QSignalSpy repeatPlayChangedRestoreSpy(&myPlayListRestoreProxyModel, &MediaPlayListProxyModel::repeatPlayChanged); QSignalSpy repeatPlayChangedRestoreSpy(&myPlayListRestoreProxyModel, &MediaPlayListProxyModel::repeatPlayChanged);
...@@ -1712,6 +1713,8 @@ void MediaPlayListProxyModelTest::testSaveAndRestoreSettings() ...@@ -1712,6 +1713,8 @@ void MediaPlayListProxyModelTest::testSaveAndRestoreSettings()
QStringLiteral("track1"), {}}, QStringLiteral("track1"), {}},
ElisaUtils::Track); ElisaUtils::Track);
QVERIFY(dataChangedSaveSpy.wait());
QCOMPARE(currentTrackChangedSaveSpy.count(), 1); QCOMPARE(currentTrackChangedSaveSpy.count(), 1);
QCOMPARE(randomPlayChangedSaveSpy.count(), 1); QCOMPARE(randomPlayChangedSaveSpy.count(), 1);
QCOMPARE(repeatPlayChangedSaveSpy.count(), 1); QCOMPARE(repeatPlayChangedSaveSpy.count(), 1);
......
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