File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -1088,6 +1088,17 @@ void TestGui::testTotp()
10881088
10891089 auto * editEntryWidget = m_dbWidget->findChild <EditEntryWidget*>(" editEntryWidget" );
10901090 editEntryWidget->switchToPage (EditEntryWidget::Page::Advanced);
1091+ QApplication::processEvents ();
1092+ // Find the "TOTP Seed" attribute in the list view
1093+ auto * attrListView = editEntryWidget->findChild <QListView*>(" attributesView" );
1094+ auto index = attrListView->model ()->index (0 , 0 );
1095+ for (auto i = 0 ; i < attrListView->model ()->rowCount (); ++i) {
1096+ index = attrListView->model ()->index (i, 0 );
1097+ if (attrListView->model ()->data (index).toString ().compare (" TOTP Seed" ) == 0 ) {
1098+ break ;
1099+ }
1100+ }
1101+ attrListView->setCurrentIndex (index);
10911102 auto * attrTextEdit = editEntryWidget->findChild <QPlainTextEdit*>(" attributesEdit" );
10921103 QTest::mouseClick (editEntryWidget->findChild <QAbstractButton*>(" revealAttributeButton" ), Qt::LeftButton);
10931104 QCOMPARE (attrTextEdit->toPlainText (), expectedFinalSeed);
You can’t perform that action at this time.
0 commit comments