<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="./spec.xsl" ?>

<spec title="BPEL Printing Test Specification" version="1.1" author = "Victoria Zhukovskaya" author-email="victoriaz@netbeans.org"  last-updated = "26 October 2007">
<intro>This specification provides a usecases of printing of the BPEL diagram in the Java Studio Enterprise. </intro>


<caseblock name="BPEL Printing">
	<purpose></purpose>
        <setup>TravelReservationService project should be created. Multy-view editor should be opened in design mode. Size of Paper is A4.</setup>
	<usecase name ="Check printing menu items">
            <action>Invoke 'File' menu item from main menu.</action>
            <action>Select Source View for bpel file and invoke 'File' menu item from main menu.</action>
            <action>Select project node on 'Project' TAB.</action>
            <action>Select bpel file on on 'Project' TAB and select Design View for bpel file.</action>

            <result>'Page Setup...', 'Print...', 'Print to HTML...' menu items are enabled.</result>
	</usecase>

	<usecase name ="Check invocation of 'Print...'">
            <action>Invoke 'File' -> 'Print...' for Design view of bpel.</action>
            <action>Press 'Close' button.</action>

            <result>See 'Print Preview' window.</result>
            <result>'Print Preview' window is closed.</result>
	</usecase>
	<usecase name ="Check scroll buttons for 'Print Preview' window">
            <action>Invoke 'File' -> 'Print...' for Design view of bpel.</action>
            <action>The number of pages should be great then 3. For correction of pages number press 'Options', enter the 200% zoom f.e and press OK.</action>
            <action>Press 'Next Page' button.</action>
            <action>Press 'Last Page' button.</action>
            <action>Press 'Previous Page ' button.</action>
            <action>Enter value '1 of N' to 'Page Number' text field. Press 'Enter'. N is the number of pages.</action>
            <action>Enter value '2 of N' to 'Page Number' text field. Press 'Enter'. N is the number of pages.</action>
            <action>Enter value '***' to 'Page Number' text field. Press 'Enter'.</action>
            <action>Press 'Close' button.</action>

            <result>See 'Print Preview' window. 'First Page' and  'Previous Page' buttons are disabled. 'Next Page' and 'Last Page' buttons  are enabled. 'Page Number' text field has value '1 of N'. Fist page is visible on view.</result>
            <result>The number of pages should be great then 3.</result>
            <result>'First Page','Previous Page', 'Next Page' and 'Last Page' buttons  are enabled. 'Page Number' text field has value '2 of N'. Second page is visible on view.</result>
            <result>'First Page' and  'Previous Page' buttons are enabled. 'Next Page' and 'Last Page' buttons  are disabled. 'Page Number' text field has value 'N of N'. Last page is visible on view.</result>
            <result>'First Page','Previous Page', 'Next Page' and 'Last Page' buttons  are enabled. 'Page Number' text field has value 'N-1 of N'. Third page is visible on view.</result>
            <result>'First Page' and  'Previous Page' buttons are disabled. 'Next Page' and 'Last Page' buttons  are enabled. 'Page Number' text field has value '1 of N'. Fist page is visible on view.</result>
            <result>'First Page','Previous Page', 'Next Page' and 'Last Page' buttons  are enabled. 'Page Number' text field has value '2 of N'. Second page is visible on view.</result>
            <result>'First Page','Previous Page', 'Next Page' and 'Last Page' buttons  are enabled. 'Page Number' text field has value '2 of N'. Second page is visible on view. (There should be warning window.)</result>
	</usecase>
	<usecase name ="Check Zoom for 'Print Preview' window">
            <action>Press 'Print Preview...' button on Design view.</action>
            <action>Press 'Change Scale' button 3 times. Then set value to  'Fit to Widht'.</action>
            <action>Select '25 %' value in 'Preview Zoom' combobox.</action>
            <action>Select '100 %' value in 'Preview Zoom' combobox.</action>
            <action>Press 'Zoom In' button.</action>
            <action>Press 'Zoom Out' button.</action>
            <action>Enter '25' in 'Preview Zoom' combobox.</action>
            <action>Enter 'aaa' in 'Preview Zoom' combobox.</action>
            <action>Press 'Change Scale' button. Press 'Show Multiple Pages' button.</action>
            <action>Enter '400' in 'Preview Zoom' combobox.</action>
            <action>Press 'Change Scale' button. Press 'Show Multiple Pages' button.</action>
            <action>Press 'Close' button.</action>

            <result>See 'Print Preview' window.</result>
            <result>The page will changwe scale to - Fit to Widht, Fit toHeight, Show All pages.</result>
            <result>Preview zoom scale is changed. It will be smaller then previous scale.</result>
            <result>Preview zoom scale is changed. It will be bigger then previous scale.</result>
            <result>Preview zoom scale is changed. It will be bigger then previous scale.</result>
            <result>Preview zoom scale is changed. It will be smaller then previous scale.</result>
            <result>'Preview Zoom' combobox has value '25%'. Preview zoom scale is changed for pages.</result>
            <result>'Preview Zoom' combobox has ald value '25%'.</result>
            <result>Only one page is visible. There is no scroll bars.</result>
            <result>Scroll bars scroll only one active page.</result>
            <result>Scroll bars scroll all pages.</result>
	</usecase>
        
	<usecase name ="Check Page Setup window">
            <action>Press 'Print Preview...' button on Design view.</action>
            <action>Press 'Page Setup' button on 'Print Preview' window.</action>
            <action>Change Orientation to Landscape. Press Ok.</action>
            <action>Change Orientation to Portrait. Press Ok.</action>
            
            <result>See 'Print Preview' window.</result>
            <result>See 'Page Setup' window.</result>
            <result>Pages have Landscape orientation.</result>
            <result>Pages have Portrait orientation.</result>
	</usecase>

        <usecase name ="Check Print Options for 'Print Options' window">
            <action>Press 'Print Preview...' button on Design view.</action>
            <action>Press 'Options' button on 'Print Preview' window.</action>
            <action>Uncheck 'Print Border' chackbox. Press Ok.</action>
            <action>Press 'Options' button on 'Print Preview' window. Uncheck 'Print Border' chackbox. Press 'Color' button. Select 'AWT Palette' tab on 'Choose Color' window and select 'red'. Press Ok. Press Ok.</action>
            <action>Press 'Options' button on 'Print Preview' window. Press 'Page Setup...'  button. Select 'Landscape' orientation on 'Page Setup' window. Press 'Ok' button. Press 'Ok' button.</action>
            <action>Press 'Print' button.</action>
            <action>Press 'Options' button on 'Print Preview' window. Press 'Page Setup...'  button. Select 'Portrait' orientation 'Page Setup' window. Press 'Ok' button. Press 'Ok' button.</action>
            <action>Press 'Print' button.</action>
            <action>Press 'Close' button.</action>

            <result>See 'Print Preview' window.</result>
            <result>See 'Print Options' window.</result>
            <result>Pages have not borders.</result>
            <result>Pages have red borders.</result>
            <result>See on Preview - orientation of paper is changed to 'Landscape'.</result>
            <result>The diagram should be printed. Orientation of paper is 'Landscape'.</result>
            <result>See on Preview - orientation of paper is changed to 'Portrait'.</result>
            <result>The diagram should be printed. Orientation of paper is 'Portrait'.</result>
	</usecase>
        
	<usecase name ="Check Header and Footer options for 'Print Preview...' window">
            <action>Press 'Print Preview...' button on Design view.</action>
            <action>Press 'Options' button on 'Print Preview' window.</action>
            <action>Uncheck 'Print Header' and 'Print Footer'.</action>
            <action>Press Ok.</action>
            <action>Press 'Options' button on 'Print Preview' window. Check 'Print Header' and 'Print Footer'. Clear all Header and Footer Pattern editboxes. Press Ok.</action>
            <action>Press 'Options' button on 'Print Preview' window. Select Header Pattern text field Footer 'Left'. Press 'The name of area' button.</action>
            <action>Select Header Pattern text field Footer 'Center'. Press 'The number of page' button.</action>
            <action>Select Header Pattern text field Footer 'Right'. Press 'The last date of modification' button.</action>
            <action>Press Ok.</action>
            <action>Press 'Options' button on 'Print Preview' window. Select Footer Pattern text field Footer 'Left'. Press 'The last time of modification' button.</action>
            <action>Select Header Pattern text field Footer'Center'. Press 'Date of printing' button.</action>
            <action>Select Header Pattern text field Footer'Right'. Press 'Time of printing' button.</action>
            <action>Press Ok.</action>
            <action>Press 'Options' button on 'Print Preview' window. Press 'Color' button for Header and select 'AWT Palette' tab on 'Choose Color' window and select 'red' then press Ok. Press 'Color' button for Footer and select 'AWT Palette' tab on 'Choose Color' window and select 'blue' then press Ok. Press Ok.</action>
            <action>Press 'Options' button on 'Print Preview' window. Press 'Font' button for Header and select ' and select 'Bold' on 'Choose Font window  then press Ok. Press 'Font' button for Footer and select  'Italic' on 'Choose Font' window then press Ok. Press Ok.</action>
            <action>Press 'Print' button.</action>
            <action>Press 'Close' button.</action>

            <result>See 'Print Preview' window.</result>
            <result>See 'Print Options' window. 'Print Header' and 'Print Footer' checkboxes should be checked. Header Pattern text field 'Center' has value - %NAME%. Footer Pattern text field 'Left' has value - %PAGE%.  Footer  Pattern text field 'Right' has value - %MODIFIED_DATE%. Header and Footer Pattern buttons are disabled.</result>
            <result>Header and Footer Pattern buttons and editbboxes are disabled.</result>
            <result>Pages have not Header and Footer.</result>
            <result>Pages have not Header and Footer.</result>
            <result>Header and Footer Pattern buttons are enabled. Header Pattern text field 'Left' has value - %NAME%.</result>
            <result>Header and Footer Pattern buttons are enabled. Header Pattern text field 'Center' has value - %PAGE%.</result>
            <result>Header and Footer Pattern buttons are enabled. Header Pattern text field  'Right' has value - %MODIFIED_DATE%.</result>
            <result>Pages have Header with name of area, page numbers and ast date of modification.</result>
            <result>Header and Footer Pattern buttons are enabled. Footer Pattern text field  'Left' has value - %MODIFIED_TIME%.</result>
            <result>Header and Footer Pattern buttons are enabled. Footer Pattern text field  'Center' has value - %PRINTED_DATE%.</result>
            <result>Header and Footer Pattern buttons are enabled. Footer Pattern text field  'Right' has value - %PRINTED_TIME%.</result>
            <result>Pages have Header with name of area, page numbers and ast date of modification. Pages have Footer with The last time of modification and date and time of printing.</result>
            <result>Pages have red text for Header and blue text for Footer.</result>
            <result>Pages have red text for Header,  font is Bold; and blue text for Footer, font is Italic.</result>
            <result>All pages should be printed. Pages have Header with name of area, page numbers and ast date of modification. Pages have Footer with The last time of modification and date and time of printing. Font for Header should be Bold.  Font for Footer should be Italic.</result>
	</usecase>
	
