14.18: Export As for PNG, JPEG and PDF, sized, over a checkerboard

This commit is contained in:
ZacharyZhang-NY committed 2026-10-11 09:10:51 -04:00
1 parent e6b7f043bb
commit 9be01073df
26 files changed
+1352 -688

No files matched your search

+4 -4
View File
@@ -1,6 +1,6 @@
#include "AcceptanceFixtures.h"
#include "DialogDesk.h"
#include "UI/JPEGExportSheet.h"
#include "UI/ExportAsSheet.h"
#include <QComboBox>
#include <map>
#include <QLineEdit>
@@ -164,11 +164,11 @@ void AcceptanceFinishTests::jpegPreviewAndQuitMidEdit()
photo(app);
// Export JPEG: View keys zoom to 100% and back.
bool done = false;
app.workspace.current().controller.exportJPEG([&done] { done = true; });
QTRY_VERIFY(app.window.findChild<JPEGExportSheet *>());
app.workspace.current().controller.exportAs(ExportFormat::jpeg, [&done] { done = true; });
QTRY_VERIFY(app.window.findChild<ExportAsSheet *>());
auto *preview = app.window.findChild<JPEGPreview *>();
QVERIFY(preview && !preview->zoom());
JPEGExportSheet *sheet = app.window.findChild<JPEGExportSheet *>();
ExportAsSheet *sheet = app.window.findChild<ExportAsSheet *>();
QTest::keyClick(sheet, Qt::Key_1, Qt::ControlModifier);
QCOMPARE(preview->zoom(), std::optional<double>(1));
QTest::keyClick(sheet, Qt::Key_Equal, Qt::ControlModifier);