From 2ad694bb69576aef08071889055eac57b2414a17 Mon Sep 17 00:00:00 2001 From: "Oliver Craemer [oc]" Date: Mon, 31 Jan 2011 11:08:57 +0100 Subject: [PATCH] #i116721# Autotests for new option in csv export --- testautomation/global/win/dial_d_h.win | 1 + .../required/includes/c_upd_filemenu.inc | 64 +++++++++++++++++++ 2 files changed, 65 insertions(+) mode change 100644 => 100755 testautomation/global/win/dial_d_h.win diff --git a/testautomation/global/win/dial_d_h.win b/testautomation/global/win/dial_d_h.win old mode 100644 new mode 100755 index ba6673edb39d..01a2ac921041 --- a/testautomation/global/win/dial_d_h.win +++ b/testautomation/global/win/dial_d_h.win @@ -264,6 +264,7 @@ Synchronisieren sym:sw:PushButton:DLG_SYNC_BTN:BTN_SYNC Zeichensatzliste sym:sc:ListBox:RID_SCDLG_IMPORTOPT:LB_FONT Feldtrenner sym:sc:ComboBox:RID_SCDLG_IMPORTOPT:ED_FIELDSEP Texttrenner sym:sc:ComboBox:RID_SCDLG_IMPORTOPT:ED_TEXTSEP +QuoteAll sym:sc:CheckBox:RID_SCDLG_IMPORTOPT:CB_QUOTEALL Zeichensatz sym:sc:ListBox:RID_SCDLG_IMPORTOPT:DDLB_FONT FixedWidth sym:sc:CheckBox:RID_SCDLG_IMPORTOPT:CB_FIXEDWIDTH SaveAsShown sym:sc:CheckBox:RID_SCDLG_IMPORTOPT:CB_SAVESHOWN diff --git a/testautomation/spreadsheet/required/includes/c_upd_filemenu.inc b/testautomation/spreadsheet/required/includes/c_upd_filemenu.inc index 38c25d41bde5..33c52111c384 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 @@ -547,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 Test " + 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