tdf#154282: sw_uiwriter3: Add unittest
Change-Id: I48b0dd636f50bf0b4d08ee0d43593f6142babd3b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151566
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx b/sw/qa/extras/uiwriter/uiwriter3.cxx
index c1a8fae..ef6de9c 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -1780,6 +1780,21 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf134253)
CPPUNIT_ASSERT_EQUAL(6, getPages());
}
CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testNotebookBar)
{
createSwDoc();
//tdf#154282: Without the fix in place, this test would have crashed
dispatchCommand(mxComponent, ".uno:ToolbarMode?Mode:string=notebookbar.ui", {});
dispatchCommand(mxComponent, ".uno:ToolbarMode?Mode:string=Single", {});
dispatchCommand(mxComponent, ".uno:ToolbarMode?Mode:string=Sidebar", {});
dispatchCommand(mxComponent, ".uno:ToolbarMode?Mode:string=notebookbar_compact.ui", {});
dispatchCommand(mxComponent, ".uno:ToolbarMode?Mode:string=notebookbar_groupedbar_compact.ui",
{});
dispatchCommand(mxComponent, ".uno:ToolbarMode?Mode:string=notebookbar_single.ui", {});
dispatchCommand(mxComponent, ".uno:ToolbarMode?Mode:string=Default", {});
}
CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, TestAsCharTextBox)
{
// Related tickets: