Browse Source

Set speaking state in the radio button color test fixture

master
evgeny 4 days ago
parent
commit
fde359b4af
  1. 3
      tools/chatgui/tests/test_invite_links.cpp

3
tools/chatgui/tests/test_invite_links.cpp

@ -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);

Loading…
Cancel
Save