diff options
Diffstat (limited to 'testautomation/spreadsheet/required/includes/c_upd_filemenu.inc')
-rw-r--r--[-rwxr-xr-x] | testautomation/spreadsheet/required/includes/c_upd_filemenu.inc | 81 |
1 files changed, 76 insertions, 5 deletions
diff --git a/testautomation/spreadsheet/required/includes/c_upd_filemenu.inc b/testautomation/spreadsheet/required/includes/c_upd_filemenu.inc index 70a75dd244f9..33c52111c384 100755..100644 --- a/testautomation/spreadsheet/required/includes/c_upd_filemenu.inc +++ b/testautomation/spreadsheet/required/includes/c_upd_filemenu.inc @@ -40,6 +40,7 @@ ' #1 tFileRecentDocuments ' #1 tFileClose ' #1 tFileSave +' #1 tFileSaveAsCSV ' #1 tFileSaveAsDBF ' #1 tFileVersions ' #1 tFilePagePreview @@ -59,6 +60,7 @@ sub c_upd_filemenu Call tFileRecentDocuments Call tFileClose Call tFileSave + Call tFileSaveAsCSV Call tFileSaveAsDBF Call tFileVersions Call tFilePagePreview @@ -238,6 +240,7 @@ testcase tFileOpenCSV Oeffnen.Click Kontext "TextImport" TextImport.ok + sleep (2) Printlog " - CSV import dialog is in function" sleep (1) Kontext "DocumentCalc" @@ -358,7 +361,7 @@ endcase testcase tFileRecentDocuments if gPlatform = "lin" then - qaerrorlog "#110649# Due to bug this testcase is not available" + warnlog "#110649# Due to bug this testcase is not available" goto endsub end if @@ -371,11 +374,15 @@ end if Printlog " Enter some text" Kontext "DocumentCalc" DocumentCalc.Typekeys "The first doc!<RETURN>" + Printlog " Copy Test File spreadsheet/required/input/recentdocument.ods locally" - app.FileCopy convertpath(gTesttoolpath & "spreadsheet\required\input\recentdocument.ods"),gOfficePath + ConvertPath("user/work/recentdocument.ods") - Printlog " Load local copied testfile recentdocument.ods" - sTestFile = convertpath(gOfficePath & "user/work/recentdocument.ods") - Call hFileOpen(sTestFile) + hFileOpenLocally( gTesttoolpath & "spreadsheet\required\input\recentdocument.ods" ) + sTestFile = gLastWorkFile ' get the new file location + + 'app.FileCopy convertpath(gTesttoolpath & "spreadsheet\required\input\recentdocument.ods"),gOfficePath + ConvertPath("user/work/recentdocument.ods") + 'Printlog " Load local copied testfile recentdocument.ods" + 'sTestFile = convertpath(gOfficePath & "user/work/recentdocument.ods") + 'Call hFileOpen(sTestFile) '/// Close the document. Printlog " Close the document." '/// Now an item in <i>File / Recent Documents</i> should exist @@ -412,6 +419,8 @@ end if '/// Close starting document Printlog " Close starting document" Call hCloseDocument + Printlog " Delete local copy of the workfile" + hFileDelete( sTestFile ) endcase '----------------------------------------------------------- @@ -540,6 +549,68 @@ endcase '----------------------------------------------------------- +testcase tFileSaveAsCSV + + Dim UIFilter as string + Dim bStatus as boolean + + Printlog " Open new Spreadsheet document" + Call hNewDocument + Printlog " Fill two cells (10, Test)" + Kontext "DocumentCalc" + DocumentCalc.Typekeys "10 <TAB> Test <RETURN>" + Printlog " Open 'SaveAs' dialog" + FileSaveAs + Kontext "SpeichernDlg" + Printlog " Enter filename 'csv-Test_update'" + DateiName.SetText "csv-Test_update" + Printlog " Choose file typ CSV" + UIFilter = hGetUIFiltername ( "Text - txt - csv (StarCalc)" ) + bStatus = hSelectUIFilter ( UIFilter ) + if ( not bStatus ) then + warnlog "Filter not found" + SpeichernDlg.Cancel + Call hCloseDocument + goto endsub + end if + Printlog " Click on Save button" + Speichern.click + Printlog " Commit overwrite warning if file already exists" + Kontext + if Active.exists(2) then + Active.Yes + end if + Printlog " Check alien file format warning" + Kontext "AlienWarning" + if AlienWarning.exists(2) then + Printlog " Commit if exists" + AlienWarning.OK + else + warnlog "Alien file format warning is missing -> Check this out!" + end if + Printlog " Check existence of export encoding dialog" + Kontext "ExportCalc" + Call DialogTest (ExportCalc) + printlog " Verify that Quote All is disabled by default" + if QuoteAll.IsChecked then + warnlog " Option Quote All is checked but shouldn't" + end if + Printlog " Accept dialog by OK" + ExportCalc.OK + Kontext + if Active.exists(2) then + Printlog Active.GetText + Active.OK + else + warnlog " Messagebox that only the current sheet is saved is missing" + end if + Printlog " Close document" + Call hCloseDocument + +endcase + +'----------------------------------------------------------- + testcase tFileSaveAsDBF Dim UIFilter as string |