mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-14 14:25:50 +00:00
one more iteration to try to fix tests on travis
This commit is contained in:
@ -18,6 +18,7 @@
|
||||
|
||||
#include "testawkeys.h"
|
||||
|
||||
#include <KWindowSystem>
|
||||
#include <QDBusConnection>
|
||||
#include <QDBusMessage>
|
||||
#include <QtTest>
|
||||
@ -112,6 +113,9 @@ void TestAWKeys::test_pattern()
|
||||
|
||||
void TestAWKeys::test_tooltip()
|
||||
{
|
||||
if (!KWindowSystem::workArea().isValid())
|
||||
QSKIP("KWin inactive, skip tooltip test");
|
||||
|
||||
QSignalSpy spy(plugin, SIGNAL(needToolTipToBeUpdated(const QString)));
|
||||
|
||||
QVERIFY(spy.wait(5 * interval));
|
||||
@ -164,6 +168,9 @@ void TestAWKeys::test_valueByKey()
|
||||
|
||||
void TestAWKeys::test_dbus()
|
||||
{
|
||||
if (!plugin->isDBusActive())
|
||||
QSKIP("No DBus session created, skip DBus test");
|
||||
|
||||
// get id
|
||||
qlonglong id = reinterpret_cast<qlonglong>(plugin);
|
||||
|
||||
|
@ -41,7 +41,7 @@ void TestDPPlugin::cleanupTestCase()
|
||||
void TestDPPlugin::test_desktops()
|
||||
{
|
||||
if (!m_isKwinActive)
|
||||
QSKIP("KWin inactive, skip tests");
|
||||
QSKIP("KWin inactive, skip Destkop panel tests");
|
||||
|
||||
int current = plugin->currentDesktop();
|
||||
int total = plugin->numberOfDesktops();
|
||||
@ -67,7 +67,7 @@ void TestDPPlugin::test_desktops()
|
||||
void TestDPPlugin::test_dictKeys()
|
||||
{
|
||||
if (!m_isKwinActive)
|
||||
QSKIP("KWin inactive, skip tests");
|
||||
QSKIP("KWin inactive, skip Destkop panel tests");
|
||||
|
||||
QCOMPARE(plugin->dictKeys().count(), 4);
|
||||
pattern += plugin->dictKeys().join(QString(" $"));
|
||||
@ -77,7 +77,7 @@ void TestDPPlugin::test_dictKeys()
|
||||
void TestDPPlugin::test_infoByKey()
|
||||
{
|
||||
if (!m_isKwinActive)
|
||||
QSKIP("KWin inactive, skip tests");
|
||||
QSKIP("KWin inactive, skip Destkop panel tests");
|
||||
|
||||
// nothing to test here yet
|
||||
QVERIFY(true);
|
||||
@ -87,7 +87,7 @@ void TestDPPlugin::test_infoByKey()
|
||||
void TestDPPlugin::test_parsePattern()
|
||||
{
|
||||
if (!m_isKwinActive)
|
||||
QSKIP("KWin inactive, skip tests");
|
||||
QSKIP("KWin inactive, skip Destkop panel tests");
|
||||
|
||||
QString result = plugin->parsePattern(pattern, plugin->currentDesktop());
|
||||
QVERIFY(!result.isEmpty());
|
||||
@ -100,7 +100,7 @@ void TestDPPlugin::test_parsePattern()
|
||||
void TestDPPlugin::test_tooltipImage()
|
||||
{
|
||||
if (!m_isKwinActive)
|
||||
QSKIP("KWin inactive, skip tests");
|
||||
QSKIP("KWin inactive, skip Destkop panel tests");
|
||||
|
||||
QVariantMap data;
|
||||
data[QString("tooltipColor")] = QString("#000000");
|
||||
|
@ -75,6 +75,9 @@ void TestExtScript::test_run()
|
||||
|
||||
void TestExtScript::test_filters()
|
||||
{
|
||||
if (extScript->jsonFiltersFile().isEmpty())
|
||||
QSKIP("No json filters found for scripts, skip fitlers test");
|
||||
|
||||
extScript->setFilters(QStringList() << QString("newline"));
|
||||
// init spy
|
||||
QSignalSpy spy(extScript, SIGNAL(dataReceived(const QVariantHash &)));
|
||||
|
@ -75,6 +75,9 @@ void TestExtWeather::test_ts()
|
||||
|
||||
void TestExtWeather::test_image()
|
||||
{
|
||||
if (extWeather->jsonMapFile().isEmpty())
|
||||
QSKIP("No json map found for weather, skip image test");
|
||||
|
||||
extWeather->setImage(true);
|
||||
// init spy
|
||||
QSignalSpy spy(extWeather, SIGNAL(dataReceived(const QVariantHash &)));
|
||||
@ -129,6 +132,8 @@ void TestExtWeather::run()
|
||||
&& (arguments[extWeather->tag(QString("temperature"))].toFloat()
|
||||
< temp.second));
|
||||
// image should be only one symbol here
|
||||
if (extWeather->jsonMapFile().isEmpty())
|
||||
QSKIP("No json map found for weather, skip image test");
|
||||
QCOMPARE(arguments[extWeather->tag(QString("weather"))].toString().count(),
|
||||
1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user