sc/qa/uitest/calc_tests/autofill.py |   14 --------------
 sc/qa/unit/ucalc.cxx                |   12 ++++++++++++
 2 files changed, 12 insertions(+), 14 deletions(-)

New commits:
commit be1a43651fb1da5872d4501b409d2811f142c525
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Wed Oct 12 20:20:48 2022 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Wed Oct 12 22:04:11 2022 +0200

    sc: move UItest to CppUnittest
    
    Change-Id: I6543994abe337041de5a1aab16a5a49105aacfbb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141271
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/qa/uitest/calc_tests/autofill.py 
b/sc/qa/uitest/calc_tests/autofill.py
index 294d60fd7102..3600d42c07eb 100644
--- a/sc/qa/uitest/calc_tests/autofill.py
+++ b/sc/qa/uitest/calc_tests/autofill.py
@@ -138,18 +138,4 @@ class CalcAutofill(UITestCase):
             self.assertEqual(get_cell_by_position(calc_doc, 0, 15, 
10).getString(), "10.64.127.6")
             self.assertEqual(get_cell_by_position(calc_doc, 0, 15, 
11).getString(), "10.64.127.7")
 
-    def test_autofill_with_suffix(self):
-        with self.ui_test.create_doc_in_start_center("calc") as document:
-            xCalcDoc = self.xUITest.getTopFocusWindow()
-            gridwin = xCalcDoc.getChild("grid_window")
-            enter_text_to_cell(gridwin, "A1", "1st")
-            gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "B2"}))
-            gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": 
"A1:A3"}))
-            with 
self.ui_test.execute_dialog_through_command(".uno:FillSeries") as xDialog:
-                xautofill = xDialog.getChild("autofill")
-                xautofill.executeAction("CLICK", tuple())
-            self.assertEqual(get_cell_by_position(document, 0, 0, 
0).getString(), "1st")
-            self.assertEqual(get_cell_by_position(document, 0, 0, 
1).getString(), "2nd")
-            self.assertEqual(get_cell_by_position(document, 0, 0, 
2).getString(), "3rd")
-
 # vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 7726a56f561d..271ddc83ee5a 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -4730,6 +4730,18 @@ void Test::testAutoFill()
     // - Actual  : 2022-10-01 19:59:59.999
     CPPUNIT_ASSERT_EQUAL( OUString("2022-10-01 20:00:00.000"), 
m_pDoc->GetString( 0, 20, 0 ) );
 
+    // Clear column A for a new test.
+    clearRange(m_pDoc, ScRange(0,0,0,0,m_pDoc->MaxRow(),0));
+    m_pDoc->SetRowHidden(0, m_pDoc->MaxRow(), 0, false); // Show all rows.
+
+    m_pDoc->SetString( 0, 0, 0, "1st" );
+
+    m_pDoc->Fill( 0, 0, 0, 0, nullptr, aMarkData, 5, FILL_TO_BOTTOM, FILL_AUTO 
);
+
+    CPPUNIT_ASSERT_EQUAL( OUString("1st"), m_pDoc->GetString( 0, 0, 0 ) );
+    CPPUNIT_ASSERT_EQUAL( OUString("2nd"), m_pDoc->GetString( 0, 1, 0 ) );
+    CPPUNIT_ASSERT_EQUAL( OUString("3rd"), m_pDoc->GetString( 0, 2, 0 ) );
+
     m_pDoc->DeleteTab(0);
 }
 

Reply via email to