Commit 628fe79d authored by David Edmundson's avatar David Edmundson
Browse files

Fix activites_test check

client->isOnActivity("foo") will return true if the client is on no
activities, as that's the equivalent of saying we are on all activities.

In our case we do want to check activities() shows the right thing.
parent 0dd927c4
......@@ -125,15 +125,15 @@ void ActivitiesTest::testSetOnActivitiesValidates()
QCOMPARE(client->window(), w);
QVERIFY(client->isDecorated());
//verify the test machine doesn't have the following activities used
QVERIFY(!Activities::self()->all().contains(QStringLiteral("foo")));
QVERIFY(!Activities::self()->all().contains(QStringLiteral("bar")));
//setting the client to an invalid activities should result in the client being on all activities
client->setOnActivities(QStringList{QStringLiteral("foo"), QStringLiteral("bar")});
QEXPECT_FAIL("", "D1982", Continue);
QVERIFY(client->isOnAllActivities());
QEXPECT_FAIL("", "D1982", Continue);
QVERIFY(!client->isOnActivity(QStringLiteral("foo")));
QEXPECT_FAIL("", "D1982", Continue);
QVERIFY(!client->isOnActivity(QStringLiteral("bar")));
QVERIFY(!client->activities().contains(QLatin1String("foo")));
QVERIFY(!client->activities().contains(QLatin1String("bar")));
// and destroy the window again
xcb_unmap_window(c.data(), w);
......
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