refactor autotype sequences and entry-point functions

This commit is contained in:
thez3ro 2018-01-18 23:45:09 +01:00
parent b5cabbeb43
commit a9479fd662
No known key found for this signature in database
GPG key ID: F628F9E41DD7C073
8 changed files with 99 additions and 57 deletions

View file

@ -136,7 +136,7 @@ void TestAutoType::testInternal()
QCOMPARE(m_platform->activeWindowTitle(), QString("Test"));
}
void TestAutoType::testAutoTypeWithoutSequence()
void TestAutoType::testSingleAutoType()
{
m_autoType->performAutoType(m_entry1, nullptr);
@ -147,17 +147,6 @@ void TestAutoType::testAutoTypeWithoutSequence()
.arg(m_test->keyToString(Qt::Key_Enter)));
}
void TestAutoType::testAutoTypeWithSequence()
{
m_autoType->performAutoType(m_entry1, nullptr, "{Username}abc{PaSsWoRd}");
QCOMPARE(m_test->actionCount(), 15);
QCOMPARE(m_test->actionChars(),
QString("%1abc%2")
.arg(m_entry1->username())
.arg(m_entry1->password()));
}
void TestAutoType::testGlobalAutoTypeWithNoMatch()
{
m_test->setActiveWindowTitle("nomatch");