mirror of
https://invent.kde.org/marcoa/a-la-karte.git
synced 2026-03-26 17:03:08 +00:00
tests: cover Runner1 ResolveLaunch wine missing prefix/gameId
This commit is contained in:
parent
09026ca26a
commit
0b10b01cc4
1 changed files with 22 additions and 0 deletions
|
|
@ -92,6 +92,7 @@ private Q_SLOTS:
|
|||
void runnerVersionAndListRunners();
|
||||
void runnerResolveLaunchMissingProgram();
|
||||
void runnerResolveLaunchUnknownRunnerId();
|
||||
void runnerResolveLaunchWineMissingPrefixOrGameId();
|
||||
void pingInput();
|
||||
void inputVersionAndCapabilities();
|
||||
void inputProfilesCrud();
|
||||
|
|
@ -597,6 +598,27 @@ void DbusSmokeTest::runnerResolveLaunchUnknownRunnerId()
|
|||
QVERIFY(out.value(QStringLiteral("error")).toString().contains(QStringLiteral("unknown runnerId"), Qt::CaseInsensitive));
|
||||
}
|
||||
|
||||
void DbusSmokeTest::runnerResolveLaunchWineMissingPrefixOrGameId()
|
||||
{
|
||||
org::kde::ALaKarte::Runner1 iface(QStringLiteral("org.kde.ALaKarte.Runner1"), QStringLiteral("/org/kde/ALaKarte/Runner1"), m_bus);
|
||||
QVERIFY(iface.isValid());
|
||||
iface.setTimeout(2000);
|
||||
|
||||
QVariantMap spec;
|
||||
spec.insert(QStringLiteral("runner"), QStringLiteral("wine"));
|
||||
spec.insert(QStringLiteral("program"), QStringLiteral("/bin/true"));
|
||||
spec.insert(QStringLiteral("args"), QStringList{});
|
||||
|
||||
QDBusPendingReply<QVariantMap> reply = iface.ResolveLaunch(spec);
|
||||
reply.waitForFinished();
|
||||
QVERIFY2(!reply.isError(), qPrintable(reply.error().message()));
|
||||
|
||||
const QVariantMap out = reply.value();
|
||||
QCOMPARE(out.value(QStringLiteral("ok")).toBool(), false);
|
||||
QVERIFY(out.contains(QStringLiteral("error")));
|
||||
QVERIFY(out.value(QStringLiteral("error")).toString().contains(QStringLiteral("missing prefixPath or gameId"), Qt::CaseInsensitive));
|
||||
}
|
||||
|
||||
void DbusSmokeTest::runnerGameProfiles()
|
||||
{
|
||||
org::kde::ALaKarte::Runner1 iface(QStringLiteral("org.kde.ALaKarte.Runner1"), QStringLiteral("/org/kde/ALaKarte/Runner1"), m_bus);
|
||||
|
|
|
|||
Loading…
Reference in a new issue