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

<spec title="Navigator Test Specification" version="1.1" author = "Mikhail Kondratyev, Victoria Zhukovskaya" author-email="victoriaz@netbeans.org"  last-updated = "01 October 2007">
    <intro>This specification provides the testcases for BPEL Logical View Navigator testing
    </intro>
    <caseblock name="Checking Activity and Activity-related nodes">  
        <purpose>Check nodes corresponding to the BPEL Activities.</purpose>
        <setup>Open the test project attached <a href="./NavigatorTestProject.zip">here</a></setup> 
        
          <usecase name="Setup usecase">
            <action>Open the test project attached <a href="./NavigatorTestProject.zip">here</a></action>            
        </usecase>
        
        <usecase name="Receive activity">
            <action>Select Receive activity in diagram</action>
            <action>Select another activity in diagram</action>
            <action>Select Receive activity in Navigator</action>
            <result>When selecting activity on diagram it should become selected in the Navigator</result>
            <result>When selecting activity in Navigator it should become selected in the diagram</result>
            <result>Activity node in Navigator should have the same context menu items as the Activity on the diagram</result>	   
        </usecase>
        
        <usecase name="Invoke activity">
            <action>Select Invoke activity in diagram</action>
            <action>Select another activity in diagram</action>
            <action>Select Invoke activity in Navigator</action>
            <result>When selecting activity on diagram it should become selected in the Navigator</result>
            <result>When selecting activity in Navigator it should become selected in the diagram</result>
            <result>Activity node in Navigator should have the same context menu items as the Activity on the diagram</result>	   
        </usecase>
        
        <usecase name="Reply activity">
            <action>Select Reply activity in diagram</action>
            <action>Select another activity in diagram</action>
            <action>Select Reply activity in Navigator</action>
            <result>When selecting activity on diagram it should become selected in the Navigator</result>
            <result>When selecting activity in Navigator it should become selected in the diagram</result>
            <result>Activity node in Navigator should have the same context menu items as the Activity on the diagram</result>	   
        </usecase>
        
        <usecase name="Assign activity">
            <action>Select Assign activity in diagram</action>
            <action>Select another activity in diagram</action>
            <action>Select Assign activity in Navigator</action>
            <result>When selecting activity on diagram it should become selected in the Navigator</result>
            <result>When selecting activity in Navigator it should become selected in the diagram</result>
            <result>Activity node in Navigator should have the same context menu items as the Activity on the diagram</result>	   
        </usecase>
        
        <usecase name="Particular Assignments nodes">
            <action>Select Assign activity in diagram</action>
            <action>Select Assignment node in the Navigator</action>
            <result>There should be a special node for each assignment in the Assignment activity</result>
            <result>The assignment text label should reflect the type of assignment</result>
            <result>Assignments should have two properties: CopyFrom and CopyTwo that display the  corresponding tags contents</result>	   
        </usecase>
        
        <usecase name="Empty activity">
            <action>Select Empty activity in diagram</action>
            <action>Select another activity in diagram</action>
            <action>Select Empty activity in Navigator</action>
            <result>When selecting activity on diagram it should become selected in the Navigator</result>
            <result>When selecting activity in Navigator it should become selected in the diagram</result>
            <result>Activity node in Navigator should have the same context menu items as the Activity on the diagram</result>	   
        </usecase>
        
        <usecase name="Wait activity">
            <action>Select Wait activity in diagram</action>
            <action>Select another activity in diagram</action>
            <action>Select Wait activity in Navigator</action>
            <result>When selecting activity on diagram it should become selected in the Navigator</result>
            <result>When selecting activity in Navigator it should become selected in the diagram</result>
            <result>Activity node in Navigator should have the same context menu items as the Activity on the diagram</result>	   
        </usecase>
        
        <usecase name="Throw activity">
            <action>Select Throw activity in diagram</action>
            <action>Select another activity in diagram</action>
            <action>Select Throw activity in Navigator</action>
            <result>When selecting activity on diagram it should become selected in the Navigator</result>
            <result>When selecting activity in Navigator it should become selected in the diagram</result>
            <result>Activity node in Navigator should have the same context menu items as the Activity on the diagram</result>	   
        </usecase>
        
        <usecase name="If activity">
            <action>Select If activity in diagram</action>
            <action>Select another activity in diagram</action>
            <action>Select If activity in Navigator</action>
            <result>When selecting activity on diagram it should become selected in the Navigator</result>
            <result>When selecting activity in Navigator it should become selected in the diagram</result>
            <result>Activity node in Navigator should have the same context menu items as the Activity on the diagram</result>	   
            <result>There should be subnodes for the If activity: for if and else branches and for all else-if branches</result>	   
        </usecase>
        
        <usecase name="The If branch node">
            <action>Select If branch node in the navigator</action>
            <action>Try to ad some new activities to the branch</action>
            <result>When selecting the node the If activity should be selected</result>	   
            <result>All the child activities in the branch must be displayed under this node</result>	   
        </usecase>
        
        <usecase name="The Else-if branch node">
            <action>Select Else-if branch node in the navigator</action>
            <action>Try to ad some new activities to the branch</action>
            <result>When selecting the node the If-else activity should be selected</result>	   
            <result>The node should have Condition property with the condition displayed</result>
            <result>All the child activities in the branch must be displayed under this node</result>	   
        </usecase>
        
        <usecase name="The Else branch">
            <action>Select Else branch node in the navigator</action>
            <action>Try to ad some new activities to the branch</action>
            <result>When selecting the node the If activity should be selected</result>	
            <result>All the child activities in the branch must be displayed under this node</result>	   
        </usecase>
        
        <usecase name="While activity">
            <action>Select While activity in diagram</action>
            <action>Select another activity in diagram</action>
            <action>Select While activity in Navigator</action>
            <action>Add some different activities to the While activity</action>
            <result>When selecting activity on diagram it should become selected in the Navigator</result>
            <result>When selecting activity in Navigator it should become selected in the diagram</result>
            <result>Activity node in Navigator should have the same context menu items as the Activity on the diagram</result>	   
            <result>All child activities should be displayed as subnodes in the Navigator</result>	   
        </usecase>
        
        <usecase name="Repeat Until activity">
            <action>Select Repeat Until activity in diagram</action>
            <action>Select another activity in diagram</action>
            <action>Select Repeat Until activity in Navigator</action>
            <action>Add some different activities to the activity</action>
            <result>When selecting activity on diagram it should become selected in the Navigator</result>
            <result>When selecting activity in Navigator it should become selected in the diagram</result>
            <result>Activity node in Navigator should have the same context menu items as the Activity on the diagram</result>	   
            <result>All child activities should be displayed as subnodes in the Navigator</result>	   
        </usecase>
        
        
              
        
        <usecase name="Foreach activity">
            <action>Select Foreach activity in diagram</action>
            <action>Select another activity in diagram</action>
            <action>Select Foreach activity in Navigator</action>
            <action>Add some different activities to the activity</action>
            <result>When selecting activity on diagram it should become selected in the Navigator</result>
            <result>When selecting activity in Navigator it should become selected in the diagram</result>
            <result>Activity node in Navigator should have the same context menu items as the Activity on the diagram</result>	   
            <result>All child activities should be displayed as subnodes in the Navigator</result>	   
        </usecase>
        
        
        <usecase name="Pick activity">
            <action>Select Pick activity in diagram</action>
            <action>Select another activity in diagram</action>
            <action>Select Pick activity in Navigator</action>
            <result>When selecting activity on diagram it should become selected in the Navigator</result>
            <result>When selecting activity in Navigator it should become selected in the diagram</result>
            <result>Activity node in Navigator should have the same context menu items as the Activity on the diagram</result>	   
            <result>Pick node should have subnodes for each Message and Alarm handler</result>	   
        </usecase>
        
        <usecase name="Message handler node under Pick node">
            <action>Select Message Handler node in the Navigator</action>
            <action>Add some activities to the Message Handler</action>
            <result>When selecting node in Navigator it should become selected in the diagram</result>
            <result>The node should have the same properties and context menu items as the Activity on the diagram</result>	   
        </usecase>
        
        
        <usecase name="Alarm handler node under Pick node">
            <action>Select Alarm  Handler node in the Navigator</action>
            <action>Add some activities to the Alarm Handler</action>
            <result>When selecting node in Navigator it should become selected in the diagram</result>
            <result>The node should have the same properties and context menu items as the Activity on the diagram</result>	   
        </usecase>
        
        <usecase name="Flow activity">
            <action>Select Flow activity in diagram</action>
            <action>Select another activity in diagram</action>
            <action>Select Flow activity in Navigator</action>
            <action>Add some different activities to the activity</action>
            <result>When selecting activity on diagram it should become selected in the Navigator</result>
            <result>When selecting activity in Navigator it should become selected in the diagram</result>
            <result>Activity node in Navigator should have the same context menu items as the Activity on the diagram</result>	   
            <result>All child activities should be displayed as subnodes in the Navigator</result>	   
        </usecase>
        
        
        <usecase name="Sequence activity">
            <action>Select Sequence activity in diagram</action>
            <action>Select another activity in diagram</action>
            <action>Select Sequence activity in Navigator</action>
            <action>Add some different activities to the activity</action>
            <result>When selecting activity on diagram it should become selected in the Navigator</result>
            <result>When selecting activity in Navigator it should become selected in the diagram</result>
            <result>Activity node in Navigator should have the same context menu items as the Activity on the diagram</result>	   
            <result>All child activities should be displayed as subnodes in the Navigator</result>	   
        </usecase>

        <usecase name="Exit activity">
            <action>Select Exit activity in diagram</action>
            <action>Select another activity in diagram</action>
            <action>Select Exit activity in Navigator</action>
            <result>When selecting activity on diagram it should become selected in the Navigator</result>
            <result>When selecting activity in Navigator it should become selected in the diagram</result>
            <result>Activity node in Navigator should have the same context menu items as the Activity on the diagram</result>	   
        </usecase>
        
        
    </caseblock>
    
    <caseblock name="Navigator Specific Nodes">
        <purpose>Check some Navigator-specific nodes</purpose>
        <setup>Open the test project.</setup>
        
           <usecase name="Setup usecase">
            <action>Open the test project attached <a href="./NavigatorTestProject.zip">here</a></action>
            
        </usecase>
        
        <usecase name="Add a variable to process or scope">
            <action>Select the variables node in a process</action>
            <action>Try to add a variable from context menu.</action>
            <action>Do the same for a scope.</action>
            
            <result>Process (Scope) should be selected when selecting Variables node</result>
            <result>All variables in the process should be displayed as the Variables node subnodes.</result>
            <result>For all scope-level variables special Scope container nodes should be displayed.</result>	  
        </usecase>
        
        <usecase name="Add a correlation set to process">
            <action>Select the correlation sets node in a process</action>
            <action>Try to add a correlation set from context menu.</action>
            
            <result>Process should be selected when selecting Correlation Sets node</result>
            <result>All sets in the process should be displayed as the Correlation Sets node subnodes.</result>
        </usecase>
        
