autotests: rename to testInputMethod

Relevant class got renamed, also update the test name

Related: plasma/kwin!302
This commit is contained in:
Bhushan Shah 2020-09-30 15:58:42 +05:30
parent 309a656e00
commit 474d0344ca
3 changed files with 10 additions and 10 deletions

View file

@ -467,6 +467,7 @@ set(kwin_SRCS
input.cpp input.cpp
input_event.cpp input_event.cpp
input_event_spy.cpp input_event_spy.cpp
inputmethod.cpp
inputpanelv1client.cpp inputpanelv1client.cpp
inputpanelv1integration.cpp inputpanelv1integration.cpp
internal_client.cpp internal_client.cpp
@ -531,7 +532,6 @@ set(kwin_SRCS
utils.cpp utils.cpp
virtualdesktops.cpp virtualdesktops.cpp
virtualdesktopsdbustypes.cpp virtualdesktopsdbustypes.cpp
inputmethod.cpp
virtualkeyboard_dbus.cpp virtualkeyboard_dbus.cpp
was_user_interaction_x11_filter.cpp was_user_interaction_x11_filter.cpp
wayland_server.cpp wayland_server.cpp

View file

@ -86,7 +86,7 @@ integrationTest(WAYLAND_ONLY NAME testNoGlobalShortcuts SRCS no_global_shortcuts
integrationTest(WAYLAND_ONLY NAME testBufferSizeChange SRCS buffer_size_change_test.cpp ) integrationTest(WAYLAND_ONLY NAME testBufferSizeChange SRCS buffer_size_change_test.cpp )
integrationTest(WAYLAND_ONLY NAME testPlacement SRCS placement_test.cpp) integrationTest(WAYLAND_ONLY NAME testPlacement SRCS placement_test.cpp)
integrationTest(WAYLAND_ONLY NAME testActivation SRCS activation_test.cpp) integrationTest(WAYLAND_ONLY NAME testActivation SRCS activation_test.cpp)
integrationTest(WAYLAND_ONLY NAME testVirtualKeyboard SRCS virtualkeyboard_test.cpp) integrationTest(WAYLAND_ONLY NAME testInputMethod SRCS inputmethod_test.cpp)
if (XCB_ICCCM_FOUND) if (XCB_ICCCM_FOUND)
integrationTest(NAME testMoveResize SRCS move_resize_window_test.cpp LIBS XCB::ICCCM) integrationTest(NAME testMoveResize SRCS move_resize_window_test.cpp LIBS XCB::ICCCM)

View file

@ -40,9 +40,9 @@ using namespace KWin;
using namespace KWayland::Client; using namespace KWayland::Client;
using KWin::VirtualKeyboardDBus; using KWin::VirtualKeyboardDBus;
static const QString s_socketName = QStringLiteral("wayland_test_kwin_virtualkeyboard-0"); static const QString s_socketName = QStringLiteral("wayland_test_kwin_inputmethod-0");
class VirtualKeyboardTest : public QObject class InputMethodTest : public QObject
{ {
Q_OBJECT Q_OBJECT
private Q_SLOTS: private Q_SLOTS:
@ -55,7 +55,7 @@ private Q_SLOTS:
}; };
void VirtualKeyboardTest::initTestCase() void InputMethodTest::initTestCase()
{ {
qRegisterMetaType<KWin::Deleted *>(); qRegisterMetaType<KWin::Deleted *>();
qRegisterMetaType<KWin::AbstractClient *>(); qRegisterMetaType<KWin::AbstractClient *>();
@ -77,7 +77,7 @@ void VirtualKeyboardTest::initTestCase()
} }
void VirtualKeyboardTest::init() void InputMethodTest::init()
{ {
QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::Seat | QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::Seat |
Test::AdditionalWaylandInterface::TextInputManagerV2 | Test::AdditionalWaylandInterface::TextInputManagerV2 |
@ -95,12 +95,12 @@ void VirtualKeyboardTest::init()
QDBusConnection::sessionBus().call(message); QDBusConnection::sessionBus().call(message);
} }
void VirtualKeyboardTest::cleanup() void InputMethodTest::cleanup()
{ {
Test::destroyWaylandConnection(); Test::destroyWaylandConnection();
} }
void VirtualKeyboardTest::testOpenClose() void InputMethodTest::testOpenClose()
{ {
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded); QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
QSignalSpy clientRemovedSpy(workspace(), &Workspace::clientRemoved); QSignalSpy clientRemovedSpy(workspace(), &Workspace::clientRemoved);
@ -154,7 +154,7 @@ void VirtualKeyboardTest::testOpenClose()
QVERIFY(Test::waitForWindowDestroyed(client)); QVERIFY(Test::waitForWindowDestroyed(client));
} }
void VirtualKeyboardTest::testEnableDisableV3() void InputMethodTest::testEnableDisableV3()
{ {
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded); QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
QSignalSpy clientRemovedSpy(workspace(), &Workspace::clientRemoved); QSignalSpy clientRemovedSpy(workspace(), &Workspace::clientRemoved);
@ -188,6 +188,6 @@ void VirtualKeyboardTest::testEnableDisableV3()
QVERIFY(clientRemovedSpy.wait()); QVERIFY(clientRemovedSpy.wait());
} }
WAYLANDTEST_MAIN(VirtualKeyboardTest) WAYLANDTEST_MAIN(InputMethodTest)
#include "virtualkeyboard_test.moc" #include "virtualkeyboard_test.moc"