CWS-TOOLING: integrate CWS tl79
This commit is contained in:
commit
e8d54724f0
8 changed files with 155 additions and 546 deletions
624
testautomation/framework/optional/includes/options_ooo_general.inc
Normal file → Executable file
624
testautomation/framework/optional/includes/options_ooo_general.inc
Normal file → Executable file
|
@ -25,39 +25,19 @@
|
|||
'
|
||||
'/************************************************************************
|
||||
'*
|
||||
'* owner : thorsten.bosbach@sun.com
|
||||
'* owner : joerg.skottke@sun.com
|
||||
'*
|
||||
'* short description : Grid Layout for CJK test in Writer
|
||||
'* short description : 1. test for general group userdata ... view)
|
||||
'*
|
||||
'\***********************************************************************
|
||||
|
||||
private const SOURCE_PATH = "framework\optional\input\CJK\"
|
||||
testcase tOOoGeneral
|
||||
|
||||
testcase tTextGridDialog_1
|
||||
dim lsSave (4) as String
|
||||
dim lbSave (3) as Boolean
|
||||
|
||||
'/// Check if tabpage 'Text Grid' disappears when "Asian Language support" is NOT checked
|
||||
if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
|
||||
Call CheckAsianLanguageSupport("Off")
|
||||
hNewDocument()
|
||||
FormatPageWriter
|
||||
try
|
||||
Kontext
|
||||
Active.SetPage TabGrid
|
||||
Kontext "TabGrid"
|
||||
TabGrid.Cancel
|
||||
warnlog "Shouldn't get Tabpage: Grid Text"
|
||||
catch
|
||||
Kontext
|
||||
Active.SetPage TabSeite
|
||||
Kontext "TabSeite"
|
||||
TabSeite.Cancel
|
||||
endcatch
|
||||
endif
|
||||
hNewDocument
|
||||
|
||||
'/// Check if tabpage 'Text Grid' appears when "Asian Language support" is checked
|
||||
Call CheckAsianLanguageSupport("On")
|
||||
|
||||
hNewDocument
|
||||
ToolsOptions
|
||||
hToolsOptions ( "StarOffice", "General" )
|
||||
|
||||
|
@ -85,499 +65,129 @@ testcase tTextGridDialog_1
|
|||
if ( ExtrasOptionenDlg.notExists( 3 ) ) then
|
||||
printlog( "Options closed" )
|
||||
endif
|
||||
hCloseDocument()
|
||||
endcase
|
||||
|
||||
'-------------------------------------------------------------------------
|
||||
|
||||
testcase tTextGridDialog_2
|
||||
'/// No grid is active, no changes to existing version
|
||||
Dim testFile , sCorrectResult as String
|
||||
hCloseDocument
|
||||
|
||||
testFile = "gridtest.sxw"
|
||||
sCorrectResult = "1"
|
||||
printlog " - exit/restart StarOffice"
|
||||
ExitRestartTheOffice
|
||||
|
||||
Call hNewDocument
|
||||
printlog " - check data"
|
||||
ToolsOptions
|
||||
hToolsOptions ( "StarOffice", "General" )
|
||||
|
||||
'/// open a test file , and check No Grid checkbox
|
||||
Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
|
||||
sMakeReadOnlyDocumentEditable
|
||||
if Zweistellig.GetText <> "1950" then Warnlog "Year ( 2 digits ) => changes not saved: '" + Zweistellig.GetText +"' #i29810"
|
||||
if Aktivieren.IsChecked <> TRUE then Warnlog "Enable HelpAgent => changes not saved"
|
||||
Zuruecksetzen.Click
|
||||
if gPlatgroup = "w95" then
|
||||
if StarOfficeDialogeBenutzen.IsChecked = lbSave (2) then Warnlog "Use StarOffice dialogs => changes not saved!"
|
||||
end if
|
||||
If DruckenStatus.IsChecked = lbSave ( 3 ) then Warnlog "Printing sets 'Document modified' status => changes not saved!"
|
||||
|
||||
FormatPageWriter
|
||||
Kontext
|
||||
if active.exists(5) then
|
||||
Active.SetPage TabGrid
|
||||
printlog " - 2. change data"
|
||||
Zweistellig.SetText "1800"
|
||||
DruckenStatus.UnCheck
|
||||
|
||||
Kontext "ExtrasOptionenDlg"
|
||||
ExtrasOptionenDlg.OK
|
||||
if ( ExtrasOptionenDlg.notExists( 3 ) ) then
|
||||
printlog( "Options closed" )
|
||||
endif
|
||||
Kontext "TabGrid"
|
||||
NoGrid.Check
|
||||
Sleep 1
|
||||
TabGrid.OK
|
||||
Sleep 1
|
||||
|
||||
'/// Active navigator dialogue , set page to '2' and wait for a while
|
||||
Kontext
|
||||
ViewNavigator
|
||||
Kontext "NavigatorWriter"
|
||||
|
||||
Seitennummer.SetText "2"
|
||||
Sleep 5
|
||||
hCloseNavigator
|
||||
|
||||
'/// In No Grid mode, there should be only 1 page, the focus is before the first line
|
||||
Kontext "DocumentWriter"
|
||||
Call DocumentWriter.TypeKeys "<End>"
|
||||
Sleep 1
|
||||
Call DocumentWriter.TypeKeys "<Shift Left>"
|
||||
hUseAsyncSlot( "EditCopy" )
|
||||
|
||||
if GetClipboardText <> sCorrectResult then Warnlog "Something wrong when choosing NoGrid option!"
|
||||
|
||||
Call hCloseDocument
|
||||
endcase
|
||||
|
||||
'-------------------------------------------------------------------------
|
||||
|
||||
testcase tTextGridDialog_3
|
||||
'/// Grid (lines only): The page is set up with a defined number of lines
|
||||
Dim testFile , sCorrectResult , sLinesPerPage as String
|
||||
|
||||
testFile = "gridtest.sxw"
|
||||
sCorrectResult = "G"
|
||||
sLinesPerPage = "10"
|
||||
|
||||
Call hNewDocument
|
||||
|
||||
'/// open a test file and check Grid(lines onle) checkbox ,
|
||||
'/// + set 10 line/page
|
||||
Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
|
||||
sMakeReadOnlyDocumentEditable
|
||||
FormatPageWriter
|
||||
Kontext
|
||||
if active.exists(5) then
|
||||
Active.SetPage TabGrid
|
||||
endif
|
||||
Kontext "TabGrid"
|
||||
LinesGrid.Check
|
||||
LinesPerPage.SetText sLinesPerPage
|
||||
Sleep 1
|
||||
TabGrid.OK
|
||||
Sleep 1
|
||||
|
||||
'/// Active navigator dialogue , set page to '2' and wait for a while
|
||||
Kontext
|
||||
ViewNavigator
|
||||
Kontext "NavigatorWriter"
|
||||
|
||||
Seitennummer.SetText "2"
|
||||
Sleep 5
|
||||
hCloseNavigator
|
||||
|
||||
Kontext "DocumentWriter"
|
||||
Call DocumentWriter.TypeKeys "<End>"
|
||||
Sleep 1
|
||||
Call DocumentWriter.TypeKeys "<Shift Left>"
|
||||
hUseAsyncSlot( "EditCopy" )
|
||||
|
||||
if GetClipboardText <> sCorrectResult then Warnlog "Something wrong when choosing Grid(lines only) option!"
|
||||
|
||||
Call hCloseDocument
|
||||
endcase
|
||||
|
||||
'-------------------------------------------------------------------------
|
||||
|
||||
testcase tTextGridDialog_4
|
||||
'/// Grid (lines and characters): The page is set up with a defined number of lines and a defined number of characters in each line
|
||||
Dim testFile , sCorrectResult as String
|
||||
Dim sLinesPerPage , sCharsPerLine as String
|
||||
|
||||
testFile = "gridtest.sxw"
|
||||
sCorrectResult = "E"
|
||||
sLinesPerPage = "10"
|
||||
sCharsPerLine = "9"
|
||||
|
||||
Call hNewDocument
|
||||
|
||||
'/// open a test file and check Grid(lines and characters) checkbox
|
||||
'/// + set 10 line/page and 9 characters/line
|
||||
Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
|
||||
sMakeReadOnlyDocumentEditable
|
||||
FormatPageWriter
|
||||
Kontext
|
||||
if active.exists(5) then
|
||||
Active.SetPage TabGrid
|
||||
endif
|
||||
Kontext "TabGrid"
|
||||
CharsGrid.Check
|
||||
LinesPerPage.SetText sLinesPerPage
|
||||
CharsPerLine.SetText sCharsPerLine
|
||||
Sleep 1
|
||||
TabGrid.OK
|
||||
Sleep 1
|
||||
|
||||
'/// Active navigator dialogue , set page to '2' and wait for a while
|
||||
Kontext
|
||||
ViewNavigator
|
||||
Kontext "NavigatorWriter"
|
||||
|
||||
Seitennummer.SetText "2"
|
||||
Sleep 5
|
||||
hCloseNavigator
|
||||
|
||||
Kontext "DocumentWriter"
|
||||
Call DocumentWriter.TypeKeys "<End>"
|
||||
Sleep 1
|
||||
Call DocumentWriter.TypeKeys "<Shift Left>"
|
||||
hUseAsyncSlot( "EditCopy" )
|
||||
|
||||
if GetClipboardText <> sCorrectResult then Warnlog "Something wrong when choosing Grid(lines and characters) option!"
|
||||
|
||||
Call hCloseDocument
|
||||
endcase
|
||||
|
||||
'-------------------------------------------------------------------------
|
||||
|
||||
testcase tGridDisplay_1
|
||||
'/// Print grid: The grid lines will be printed. Inactive if "Display grid" is inactive.
|
||||
Call hNewDocument
|
||||
|
||||
'/// format / page / tabpage Text grid
|
||||
'/// + check "display grid" and check "print grid"
|
||||
FormatPageWriter
|
||||
Kontext
|
||||
if active.exists(5) then
|
||||
Active.SetPage TabGrid
|
||||
endif
|
||||
Kontext "TabGrid"
|
||||
CharsGrid.Check
|
||||
Display.Check
|
||||
Sleep 1
|
||||
PrintGrid.Check
|
||||
Sleep 1
|
||||
TabGrid.OK
|
||||
Sleep 1
|
||||
|
||||
'/// Print to printer
|
||||
FilePrint
|
||||
Kontext "Active"
|
||||
if ( Active.Exists( 5 ) ) then
|
||||
if Active.GetRT() = 304 then
|
||||
Active.Ok()
|
||||
QAErrorLog "No Default-Printer!"
|
||||
Kontext "Printing"
|
||||
if ( Printing.exists( 1 )) then
|
||||
Printing.Cancel
|
||||
'It's a little tricky to reproduce.
|
||||
if gPlatgroup = "unx" then
|
||||
hNewDocument()
|
||||
FilePrint
|
||||
Kontext "DruckenDLG"
|
||||
if DruckenDLG.exists(5) then
|
||||
if gPlatform <> "osx" then
|
||||
Eigenschaften.click
|
||||
kontext
|
||||
active.setPage TabSPAPaper
|
||||
Kontext "TabSPAPaper"
|
||||
if TabSPAPaper.exists (5) then
|
||||
TabSPAPaper.OK
|
||||
sleep 5
|
||||
else
|
||||
qaErrorlog "Properties of Printer didn't come up."
|
||||
endif
|
||||
end if
|
||||
Kontext "DruckenDLG"
|
||||
DruckenDLG.OK
|
||||
' check state
|
||||
kontext
|
||||
if active.exists(5) then
|
||||
printlog "active: printing failed? '" + active.gettext + "'"
|
||||
active.ok
|
||||
endif
|
||||
endif
|
||||
else
|
||||
Kontext "Printing"
|
||||
if ( Printing.exists( 2 )) then
|
||||
Printing.OK()
|
||||
Printing.notExists( 5 )
|
||||
endif
|
||||
|
||||
kontext "Active"
|
||||
if active.exists(5) then
|
||||
qaErrorLog active.getText()
|
||||
active.ok()
|
||||
endif
|
||||
endif
|
||||
|
||||
'/// format / page / tabpage Text grid
|
||||
'/// + check "display grid" and uncheck "print grid"
|
||||
FormatPageWriter
|
||||
Kontext
|
||||
if active.exists(5) then
|
||||
Active.SetPage TabGrid
|
||||
endif
|
||||
Kontext "TabGrid"
|
||||
CharsGrid.Check
|
||||
Display.Check
|
||||
Sleep 1
|
||||
PrintGrid.UnCheck
|
||||
Sleep 1
|
||||
TabGrid.OK
|
||||
Sleep 1
|
||||
|
||||
'/// Print to printer
|
||||
FilePrint
|
||||
Kontext "Active"
|
||||
if ( Active.Exists( 5 ) )then
|
||||
if Active.GetRT() = 304 then
|
||||
Active.Ok()
|
||||
QAErrorLog "No Default-Printer!"
|
||||
Kontext "Printing"
|
||||
if ( Printing.exists( 1 )) then
|
||||
Printing.Cancel()
|
||||
try
|
||||
FileSave
|
||||
qaErrorlog "#i52248# Modify flag is set after printing though option is not set."
|
||||
kontext "SpeichernDlg"
|
||||
if SpeichernDlg.exists(5) then
|
||||
SpeichernDlg.cancel
|
||||
endif
|
||||
catch
|
||||
printlog "#i52248# doesn't come up."
|
||||
endcatch
|
||||
else
|
||||
qaErrorLog "No printer available - resuming."
|
||||
kontext
|
||||
if active.exists(5) then
|
||||
printlog active.getText
|
||||
active.ok
|
||||
endif
|
||||
endif
|
||||
else
|
||||
Kontext "Printing"
|
||||
if( Printing.exists( 1 )) then
|
||||
Printing.OK
|
||||
Printing.notExists( 5 )
|
||||
endif
|
||||
kontext
|
||||
if ( active.exists( 2 ) ) then
|
||||
qaErrorLog active.getText
|
||||
active.ok
|
||||
endif
|
||||
endif
|
||||
hCloseDocument
|
||||
endif
|
||||
|
||||
printlog " - check data"
|
||||
ToolsOptions
|
||||
hToolsOptions ( "StarOffice", "General" )
|
||||
|
||||
if Zweistellig.GetText <> "1800" then Warnlog "Year ( 2 digits ) => changes not saved : '" + Zweistellig.GetText +"'"
|
||||
If DruckenStatus.IsChecked <> FALSE then Warnlog "Printing sets 'Document modified' status => changes not saved!"
|
||||
if StyleSheet.GetSelIndex <> 3 then Warnlog "Style sheet for StarOffice Help => changes not saved!"
|
||||
|
||||
printlog " - reset to saved data"
|
||||
Zweistellig.SetText lsSave ( 1 )
|
||||
Aktivieren.Check
|
||||
Zuruecksetzen.Click
|
||||
if lbSave (1) = TRUE then Aktivieren.Check else Aktivieren.Uncheck
|
||||
if gPlatgroup = "w95" then
|
||||
if lbSave (2) = TRUE then StarOfficeDialogeBenutzen.Check else StarOfficeDialogeBenutzen.UnCheck
|
||||
end if
|
||||
If lbSave(3)= TRUE then DruckenStatus.Check else DruckenStatus.UnCheck
|
||||
StyleSheet.Select lsSave(3)
|
||||
|
||||
Kontext "ExtrasOptionenDlg"
|
||||
ExtrasOptionenDlg.OK
|
||||
if ( ExtrasOptionenDlg.notExists( 3 ) ) then
|
||||
printlog( "Options closed" )
|
||||
endif
|
||||
|
||||
Call hCloseDocument
|
||||
endcase
|
||||
|
||||
'-------------------------------------------------------------------------
|
||||
|
||||
testcase tUserDefineLayout_1
|
||||
'/// Decrease characters per line will cause lines per page decrease accordingly
|
||||
Dim sLinesPerPage , sCharsPerLine as String
|
||||
Dim sExpectLinesPerPage , sExpectLinesPerPage1 as String
|
||||
|
||||
sLinesPerPage = "20"
|
||||
sCharsPerLine = "2"
|
||||
sExpectLinesPerPage = "2"
|
||||
sExpectLinesPerPage1 = "3"
|
||||
|
||||
Call hNewDocument
|
||||
|
||||
'/// Format/page , set lines per page to 20, and set charsets per line to 2
|
||||
'/// + wait for a moment , then check the the number of lines per page.
|
||||
FormatPageWriter
|
||||
Kontext
|
||||
if active.exists(5) then
|
||||
Active.SetPage TabGrid
|
||||
endif
|
||||
Kontext "TabGrid"
|
||||
CharsGrid.Check
|
||||
|
||||
LinesPerPage.SetText sLinesPerPage
|
||||
Sleep 2
|
||||
CharsPerLine.SetText sCharsPerLine
|
||||
Sleep 2
|
||||
|
||||
'This step is no use, just let the LinesPerPage change the number
|
||||
CharsGrid.Check
|
||||
|
||||
if LinesPerPage.GetText <> sExpectLinesPerPage AND LinesPerPage.GetText <> sExpectLinesPerPage1 then
|
||||
Warnlog "The lines per page should be" + sExpectLinesPerPage + " OR " + sExpectLinesPerPage1 +" but get " +LinesPerPage.GetText
|
||||
endif
|
||||
|
||||
TabGrid.Cancel
|
||||
|
||||
Call hCloseDocument
|
||||
endcase
|
||||
|
||||
'-------------------------------------------------------------------------
|
||||
|
||||
testcase tFontSizeChanges_1
|
||||
'/// Change the font size to bigger enough will change the layout
|
||||
Dim testFile , sCorrectResult as String
|
||||
Dim sLinesPerPage , sCharsPerLine as String
|
||||
dim sTemp as string
|
||||
|
||||
testFile = "FontSizeChanges_1.sxw"
|
||||
sCorrectResult = "1"
|
||||
sLinesPerPage = "2"
|
||||
sCharsPerLine = "9"
|
||||
|
||||
Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
|
||||
sMakeReadOnlyDocumentEditable
|
||||
Kontext "DocumentWriter"
|
||||
Call DocumentWriter.TypeKeys "<Shift Right>"
|
||||
|
||||
Kontext "FormatObjectbar"
|
||||
Schriftgroesse.Select "60"
|
||||
Schriftgroesse.TypeKeys "<Return>"
|
||||
Sleep 1
|
||||
|
||||
Kontext "DocumentWriter"
|
||||
FormatPageWriter
|
||||
Kontext
|
||||
if active.exists(5) then
|
||||
Active.SetPage TabGrid
|
||||
endif
|
||||
Kontext "TabGrid"
|
||||
if TabGrid.exists(5) then
|
||||
sTemp = LinesPerPage.GetText
|
||||
if sTemp <> sLinesPerPage then
|
||||
Warnlog "The lines per page should be: '" + sLinesPerPage + "'; but get: '" + sTemp + "'"
|
||||
endif
|
||||
sTemp = CharsPerLine.GetText
|
||||
if sTemp <> sCharsPerLine then
|
||||
Warnlog "The chars per line should be: '" + sCharsPerLine + "'; but get: '" +sTemp + "'"
|
||||
endif
|
||||
TabGrid.Cancel
|
||||
else
|
||||
warnlog "TabGrid is not available."
|
||||
endif
|
||||
|
||||
Kontext
|
||||
ViewNavigator
|
||||
Kontext "NavigatorWriter"
|
||||
if NavigatorWriter.exists(5) then
|
||||
Seitennummer.SetText "2"
|
||||
Sleep 5
|
||||
else
|
||||
warnlog "Navigator not available"
|
||||
endif
|
||||
hCloseNavigator
|
||||
|
||||
Kontext "DocumentWriter"
|
||||
sleep 3
|
||||
Call DocumentWriter.TypeKeys "<Shift Right>"
|
||||
|
||||
hUseAsyncSlot( "EditCopy" )
|
||||
sTemp = GetClipboardText
|
||||
if sTemp <> sCorrectResult then
|
||||
Warnlog "Don't get the expected result , hope to be: '" + sCorrectResult + "'; but get: '" + sTemp + "'"
|
||||
endif
|
||||
|
||||
Call hCloseDocument
|
||||
endcase
|
||||
|
||||
'-------------------------------------------------------------------------
|
||||
|
||||
testcase tRubyText_1
|
||||
'/// If Ruby Text is applied and longer than its Base Text it will stretch over more grid cells than the base text itself.
|
||||
Dim testFile , sRubyText as String
|
||||
|
||||
testFile = "rubytest.sxw"
|
||||
sRubyText = "Ruby Test Text ....................."
|
||||
|
||||
Call hNewDocument
|
||||
|
||||
'/// open a test file , and insert long ruby test text
|
||||
Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
|
||||
sMakeReadOnlyDocumentEditable
|
||||
Kontext "DocumentWriter"
|
||||
Call DocumentWriter.TypeKeys "<Shift Right>"
|
||||
Sleep 1
|
||||
|
||||
FormatRuby
|
||||
Kontext "RubyDialog"
|
||||
Sleep 3
|
||||
RubyText1.setText sRubyText
|
||||
Sleep 2
|
||||
RubyDialog.OK
|
||||
Sleep 2
|
||||
DialogClose.Click
|
||||
Sleep 1
|
||||
|
||||
Kontext "DocumentWriter"
|
||||
FormatAutoformatApply
|
||||
Sleep 2
|
||||
Call DocumentWriter.TypeKeys "<End>"
|
||||
Sleep 2
|
||||
Call DocumentWriter.TypeKeys "<Shift Left>"
|
||||
hUseAsyncSlot( "EditCopy" )
|
||||
|
||||
if NOT(GetClipboardText = "5" OR GetClipboardText = "6") then
|
||||
Warnlog "Don't get the correct result after inserting ruby text! Get " + GetClipboardText
|
||||
endif
|
||||
|
||||
Call hCloseDocument
|
||||
endcase
|
||||
|
||||
'-------------------------------------------------------------------------
|
||||
|
||||
testcase tIndentsTest_1
|
||||
'/// Indents should work and always indenting as close as possible to their measurements by snapping to the appropriate grid cell. Tabs therefore will be ignored.
|
||||
Dim testFile , sCorrectPage1 , sCorrectPage2 as String
|
||||
|
||||
testFile = "IndentsTest.sxw"
|
||||
sCorrectPage1 = "1"
|
||||
sCorrectPage2 = "2"
|
||||
|
||||
Call hNewDocument
|
||||
|
||||
'/// open a test file , and press TAB in second line
|
||||
Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
|
||||
sMakeReadOnlyDocumentEditable
|
||||
Kontext "DocumentWriter"
|
||||
Call DocumentWriter.TypeKeys "<Down>"
|
||||
Sleep 1
|
||||
Call DocumentWriter.TypeKeys "<Tab>"
|
||||
Sleep 1
|
||||
Call DocumentWriter.TypeKeys "<End>"
|
||||
Sleep 1
|
||||
|
||||
'/// Active navigator dialogue , check if the page number is 1
|
||||
Kontext
|
||||
ViewNavigator
|
||||
Kontext "NavigatorWriter"
|
||||
if Seitennummer.GetText <> sCorrectPage1 then Warnlog "First test :Something wrong in indents test!"
|
||||
hCloseNavigator
|
||||
|
||||
'/// press TAB in second line again
|
||||
Kontext "DocumentWriter"
|
||||
Call DocumentWriter.TypeKeys "<Home>"
|
||||
Sleep 1
|
||||
Call DocumentWriter.TypeKeys "<Tab>"
|
||||
Sleep 1
|
||||
Call DocumentWriter.TypeKeys "<End>"
|
||||
Sleep 1
|
||||
|
||||
'/// Active navigator dialogue , check if the page number is 2
|
||||
Kontext
|
||||
ViewNavigator
|
||||
Kontext "NavigatorWriter"
|
||||
if Seitennummer.GetText <> sCorrectPage2 then Warnlog "Second test :Something wrong in indents test!"
|
||||
hCloseNavigator
|
||||
|
||||
Call hCloseDocument
|
||||
endcase
|
||||
|
||||
'-------------------------------------------------------------------------
|
||||
|
||||
testcase tObjectsTest_1
|
||||
'/// If objects are anchored to text they will "wander" with its surrounding text.
|
||||
'/// If they are anchored as character they will snap to the appropriate grid cell (since they are a character).
|
||||
Dim testFile , sCorrectPage1 , sCorrectPage2 as String
|
||||
|
||||
testFile = "objectsTest.sxw"
|
||||
sCorrectPage1 = "1"
|
||||
sCorrectPage2 = "2"
|
||||
|
||||
Call hNewDocument
|
||||
|
||||
'/// open a test file , and press TAB in second line
|
||||
Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
|
||||
|
||||
'/// If object is anchored as Character , check if it will snap to the appropriate grid cell
|
||||
fStartupNavigator( "OLEObject" , 1 )
|
||||
Sleep 1
|
||||
Auswahlliste.TypeKeys "<Return>"
|
||||
Sleep 1
|
||||
hCloseNavigator
|
||||
|
||||
Kontext
|
||||
FormatAnchorAsCharacter
|
||||
WaitSlot()
|
||||
|
||||
|
||||
ViewNavigator
|
||||
Kontext "NavigatorWriter"
|
||||
Seitennummer.SetText sCorrectPage2
|
||||
Sleep 5
|
||||
if Seitennummer.GetText <> sCorrectPage2 then Warnlog "Something wrong when object is anchored as Character!"
|
||||
hCloseNavigator
|
||||
|
||||
'/// If object is anchored to Character , check if it will NOT snap to the appropriate grid cell
|
||||
fStartupNavigator( "OLEObject" , 1 )
|
||||
Auswahlliste.TypeKeys "<Return>"
|
||||
hCloseNavigator
|
||||
|
||||
Kontext
|
||||
FormatAnchorToCharacter
|
||||
|
||||
ViewNavigator
|
||||
Kontext "NavigatorWriter"
|
||||
Seitennummer.SetText sCorrectPage2
|
||||
Sleep 5
|
||||
if Seitennummer.GetText <> sCorrectPage1 then Warnlog "Something wrong when object is anchored to Character!"
|
||||
hCloseNavigator
|
||||
Kontext
|
||||
|
||||
Call hCloseDocument
|
||||
ToolsOptions
|
||||
hToolsOptions ( "StarOffice", "General" )
|
||||
|
||||
printlog " - check the reset data"
|
||||
if Zweistellig.GetText <> lsSave ( 1 ) then Warnlog "Year ( 2 digits ) => changes not saved"
|
||||
if Aktivieren.IsChecked <> lbSave (1) then Warnlog "Enable HelpAgent => changes not saved"
|
||||
Aktivieren.Check
|
||||
Zuruecksetzen.Click
|
||||
if lbSave (1) = TRUE then Aktivieren.Check else Aktivieren.Uncheck
|
||||
if gPlatgroup = "w95" then
|
||||
if StarOfficeDialogeBenutzen.IsChecked <> lbSave (2) then Warnlog "Use StarOffice dialogs => changes not saved!"
|
||||
end if
|
||||
If DruckenStatus.IsChecked <> lbSave(3) then Warnlog "Printing sets 'Document modified' status => changes not saved!"
|
||||
if StyleSheet.GetSelText <> lsSave (3) then Warnlog "Style sheet for StarOffice Help => changes not saved!"
|
||||
|
||||
Kontext "ExtrasOptionenDlg"
|
||||
ExtrasOptionenDlg.OK
|
||||
if ( ExtrasOptionenDlg.notExists( 3 ) ) then
|
||||
printlog( "Options closed" )
|
||||
endif
|
||||
|
||||
|
||||
endcase
|
||||
|
||||
|
|
16
testautomation/framework/optional/includes/options_ooo_security.inc
Normal file → Executable file
16
testautomation/framework/optional/includes/options_ooo_security.inc
Normal file → Executable file
|
@ -91,13 +91,6 @@ sub checkSecurityPage( _file as string )
|
|||
warnlog( "Failed to open Security options" )
|
||||
endif
|
||||
|
||||
Kontext "TabSecurity"
|
||||
if ( TabSecurity.exists() ) then
|
||||
checkCheckBox( _file , "*" , RecommendToOpenDocumentReadOnly )
|
||||
checkCheckBox( _file , "*" , RecordChanges )
|
||||
else
|
||||
warnlog( "Could not return to Security Tabpage" )
|
||||
endif
|
||||
else
|
||||
warnlog( "Security Tabpage not available" )
|
||||
endif
|
||||
|
@ -110,6 +103,9 @@ sub changeSecurityPage( _file as string )
|
|||
|
||||
printlog( " * Changing current settings according to the reference list." )
|
||||
printlog( " * Using settings from file: " & _file )
|
||||
|
||||
kontext "TabSecurity"
|
||||
if ( TabSecurity.exists() ) then
|
||||
|
||||
Options.click
|
||||
Kontext "TabSecurityOptionsAndWarnings"
|
||||
|
@ -120,12 +116,12 @@ sub changeSecurityPage( _file as string )
|
|||
setCheckBox( _file , "*" , RemovePersonalInformationOnSaving )
|
||||
setCheckBox( _file , "*" , RecommendPasswordProtectionOnSaving )
|
||||
TabSecurityOptionsAndWarnings.cancel
|
||||
Kontext "TabSecurity"
|
||||
setCheckBox( _file , "*" , RecommendToOpenDocumentReadOnly )
|
||||
setCheckBox( _file , "*" , RecordChanges )
|
||||
|
||||
Kontext "OptionenDLG"
|
||||
OptionenDLG.OK
|
||||
else
|
||||
warnlog( "Security Tabpage not available" )
|
||||
endif
|
||||
|
||||
sleep(2)
|
||||
call exitRestartTheOffice()
|
||||
|
|
14
testautomation/framework/optional/includes/security_certification_dialogs.inc
Normal file → Executable file
14
testautomation/framework/optional/includes/security_certification_dialogs.inc
Normal file → Executable file
|
@ -32,8 +32,6 @@
|
|||
'\******************************************************************************
|
||||
|
||||
testcase tCertificationDialogs
|
||||
|
||||
|
||||
dim brc as boolean
|
||||
const CFN = "tCertificationDialogs::"
|
||||
const SVERSION = "680"
|
||||
|
@ -53,7 +51,14 @@ testcase tCertificationDialogs
|
|||
kontext "active"
|
||||
if ( active.exists( 1 ) ) then
|
||||
printlog( "MSGBOX: " & active.getText() )
|
||||
active.yes()
|
||||
try
|
||||
active.yes()
|
||||
catch
|
||||
warnlog "#i111181# cws DEV300/fs33a wrong messge box when try to sign a new document"
|
||||
active.ok
|
||||
hCloseDocument
|
||||
goto endsub
|
||||
endcatch
|
||||
printlog( CFN & "Allow to save the document" )
|
||||
else
|
||||
if ( gApplication <> "MASTERDOCUMENT" ) then
|
||||
|
@ -91,8 +96,5 @@ testcase tCertificationDialogs
|
|||
endif
|
||||
|
||||
call hCloseDocument()
|
||||
|
||||
|
||||
|
||||
endcase
|
||||
|
||||
|
|
|
@ -208,21 +208,6 @@ testcase tToolsOptionsStarOffice
|
|||
qaerrorlog( "#i45295# or office built without mozilla support" )
|
||||
endif
|
||||
|
||||
Kontext "TabSecurity"
|
||||
if Protect.isEnabled then
|
||||
Protect.click()
|
||||
Kontext "PasswordDLG"
|
||||
call DialogTest( PasswordDLG )
|
||||
PasswordDLG.cancel()
|
||||
else
|
||||
select case uCase(gApplication)
|
||||
case "WRITER","MASTERDOCUMENT"
|
||||
WarnLog "Protect-Button is disabled."
|
||||
case "MATH","IMPRESS","DRAW","HTML","CALC"
|
||||
PrintLog "Protect-Button is disabled."
|
||||
end select
|
||||
endif
|
||||
|
||||
Kontext "TabSecurity"
|
||||
if ( TabSecurity.exists( 1 ) ) then
|
||||
Options.click
|
||||
|
|
|
@ -420,9 +420,13 @@ ChooseARemoteDirectoryB HID_FTP_BTN_PATH
|
|||
CancelB HID_FTP_CANCEL
|
||||
|
||||
*LoginDialog HID_DLG_LOGIN
|
||||
LoginName uui:Edit:DLG_UUI_LOGIN:ED_LOGIN_USERNAME
|
||||
LoginPassword uui:Edit:DLG_UUI_LOGIN:ED_LOGIN_PASSWORD
|
||||
LoginSavePassword uui:CheckBox:DLG_UUI_LOGIN:CB_LOGIN_SAVEPASSWORD
|
||||
LoginName HID_LOGIN_DLG_USER_NAME
|
||||
LoginPassword HID_LOGIN_DLG_PASSWORD
|
||||
LoginSavePassword HID_LOGIN_DLG_REMEMBER_PASSWORD
|
||||
Path HID_LOGIN_DLG_PATH
|
||||
Browse HID_LOGIN_DLG_BROWSE
|
||||
Account HID_LOGIN_DLG_ACCOUNT
|
||||
UseSystemCredentials HID_LOGIN_DLG_USE_SYSTEM_CREDENTIALS
|
||||
|
||||
*Gallery SID_GALLERY
|
||||
NewTheme HID_GALLERY_NEWTHEME
|
||||
|
|
|
@ -83,15 +83,20 @@ IndentAfter sw:MetricField:TP_SECTION_INDENTS:MF_AFTER
|
|||
|
||||
*TabSecurity cui:TabPage:RID_SVXPAGE_INET_SECURITY
|
||||
MacroSecurity cui:PushButton:RID_SVXPAGE_INET_SECURITY:PB_SEC_MACROSEC
|
||||
RecommendToOpenDocumentReadOnly cui:CheckBox:RID_SVXPAGE_INET_SECURITY:CB_SEC_RECOMMREADONLY
|
||||
RecordChanges cui:CheckBox:RID_SVXPAGE_INET_SECURITY:CB_SEC_RECORDCHANGES
|
||||
Protect cui:PushButton:RID_SVXPAGE_INET_SECURITY:PB_SEC_PROTRECORDS
|
||||
ProtectByMasterPassword cui:CheckBox:RID_SVXPAGE_INET_SECURITY:CB_SEC_MASTERPASSWORD
|
||||
PersistentlySavePasswords cui:CheckBox:RID_SVXPAGE_INET_SECURITY:CB_SEC_SAVEPASSWORDS
|
||||
Options cui:PushButton:RID_SVXPAGE_INET_SECURITY:PB_SEC_SECURITYOPTIONS
|
||||
MasterPassword cui:PushButton:RID_SVXPAGE_INET_SECURITY:PB_SEC_MASTERPASSWORD
|
||||
ShowPasswords cui:PushButton:RID_SVXPAGE_INET_SECURITY:PB_SEC_CONNECTIONS
|
||||
|
||||
*TabSecurityProperties HID_DOCINFOSECURITY
|
||||
EnterPasswordToOpen HID_SECURITYTAB_PASSWORD_TO_OPEN
|
||||
ReEnterPasswordToOpen HID_SECURITYTAB_CONFIRM_PASSWORD_TO_OPEN
|
||||
EnterPasswordToModify HID_SECURITYTAB_PASSWORD_TO_MODIFY
|
||||
ReEnterPasswordToModify HID_SECURITYTAB_CONFIRM_PASSWORD_TO_MODIFY
|
||||
RecommendToOpenDocumentReadOnly HID_SECURITYTAB_OPEN_FILE_READONLY
|
||||
RecordChanges HID_SECURITYTAB_RECORD_CHANGES
|
||||
Protect HID_SECURITYTAB_PROTECTION
|
||||
|
||||
*TabSecurityOptionsAndWarnings HID_DLG_SECURITY_OPTIONS
|
||||
SavingOrSendingDocuments cui:CheckBox:RID_SVXDLG_SECURITY_OPTIONS:CB_SAVESENDDOCS
|
||||
SigningDocuments cui:CheckBox:RID_SVXDLG_SECURITY_OPTIONS:CB_SIGNDOCS
|
||||
|
|
6
testautomation/math/required/includes/m_001_.inc
Normal file → Executable file
6
testautomation/math/required/includes/m_001_.inc
Normal file → Executable file
|
@ -610,6 +610,12 @@ testcase tmFileProperties
|
|||
Kontext "TabDokumentInfo"
|
||||
Call DialogTest ( TabDokumentInfo )
|
||||
|
||||
Kontext
|
||||
'/// select tabpage 'Security' ///'
|
||||
active.SetPage TabSecurityProperties
|
||||
Kontext "TabSecurityProperties"
|
||||
Call DialogTest (TabSecurityProperties)
|
||||
|
||||
Kontext
|
||||
'/// select tabpage 'Internet' ///'
|
||||
active.SetPage TabInternet
|
||||
|
|
3
testautomation/spreadsheet/required/includes/c_upd_toolsmenu2.inc
Normal file → Executable file
3
testautomation/spreadsheet/required/includes/c_upd_toolsmenu2.inc
Normal file → Executable file
|
@ -166,9 +166,10 @@ testcase tToolsMacro
|
|||
printlog " Close Select Certificate' dialog with 'Cancel'"
|
||||
SelectCertificate.Cancel
|
||||
Kontext "DigitalSignature"
|
||||
add.click
|
||||
'/// Close 'Digital Signatures' dialog with 'Cancel'
|
||||
printlog " Close 'Digital Signatures' dialog with 'Cancel'"
|
||||
DigitalSignature.Cancel
|
||||
DigitalSignature.ok
|
||||
'/// Open 'Macro Organizer' by 'Tools – Macro – Organize Dialogs'
|
||||
printlog " Open 'Macro Organizer' by 'Tools – Macro – Organize Dialogs'"
|
||||
ToolsMacrosOrganizeDialogs
|
||||
|
|
Loading…
Reference in a new issue