<usecase name ="Check Zoom options for 'Print Options' window">
            <action>Press 'Print Preview...' button on Design view.</action>
            <action>Press 'Options' button on 'Print Preview' window.</action>
            <action>Select 'Fit to Page' from 'Zoom' combobox. Press Ok.</action>
            <action>Press 'Print' button.</action>
            <action>Press 'Options' button on 'Print Preview' window.</action>
            <action>Enter '100' to 'Zoom' combobox press enter.</action>
            <action>Press Cancel.</action>
            <action>Press 'Options' button on 'Print Preview' window.</action>
            <action>Enter '100' to 'Zoom' combobox press enter.</action>
            <action>Press 'Aply' button. Press 'Cancel' button.</action>
            <action>Press 'Print' button.</action>
            <action>Press 'Options' button on 'Print Preview' window.</action>
            <action>Enter 'aaa' to 'Zoom' combobox press enter.</action>
            <action>Press Ok. Press 'Close' button.</action>

            <result>See 'Print Preview' window.</result>
            <result>See 'Print Options' window. Zoom should have value '100%'.</result>
            <result>The Diagram should be fitted on one page.</result>
            <result>One page should be printed.</result>
            <result>See 'Print Options' window. Zoom should have value 'Fit to Page'.</result>
            <result>Zoom should have value '100 %'.</result>
            <result>The Diagram should be fitted on one page.</result>
            <result>Zoom should have value '100 %'.</result>
            <result>Zoom should have value 'Fit to Page'.</result>
            <result>There are 6 Page count.</result>
            <result>6 pages should be printed.</result>
            <result>Zoom should have value '100 %'.</result>
            <result>Zoom should have value '100 %'.</result>
	</usecase>
<usecase name ="Check Zoom options with help Fit to Width/Height in 'Print Options' window">
            <action>Press 'Print Preview...' button on Design view.</action>
            <action>Press 'Options' button on 'Print Preview' window.</action>
            <action>Select '75%' from 'Zoom' combobox. Press 'Apply' button.</action>
            <action>Select 'Fit to Width' radio button. Press 'Apply' button.</action>
            <action>Select 'Fit to Height' radio button. Press 'Apply' button.</action>
            <action>Press 'Close' button.</action>

            <result>See 'Print Preview' window.</result>
            <result>See 'Print Options' window.</result>
            <result>Preview zoom scale is changed. Dialog is not closed.</result>
            <result>Preview zoom scale is changed. Dialog is not closed.</result>
            <result>Preview zoom scale is changed. Dialog is not closed. (Diagramm fitted on one page).</result>
	</usecase>
        
</caseblock>

</spec>