<!--        
        <usecase name="Add a Message Exchange process or scope">
            <action>Select the Message Exchanges node in a process</action>
            <action>Try to add a message exchange from context menu.</action>
            <action>Do the same for a scope.</action>
            
            <result>Process (Scope) should be selected when selecting Message Exchanges node</result>
            <result>All message exchanges in the process should be displayed as the Message Exchanges node subnodes.</result>
            <result>For all scope-level message exchanges special Scope container nodes should be displayed.</result>	  
        </usecase>
-->        
        <usecase name="Imports node">
            <action>Select the Imports node in the process</action>
                       
            <result>All imported xsd and wsdl files should be displayed as the subnodes of this node</result>
            <result>Every import node should have Import Type, Namespace and Location editable properties.</result>            
        </usecase>
         
        
         <usecase name="PartnerLinkType node">
             <action>Expand the process wsdl node under the imports node</action>
          
                       
            <result>There must be a partnerLinkType node for each partnerLinkType defined in the process</result>
            <result>The node label should be the same as the partnerLinkType name</result>            
        </usecase>
        
        
         <usecase name="Property node">
             <action>Expand the process wsdl node under the imports node</action>
            
                       
            <result>There must be a properties nodes for each property defined in the process</result>
            <result>The node label should be the same as the property name</result>            
            <result>The property node should have the editable name property</result>            
            <result>There should be propertyAliases subnodes for each propertyAlias for this property</result>            
            <result>The propertyAliases nodes should have the PropertyName, MessageType, MessagePart and Query properties</result>            
        </usecase>
        
    </caseblock>
</spec>
