Changeset View
Changeset View
Standalone View
Standalone View
autotests/filemetadatawidgettest.cpp
Show First 20 Lines • Show All 194 Lines • ▼ Show 20 Line(s) | 173 | { | |||
---|---|---|---|---|---|
195 | } else { | 195 | } else { | ||
196 | qDebug() << "Skipped 'Rating' test"; | 196 | qDebug() << "Skipped 'Rating' test"; | ||
197 | } | 197 | } | ||
198 | // async property | 198 | // async property | ||
199 | // FIXME: Make this pass | 199 | // FIXME: Make this pass | ||
200 | // QCOMPARE( map->value("Album Artist:"), QLatin1String("Bill Laswell")); | 200 | // QCOMPARE( map->value("Album Artist:"), QLatin1String("Bill Laswell")); | ||
201 | } | 201 | } | ||
202 | 202 | | |||
203 | void FileMetadataWidgetTest::shouldShowMultiValueProperties() | ||||
204 | { | ||||
205 | QSignalSpy spy(m_widget, &Baloo::FileMetaDataWidget::metaDataRequestFinished); | ||||
206 | m_widget->setItems(KFileItemList() | ||||
207 | << QUrl::fromLocalFile(QFINDTESTDATA("samplefiles/test_multivalue.ogg")) | ||||
208 | ); | ||||
209 | QVERIFY(spy.wait()); | ||||
210 | QCOMPARE(spy.count(), 1); | ||||
211 | auto artistWidget = m_widget->findChild<QLabel*>(QStringLiteral("artist")); | ||||
212 | QVERIFY2(artistWidget, "artist not found"); | ||||
213 | QCOMPARE(artistWidget->text(), "Artist1 and Artist2"); | ||||
214 | auto genreWidget = m_widget->findChild<QLabel*>(QStringLiteral("genre")); | ||||
215 | QVERIFY2(genreWidget, "genre not found"); | ||||
216 | QCOMPARE(genreWidget->text(), "Genre1, Genre2 and Genre3"); | ||||
217 | } |