Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit e0eceed2 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

[autotests] Test all scripted effects

Summary:
TestPluginEffectLoader and TestScriptedEffectLoader don't check some
scripted effects (eye on screen, morphing popups, and window aperture).

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17072
parent 7d5a009a
......@@ -110,17 +110,21 @@ void TestPluginEffectLoader::testHasEffect_data()
QTest::newRow("Zoom") << QStringLiteral("zoom") << false;
QTest::newRow("Non Existing") << QStringLiteral("InvalidName") << false;
// all the scripted effects should fail
QTest::newRow("DimScreen") << QStringLiteral("kwin4_effect_dimscreen") << false;
QTest::newRow("Fade") << QStringLiteral("kwin4_effect_fade") << false;
QTest::newRow("FadeDesktop") << QStringLiteral("kwin4_effect_fadedesktop") << false;
QTest::newRow("FadingPopups") << QStringLiteral("kwin4_effect_fadingpopups") << false;
QTest::newRow("DialogParent") << QStringLiteral("kwin4_effect_dialogparent") << false;
QTest::newRow("Login") << QStringLiteral("kwin4_effect_login") << false;
QTest::newRow("Logout") << QStringLiteral("kwin4_effect_logout") << false;
QTest::newRow("Maximize") << QStringLiteral("kwin4_effect_maximize") << false;
QTest::newRow("Scale") << QStringLiteral("kwin4_effect_scale") << false;
QTest::newRow("Squash") << QStringLiteral("kwin4_effect_squash") << false;
QTest::newRow("Translucency") << QStringLiteral("kwin4_effect_translucency") << false;
QTest::newRow("DialogParent") << QStringLiteral("kwin4_effect_dialogparent") << false;
QTest::newRow("DimScreen") << QStringLiteral("kwin4_effect_dimscreen") << false;
QTest::newRow("EyeOnScreen") << QStringLiteral("kwin4_effect_eyeonscreen") << false;
QTest::newRow("Fade") << QStringLiteral("kwin4_effect_fade") << false;
QTest::newRow("FadeDesktop") << QStringLiteral("kwin4_effect_fadedesktop") << false;
QTest::newRow("FadingPopups") << QStringLiteral("kwin4_effect_fadingpopups") << false;
QTest::newRow("FrozenApp") << QStringLiteral("kwin4_effect_frozenapp") << false;
QTest::newRow("Login") << QStringLiteral("kwin4_effect_login") << false;
QTest::newRow("Logout") << QStringLiteral("kwin4_effect_logout") << false;
QTest::newRow("Maximize") << QStringLiteral("kwin4_effect_maximize") << false;
QTest::newRow("MorphingPopups") << QStringLiteral("kwin4_effect_morphingpopups") << false;
QTest::newRow("Scale") << QStringLiteral("kwin4_effect_scale") << false;
QTest::newRow("Squash") << QStringLiteral("kwin4_effect_squash") << false;
QTest::newRow("Translucency") << QStringLiteral("kwin4_effect_translucency") << false;
QTest::newRow("WindowAperture") << QStringLiteral("kwin4_effect_windowaperture") << false;
// and the fake effects we use here
QTest::newRow("fakeeffectplugin") << QStringLiteral("fakeeffectplugin") << true;
QTest::newRow("fakeeffectplugin CS") << QStringLiteral("fakeEffectPlugin") << true;
......
......@@ -141,19 +141,23 @@ void TestScriptedEffectLoader::testHasEffect_data()
QTest::newRow("Zoom") << QStringLiteral("zoom") << false;
QTest::newRow("Non Existing") << QStringLiteral("InvalidName") << false;
QTest::newRow("Fade - without kwin4_effect") << QStringLiteral("fade") << false;
QTest::newRow("Fade + kwin4_effect") << QStringLiteral("kwin4_effect_fade") << true;
QTest::newRow("Fade + kwin4_effect + CS") << QStringLiteral("kwin4_eFfect_fAde") << true;
QTest::newRow("FadeDesktop") << QStringLiteral("kwin4_effect_fadedesktop") << true;
QTest::newRow("FadingPopups") << QStringLiteral("kwin4_effect_fadingpopups") << true;
QTest::newRow("FrozenApp") << QStringLiteral("kwin4_effect_frozenapp") << true;
QTest::newRow("DialogParent") << QStringLiteral("kwin4_effect_dialogparent") << true;
QTest::newRow("DimScreen") << QStringLiteral("kwin4_effect_dimscreen") << true;
QTest::newRow("Login") << QStringLiteral("kwin4_effect_login") << true;
QTest::newRow("Logout") << QStringLiteral("kwin4_effect_logout") << true;
QTest::newRow("Maximize") << QStringLiteral("kwin4_effect_maximize") << true;
QTest::newRow("Scale") << QStringLiteral("kwin4_effect_scale") << true;
QTest::newRow("Squash") << QStringLiteral("kwin4_effect_squash") << true;
QTest::newRow("Translucency") << QStringLiteral("kwin4_effect_translucency") << true;
QTest::newRow("DialogParent") << QStringLiteral("kwin4_effect_dialogparent") << true;
QTest::newRow("DimScreen") << QStringLiteral("kwin4_effect_dimscreen") << true;
QTest::newRow("EyeOnScreen") << QStringLiteral("kwin4_effect_eyeonscreen") << true;
QTest::newRow("Fade + kwin4_effect") << QStringLiteral("kwin4_effect_fade") << true;
QTest::newRow("Fade + kwin4_effect + CS") << QStringLiteral("kwin4_eFfect_fAde") << true;
QTest::newRow("FadeDesktop") << QStringLiteral("kwin4_effect_fadedesktop") << true;
QTest::newRow("FadingPopups") << QStringLiteral("kwin4_effect_fadingpopups") << true;
QTest::newRow("FrozenApp") << QStringLiteral("kwin4_effect_frozenapp") << true;
QTest::newRow("Login") << QStringLiteral("kwin4_effect_login") << true;
QTest::newRow("Logout") << QStringLiteral("kwin4_effect_logout") << true;
QTest::newRow("Maximize") << QStringLiteral("kwin4_effect_maximize") << true;
QTest::newRow("MorphingPopups") << QStringLiteral("kwin4_effect_morphingpopups") << true;
QTest::newRow("Scale") << QStringLiteral("kwin4_effect_scale") << true;
QTest::newRow("Squash") << QStringLiteral("kwin4_effect_squash") << true;
QTest::newRow("Translucency") << QStringLiteral("kwin4_effect_translucency") << true;
QTest::newRow("WindowAperture") << QStringLiteral("kwin4_effect_windowaperture") << true;
}
void TestScriptedEffectLoader::testHasEffect()
......@@ -179,6 +183,7 @@ void TestScriptedEffectLoader::testKnownEffects()
QStringList expectedEffects;
expectedEffects << QStringLiteral("kwin4_effect_dialogparent")
<< QStringLiteral("kwin4_effect_dimscreen")
<< QStringLiteral("kwin4_effect_eyeonscreen")
<< QStringLiteral("kwin4_effect_fade")
<< QStringLiteral("kwin4_effect_fadedesktop")
<< QStringLiteral("kwin4_effect_fadingpopups")
......@@ -186,9 +191,11 @@ void TestScriptedEffectLoader::testKnownEffects()
<< QStringLiteral("kwin4_effect_login")
<< QStringLiteral("kwin4_effect_logout")
<< QStringLiteral("kwin4_effect_maximize")
<< QStringLiteral("kwin4_effect_morphingpopups")
<< QStringLiteral("kwin4_effect_scale")
<< QStringLiteral("kwin4_effect_squash")
<< QStringLiteral("kwin4_effect_translucency");
<< QStringLiteral("kwin4_effect_translucency")
<< QStringLiteral("kwin4_effect_windowaperture");
KWin::ScriptedEffectLoader loader;
QStringList result = loader.listOfKnownEffects();
......@@ -204,21 +211,24 @@ void TestScriptedEffectLoader::testLoadEffect_data()
QTest::addColumn<QString>("name");
QTest::addColumn<bool>("expected");
QTest::newRow("Non Existing") << QStringLiteral("InvalidName") << false;
QTest::newRow("Fade - without kwin4_effect") << QStringLiteral("fade") << false;
QTest::newRow("Fade + kwin4_effect") << QStringLiteral("kwin4_effect_fade") << true;
QTest::newRow("Fade + kwin4_effect + CS") << QStringLiteral("kwin4_eFfect_fAde") << true;
QTest::newRow("FadeDesktop") << QStringLiteral("kwin4_effect_fadedesktop") << true;
QTest::newRow("FadingPopups") << QStringLiteral("kwin4_effect_fadingpopups") << true;
QTest::newRow("FrozenApp") << QStringLiteral("kwin4_effect_frozenapp") << true;
QTest::newRow("DialogParent") << QStringLiteral("kwin4_effect_dialogparent") << true;
QTest::newRow("DimScreen") << QStringLiteral("kwin4_effect_dimscreen") << true;
QTest::newRow("Login") << QStringLiteral("kwin4_effect_login") << true;
QTest::newRow("Logout") << QStringLiteral("kwin4_effect_logout") << true;
QTest::newRow("Maximize") << QStringLiteral("kwin4_effect_maximize") << true;
QTest::newRow("Scale") << QStringLiteral("kwin4_effect_scale") << true;
QTest::newRow("Squash") << QStringLiteral("kwin4_effect_squash") << true;
QTest::newRow("Translucency") << QStringLiteral("kwin4_effect_translucency") << true;
QTest::newRow("Non Existing") << QStringLiteral("InvalidName") << false;
QTest::newRow("Fade - without kwin4_effect") << QStringLiteral("fade") << false;
QTest::newRow("DialogParent") << QStringLiteral("kwin4_effect_dialogparent") << true;
QTest::newRow("DimScreen") << QStringLiteral("kwin4_effect_dimscreen") << true;
QTest::newRow("EyeOnScreen") << QStringLiteral("kwin4_effect_eyeonscreen") << true;
QTest::newRow("Fade + kwin4_effect") << QStringLiteral("kwin4_effect_fade") << true;
QTest::newRow("Fade + kwin4_effect + CS") << QStringLiteral("kwin4_eFfect_fAde") << true;
QTest::newRow("FadeDesktop") << QStringLiteral("kwin4_effect_fadedesktop") << true;
QTest::newRow("FadingPopups") << QStringLiteral("kwin4_effect_fadingpopups") << true;
QTest::newRow("FrozenApp") << QStringLiteral("kwin4_effect_frozenapp") << true;
QTest::newRow("Login") << QStringLiteral("kwin4_effect_login") << true;
QTest::newRow("Logout") << QStringLiteral("kwin4_effect_logout") << true;
QTest::newRow("Maximize") << QStringLiteral("kwin4_effect_maximize") << true;
QTest::newRow("MorphingPopups") << QStringLiteral("kwin4_effect_morphingpopups") << true;
QTest::newRow("Scale") << QStringLiteral("kwin4_effect_scale") << true;
QTest::newRow("Squash") << QStringLiteral("kwin4_effect_squash") << true;
QTest::newRow("Translucency") << QStringLiteral("kwin4_effect_translucency") << true;
QTest::newRow("WindowAperture") << QStringLiteral("kwin4_effect_windowaperture") << true;
}
void TestScriptedEffectLoader::testLoadEffect()
......
......@@ -4,3 +4,6 @@ install(FILES metadata.desktop DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effe
install(FILES metadata.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME}
RENAME kwin4_effect_morphingpopups.desktop)
file(COPY contents metadata.desktop
DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/kwin4_effect_morphingpopups)
......@@ -4,3 +4,6 @@ install(FILES metadata.desktop DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effe
install(FILES metadata.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME}
RENAME kwin4_effect_windowaperture.desktop)
file(COPY contents metadata.desktop
DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/kwin4_effect_windowaperture)
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