1
0
mirror of https://github.com/altlinux/admc.git synced 2025-01-08 01:18:25 +03:00

remove tab(); usage from test inits

use findChild() instead
*probably* fixes tests failing on KDE
This commit is contained in:
Dmitry Degtyarev 2021-05-25 13:31:17 +04:00
parent abce6a016c
commit 7d9a091ddc
4 changed files with 5 additions and 9 deletions

View File

@ -38,8 +38,7 @@ void ADMCTestCountryEdit::init() {
parent_widget->show();
QVERIFY(QTest::qWaitForWindowExposed(parent_widget, 1000));
tab();
combo = qobject_cast<QComboBox *>(QApplication::focusWidget());
combo = parent_widget->findChild<QComboBox *>();
QVERIFY(combo != nullptr);
// Create test user

View File

@ -39,8 +39,7 @@ void ADMCTestStringEdit::init() {
parent_widget->show();
QVERIFY(QTest::qWaitForWindowExposed(parent_widget, 1000));
tab();
line_edit = qobject_cast<QLineEdit *>(QApplication::focusWidget());
line_edit = parent_widget->findChild<QLineEdit *>();
QVERIFY(line_edit != nullptr);
// Create test user

View File

@ -43,8 +43,7 @@ void ADMCTestUnlockEdit::init() {
parent_widget->show();
QVERIFY(QTest::qWaitForWindowExposed(parent_widget, 1000));
tab();
checkbox = qobject_cast<QCheckBox *>(QApplication::focusWidget());
checkbox = parent_widget->findChild<QCheckBox *>();
QVERIFY(checkbox != nullptr);
// Create test user

View File

@ -40,11 +40,10 @@ void ADMCTestUpnEdit::init() {
parent_widget->show();
QVERIFY(QTest::qWaitForWindowExposed(parent_widget, 1000));
prefix_edit = qobject_cast<QLineEdit *>(QApplication::focusWidget());
prefix_edit = parent_widget->findChild<QLineEdit *>();
QVERIFY(prefix_edit != nullptr);
tab();
suffix_edit = qobject_cast<QComboBox *>(QApplication::focusWidget());
suffix_edit = parent_widget->findChild<QComboBox *>();
QVERIFY(suffix_edit != nullptr);
// Create test user