13.19h: the acceptance run checks the seventeen rows new in 1.4.5 through the window's own controls; shots retaken
This commit is contained in:
1 parent
8bd3fc3264
commit
c59e85babc
23 files changed
+709
-39
No files matched your search
@@ -5,6 +5,8 @@
|
||||
#include "UI/CompositorMenus.h"
|
||||
#include "UI/OmarchyTheme.h"
|
||||
#include "UI/ProjectWorkspaceView.h"
|
||||
#include <QAbstractItemView>
|
||||
#include <QComboBox>
|
||||
#include <QDir>
|
||||
#include <QPainter>
|
||||
#include <QTemporaryDir>
|
||||
@@ -88,6 +90,25 @@ struct App {
|
||||
}
|
||||
};
|
||||
|
||||
// A combo box popup row, where the pointer finds it.
|
||||
inline QPoint popupRow(QComboBox &box, const QString &text)
|
||||
{
|
||||
box.showPopup();
|
||||
if (!QTest::qWaitFor([&box] { return box.view()->isVisible(); }, 2000))
|
||||
throw std::runtime_error("the menu never opened");
|
||||
const int row = box.findText(text);
|
||||
if (row < 0)
|
||||
throw std::runtime_error("no such entry");
|
||||
return box.view()->visualRect(box.model()->index(row, 0)).center();
|
||||
}
|
||||
|
||||
// Chooses an entry with a click in its popup.
|
||||
inline void choose(QComboBox &box, const QString &text)
|
||||
{
|
||||
const QPoint row = popupRow(box, text);
|
||||
QTest::mouseClick(box.view()->viewport(), Qt::LeftButton, Qt::NoModifier, row);
|
||||
}
|
||||
|
||||
// A photograph's stand-in: sky, ground and a red disc.
|
||||
inline QImage scene(int width, int height)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user