mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-05-02 14:46:07 -04:00
Import Auto-Type associations in KeePass1Reader.
This commit is contained in:
parent
8cf6289d9c
commit
b6d9c2e486
5 changed files with 95 additions and 1 deletions
|
@ -139,6 +139,36 @@ void TestKeePass1Reader::testGroupExpanded()
|
|||
false);
|
||||
}
|
||||
|
||||
void TestKeePass1Reader::testAutoType()
|
||||
{
|
||||
Group* group = m_db->rootGroup()->children().at(0)->children().at(0);
|
||||
QCOMPARE(group->entries().size(), 2);
|
||||
|
||||
Entry* entry1 = group->entries().at(0);
|
||||
QCOMPARE(entry1->notes(), QString("last line"));
|
||||
QCOMPARE(entry1->defaultAutoTypeSequence(), QString("{USERNAME}{ENTER}"));
|
||||
QCOMPARE(entry1->autoTypeAssociations()->size(), 5);
|
||||
QCOMPARE(entry1->autoTypeAssociations()->get(0).sequence, QString(""));
|
||||
QCOMPARE(entry1->autoTypeAssociations()->get(0).window, QString("a window"));
|
||||
QCOMPARE(entry1->autoTypeAssociations()->get(1).sequence, QString(""));
|
||||
QCOMPARE(entry1->autoTypeAssociations()->get(1).window, QString("a second window"));
|
||||
QCOMPARE(entry1->autoTypeAssociations()->get(2).sequence, QString("{PASSWORD}{ENTER}"));
|
||||
QCOMPARE(entry1->autoTypeAssociations()->get(2).window, QString("Window Nr 1a"));
|
||||
QCOMPARE(entry1->autoTypeAssociations()->get(3).sequence, QString("{PASSWORD}{ENTER}"));
|
||||
QCOMPARE(entry1->autoTypeAssociations()->get(3).window, QString("Window Nr 1b"));
|
||||
QCOMPARE(entry1->autoTypeAssociations()->get(4).sequence, QString(""));
|
||||
QCOMPARE(entry1->autoTypeAssociations()->get(4).window, QString("Window 2"));
|
||||
|
||||
Entry* entry2 = group->entries().at(1);
|
||||
QCOMPARE(entry2->notes(), QString("start line\nend line"));
|
||||
QCOMPARE(entry2->defaultAutoTypeSequence(), QString(""));
|
||||
QCOMPARE(entry2->autoTypeAssociations()->size(), 2);
|
||||
QCOMPARE(entry2->autoTypeAssociations()->get(0).sequence, QString(""));
|
||||
QCOMPARE(entry2->autoTypeAssociations()->get(0).window, QString("Main Window"));
|
||||
QCOMPARE(entry2->autoTypeAssociations()->get(1).sequence, QString(""));
|
||||
QCOMPARE(entry2->autoTypeAssociations()->get(1).window, QString("Test Window"));
|
||||
}
|
||||
|
||||
void TestKeePass1Reader::testFileKey()
|
||||
{
|
||||
QFETCH(QString, type);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue