Set speaking state in the radio button color test fixture

This commit is contained in:
evgeny committed 2026-10-08 00:38:04 +02:00
1 parent ba0b21b999
commit fde359b4af
1 file changed
+3
@@ -2,6 +2,7 @@
#include "../src/messagedelegate.h"
#include "../src/chatview.h"
#include "../src/accountdelegate.h"
#include "../src/memberlistmodel.h"
#include "../src/message_links.h"
#include "../../../lib/debug_config.h"
#include <QtTest>
@@ -461,6 +462,8 @@ private slots:
for (int x = row.right() - 63; x < row.right() - 35; ++x) count += image.pixel(x, y) == color;
return count;
};
QVERIFY(colorCount(QColor("#9E9E9E").rgb()) > 0); // Молчащий участник серый; зелёный означает передачу.
model.setData(index, true, MemberListModel::RadioSpeakingRole);
QVERIFY(colorCount(QColor("#4CAF50").rgb()) > 0);
QTest::mouseClick(view.viewport(), Qt::LeftButton, Qt::NoModifier, button);
QCOMPARE(toggles.count(), 1); QCOMPARE(qvariant_cast<QModelIndex>(toggles.first().first()).row(), 0);