From c9c64b305ab6bc4f2f9717c28aae334ac3eac58d Mon Sep 17 00:00:00 2001 From: joanna-may Date: Tue, 14 Jul 2020 10:41:39 +0200 Subject: [PATCH] RED-1019 - added checking Console, Message log, debug shell font size --- .../Styles/ZoomInZoomOutInSource.test | 73 +++++++++++-------- 1 file changed, 43 insertions(+), 30 deletions(-) diff --git a/tests/GuiTests/RcpttProjects/RedGuiTests/SourceView/SourceLayout/Styles/ZoomInZoomOutInSource.test b/tests/GuiTests/RcpttProjects/RedGuiTests/SourceView/SourceLayout/Styles/ZoomInZoomOutInSource.test index 68cc141ba..70c27f495 100644 --- a/tests/GuiTests/RcpttProjects/RedGuiTests/SourceView/SourceLayout/Styles/ZoomInZoomOutInSource.test +++ b/tests/GuiTests/RcpttProjects/RedGuiTests/SourceView/SourceLayout/Styles/ZoomInZoomOutInSource.test @@ -5,14 +5,26 @@ Element-Type: testcase Element-Version: 3.0 External-Reference: Id: _j0pnEPE4Eeeotd-8Sx1R8w -Runtime-Version: 2.2.0.201706152316 -Save-Time: 1/4/18 11:55 AM +Runtime-Version: 2.5.0.202001211718 +Save-Time: 7/14/20 10:38 AM Testcase-Type: ecl ------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac Content-Type: text/ecl Entry-Name: .content +proc "check-font-size" [val font_size]{ + get-editor "TestFile.robot" | get-text-viewer | get-property "getFont().getFontData().FontData[0].height" + | equals $font_size | verify-true + get-view Console | get-text-viewer | get-property "getFont().getFontData().FontData[0].height" | equals $font_size + | verify-true + get-view "Debug Shell" | get-text-viewer | get-property "getFont().getFontData().FontData[0].height" | equals $font_size + | verify-true + get-view "Message Log" | click + get-view "Message Log" | get-editbox | get-property "getFont().getFontData().FontData[0].height" | equals $font_size + | verify-true +} + // open .robot file with [get-view "Project Explorer" | get-tree] { select "RobotProject/TestFile.robot" | double-click @@ -49,14 +61,30 @@ with [get-editor "TestFile.robot" | get-text-viewer] { set-caret-pos 27 24 key-type "M1+s" } -// verify normal height for Source content -if [get-by-os -linux "Linux" -win "Windows"| equals "Windows"]{ - get-editor "TestFile.robot" | get-text-viewer | get-property "getFont().getFontData().FontData[0].height" - | equals "9.75" | verify-true -}-else{ - get-editor "TestFile.robot" | get-text-viewer | get-property "getFont().getFontData().FontData[0].height" - | equals "10.0" | verify-true + +//run test +get-view "Project Explorer" | get-tree | select "RobotProject/TestFile.robot" | get-menu -path "Run As/1 Robot Test" + | click + +wait-for-console +get-menu -path "Window/Show View/Other..." | click +with [get-window "Show View"] { + with [get-editbox] { + set-text deb + } + get-tree | select "Robot/Debug Shell" | select "Robot/Debug Shell" | double-click +} + +// write text in debug shell +with [get-view "Debug Shell" | get-text-viewer] { + set-caret-pos 1 8 + type-text abc + key-type Enter + set-caret-pos 3 8 } + +check-font-size [os-specific -windowsValue "9.75" -linuxValue "10.0" ] + // zoom in with [get-editor "TestFile.robot" | get-text-viewer] { set-caret-pos 13 1 @@ -64,13 +92,8 @@ with [get-editor "TestFile.robot" | get-text-viewer] { key-type "M1+=" -times 2 } // verify zoomed in height for Source content -if [get-by-os -linux "Linux" -win "Windows"| equals "Windows"]{ - get-editor "TestFile.robot" | get-text-viewer | get-property "getFont().getFontData().FontData[0].height" - | equals "15.75" | verify-true -}-else{ - get-editor "TestFile.robot" | get-text-viewer | get-property "getFont().getFontData().FontData[0].height" - | equals "16.0" | verify-true -} +check-font-size [os-specific -windowsValue "15.75" -linuxValue "16.0"] + // zoom out with [get-editor "TestFile.robot" | get-text-viewer] { set-caret-pos 12 31 @@ -78,13 +101,8 @@ with [get-editor "TestFile.robot" | get-text-viewer] { key-type "M1+-" -times 4 } // verify zoomed out height for Source content -if [get-by-os -linux "Linux" -win "Windows"| equals "Windows"]{ - get-editor "TestFile.robot" | get-text-viewer | get-property "getFont().getFontData().FontData[0].height" - | equals "6.0" | verify-true -}-else{ - get-editor "TestFile.robot" | get-text-viewer | get-property "getFont().getFontData().FontData[0].height" - | equals "6.0" | verify-true -} +check-font-size "6.0" + // back to normal height with [get-editor "TestFile.robot" | get-text-viewer] { set-caret-pos 28 1 @@ -92,11 +110,6 @@ with [get-editor "TestFile.robot" | get-text-viewer] { key-type "M1+=" } // verify normal height for Source content -if [get-by-os -linux "Linux" -win "Windows"| equals "Windows"]{ - get-editor "TestFile.robot" | get-text-viewer | get-property "getFont().getFontData().FontData[0].height" - | equals "9.75" | verify-true -}-else{ - get-editor "TestFile.robot" | get-text-viewer | get-property "getFont().getFontData().FontData[0].height" - | equals "10.0" | verify-true -} +check-font-size [os-specific -windowsValue "9.75" -linuxValue "10.0" ] + ------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--