Commit 5b5ef039 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Add test that opens the print preview dialog

At least this way we may find earlier gross mistakes like the one
causing bug 415340

CCBUGS: 415340
parent 1ad74b6c
Pipeline #12586 passed with stage
in 10 minutes and 28 seconds
......@@ -137,6 +137,7 @@ class PartTest
void testTypewriterAnnotTool();
void testJumpToPage();
void testTabletProximityBehavior();
void testOpenPrintPreview();
private:
void simulateMouseSelection(double startX, double startY, double endX, double endY, QWidget *target);
......@@ -1944,6 +1945,17 @@ void PartTest::testTabletProximityBehavior()
QVERIFY( w->cursor().shape() == Qt::CursorShape( Qt::ArrowCursor ) );
}
void PartTest::testOpenPrintPreview()
{
QVariantList dummyArgs;
Okular::Part part{ nullptr, nullptr, dummyArgs };
QVERIFY( openDocument( &part, QStringLiteral( KDESRCDIR "data/file1.pdf" ) ) );
part.widget()->show();
QVERIFY(QTest::qWaitForWindowExposed(part.widget()));
CloseDialogHelper closeDialogHelper( QDialogButtonBox::Close );
part.slotPrintPreview();
}
} // namespace Okular
int main(int argc, char *argv[])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment