wiki:PromotEditorTest

Version 41 (modified by mirschel, 13 years ago) (diff)

--

ProMoT Visual Editor

This page describes a detailed PromotTestPlan0.8.5 for the visual editor of ProMoT . Test results are reported on a separate page.

The Functionality needed for the setups, described in the following should be tested in browser tests, see: PromotTestPlan0.8.5)

Setup A: applied to tests 1-5, 7, 9-17, 20
Start ProMoT server and GUI -> load the logical library -> load the logical toymodel from tutorial Promot/trunk/promot/kb/SignalTransd/structure/toymodel_tutorial/LOAD_toymodel.mdl -> Open the Visual Editor for the browser tree node "cell" by double click.

Setup B: applied to tests 11, 16, 20
Start ProMoT server and GUI -> load Promot/trunk/promot/kb/practical-bio/LOAD.mdl which includes the library (dynamic-library) for dynamic modeling -> Open the browser tree for "dynamic-model", for "mapk_modules" and double click to "raf-ras_modu" to open the Visual Editor for this class.

Setup C: applied to test 21
Start ProMoT server and GUI -> load the logical library -> load the test file Promot/trunk/promot/kb/testsuite/mdl/shortcut-test.mdl -> Open the Visual Editor for "new-subclass".

Setup D: applied to test 22
Start ProMoT server and GUI -> load the logical library -> load the test file Promot/trunk/promot/kb/testsuite/mdl/checker-test.mdl -> Open the Visual Editor for "cell".

Setup E: applied to test 24,25
Start ProMoT server and GUI -> load the logical library -> load the test file Promot/trunk/promot/kb/testsuite/mdl/test-create-links.mdl -> Open the Visual Editor for "test_outer".

  1. Open the menu "Model" -> "Save as", type in the dialog "cell2" and click to the button "OK". A new class appears in the browser tree with name "cell2" with the same mdl-code like cell. !!! Save changes has to be tested. !!!

  2. Click to "X" in the upper right corner or choose the menu action "Model" -> "Close" and the editor disappears.

  3. Open the browser tree for "struct-library" and "compound"
    • Drag from the ProMoTTreeNode "drug" to the Modules-palette and drop. The class is now available in the Palette.
    • Drag from the ProMoTTreeNode "nucleus" to the ConstructionArea and drop. A new Slot with name "nucleus0" is created at the coordinates where dropped.

  4. Drag from the class "source" in the Modules-palette to the ConstructionArea, a new instance is created with name "source0" at the coordinates where dropped.

  5. Setup A and test 3 -> then click with right mouse button to the class "drug" in the Modules-palette and choose delete. The class disappears.

  6. Disposing a slot in the ConstructionArea of the PaletteWindow is tested in the junit test Promot/trunk/promot/src/gui/org/mpg/dcts/promot/vizedit/cmds/CmdDisposeTest.java

  7. Double click to the class nucleus and a new visual editor with the corresponding class opens.

  8. Rename connected and unconnected slots is tested in junit test Promot/trunk/promot/src/gui/org/mpg/dcts/promot/test/CmdRenameTest.java, tests are still enhanceable.

  9. Insert a "kinase" and an "and-2" slot by drag and drop from the Modules-palette, then drag an edge from the port of "kinase" to the "input1" port of "and-2". A new link with a linknode placed at the "kinase" port will be created.

  10. Press the mouse over the slot named "nucleus" and move the mouse around, mouse release will place the "nucleus" slot at another place. Now press the cursor-key and the selected slot will also move.

  11. Propagate a terminal from a slots port
    1. logical gate terminal & logical compound terminal:
      Use Setup A, insert a new slot "and-2" by Drag and Drop from the Modules-palette, right click on the new node and choose 'Connect Terminals' -> 'Propagate input 1' from the context menu, a new 'term-struct-input' named 'input1' is created and connected to the input1-terminal of the 'and_2';
    2. Now insert a new slot "kinase" by Drag and Drop from the Modules-palette, right click on the new node and choose 'Connect Terminals' -> 'Propagate input' from the context menu, a 'struct-adapter-compound' is inserted and its input-terminal is propagated. There is also a LinkNode created for the link between the compound and the adapter and placed on the compound terminal.
    3. dynamic terminals:
      Use Setup B, insert a new slot "storage-intra" by Drag and Drop from the Modules-palette, right click on the new node and choose 'Connect Terminals' -> 'Propagate cf' from the context menu, an 'adapter-flux' is inserted and its term-reaction-flux is propagated to the modules border. There is also a LinkNode created for the link between the storage and the adapter and placed on the storage terminal.

  12. EditDetailsDialog (see detailed tests)

  13. Open the EditDetailsDialog for the slot "not_r1_r2_a2", add a documentation string and set the 'ignore_in_export' variable to the value '1', save and close (see test 12). Then select the slots "r1", "r2", "not_r1_r2_a2", "not" and "a2" and the links between them and press 'Ctrl + C' and 'Ctrl + V'. The slots "r10", "r20", "not0" "not_r1_r2_a20" and "a20" are created and connected like the original. Check via the EditDetailsDialog or in the mdl that "not_r1_r2_a20" has the value '1' for the variable 'ignore_in_export' and the same documentation string like "not_r1_r2_a2". Open the visual editor for the class "nucleus" and also press 'Ctrl + V', the slots are created, check again the names variables and documentation.

  14. Open the visual editor for the class "nucleus", open the EditDetailsDialog for the slot "k3p1_k3p2_tf1" and change the variable "ignore_in_export" to the value "1", the variable "output.a" to the value "2" and add a documentation String. Save and close the dialog and the editor for "nucleus". Select the slot "nucleus" and choose from the menu 'Tools'->'Elevate Module Content'. Three slots named "k3p1_k3p2_tf1" "tf1" and "drain" are created and the ports of the gate are connected to the gates "k3p1" and "k3p2". The class nucleus is deleted. Now open the EditDetailsDialog and check if the docu and variables are transfered.

  15. Edit the variables and docu of "not_r1_r2_a2" like in test 13. Select the slots "r1", "r2", "not_r1_r2_a2", "not" and "a2" and choose from the menu 'Tools'->'Create Class From Selection', press OK in the class name dialog. The new class with the name "new_submodule_of_cell" is created and contains the selected slots, check via EditDetailsDialog or in the mdl that the variables and docu for "not_r1_r2_a2" is transfered and the previously selected slots are deleted from the class cell.

  16. Choose from the menu 'Model'->'Export Graphics'->'Save Graphics to EPS', choose a target directory for the export, type a name and click to 'Save'. Repeat for the formats gif and gif-icon. Check the created files.

  17. Drag a rectangle around the nodes "r1_a1", "r1", "r2", "not" "not_r1_r2_a2" to select them, then choose 'Edit'->'Set Map Number' from the menu. Type '2' in the dialog and click to OK. Check the mdl code in the browser, if parameters are written for the slots.

  18. Setting the model size is tested in Promot/trunk/promot/src/gui/org/mpg/dcts/promot/vizedit/cmds/CmdSetModelSizeTest.java

  19. Fitting the model size to module content is also tested in Promot/trunk/promot/src/gui/org/mpg/dcts/promot/vizedit/cmds/CmdSetModelSizeTest.java

  20. Choose from the menu 'Layout'->'Spring Layout', keep default options in dialog, click the button 'Layout'. Repeat the operation for all other layouts (Radial, Grid, Random, Modular, Global). Check layout results in editor.

  21. Setup C:
    • Activate the ShortCut Activation from the Toolbar
    • Drag an edge from "adapter0" to "adapter1", an "active" is inserted and connected with the two compounds, and two LinkNodes are inserted and placed on the compounds; undo and redo this action
    • Drag an edge from "adapter0" to "adapter", a further "active" is inserted and connected to the compounds, the connection to adapter gets also a LinkNode; undo and redo this action
    • Drag from "adapter" to "adapter1", an "activ" is inserted between the two LinkNodes
    • Drag from "adapter2" to "new_subclass1", an "activ" and a LinkNode on "adapter2" are inserted; undo and redo this action (refresh (F5) if necessary)
    • Close the Editor without save and repeat the steps after choosing the "Inhibition" shortcut

  22. Setup D:
    • Wait until the status bar for the checker shows a green light and "Checker: READY" appears. Now the nodes have colored boxes and tooltips as listed below.
    • struct_adapter_compound1 (dark Magenta box; "Warning (Links):-> Exactly one of the ports of the StructAdapter should be connected to a Terminal")
    • r1_a1 (Gray box; "Error (link fault):->Don't connect GateOutputs directly to GateInputs, use a compound in-between")
    • struct_adapter_gate (Gray box; "Error (link fault):->Don't connect the StructAdapter for Gates with Compounds")
    • phosphatase (Gray box; "Error (link fault):->Don't connect the StructAdapter for Gates with Compounds")
    • not_r1_r2_a2 (dark Magenta box; "Warning (Links):->Two or more LinkNodes are connected.")
    • a2 (dark Magenta box; "Warning (Nodes):->Two or more LinkNodes are connected.")
    • source (Gray box; "Error (link fault):->Don't connect GateOutputs directly to GateInputs, use a compound in-between"; "Error (link fault):->Don't connect Drains to Sources without a Compound")
    • drain (Gray box; "Error (link fault):->Don't connect Drains to Sources without a Compound"; "Error (link fault):->Don't connect GateOutputs directly to GateInputs, use a compound in-between")
    • not_ud (Red box; "Error (open Port):-> Not all Ports have a connection")
    • ph1 (Gray box; "Error (link fault):->Don't connect Compounds with each other")
    • k3p1 (Gray box; "Error (link fault):->Don't connect Compounds with each other")
    • k1_k3r_k3p1 (Red box; "Error (open Port):-> Not all Ports have a connection")
    • and_2_2 (dark Magenta box; "Warning (Links):->Two or more LinkNodes are connected.")
    • a1_ph2 (Red box; "Error (open Port):-> Not all Ports have a connection")
    • k2_k3r_k3p2 (Red box; "Error (open Port):-> Not all Ports have a connection")
    • a1_not_ph1_k1 (Gray box; "Error (link fault):->Don't connect GateOutputs directly to GateInputs, use a compound in-between")

  23. Flipping of nodes is tested in Promot/trunk/promot/src/gui/org/mpg/dcts/promot/test/FlippingTest.java, rotation of nodes is tested in Promot/trunk/promot/src/gui/org/mpg/dcts/promot/test/RotationTest.java

  24. Setup E:
    • Choose from the menu 'Edit'->'Create Links'. Click 'Find Terminals' in the dialog. The following text (terminals) should appear as a table in the output log.
      NAME: term_1 OUTPUT: test1.out_term_1 INPUT: test2.in_term_1
      NAME: term_2 OUTPUT: test2.out_term_2 INPUT: test1.in_term_2
      NAME: term_3 OUTPUT: test2.out_term_3 INPUT: test1.in_term_3

      Select all rows and click 'Create Links' in the dialog. All Ports will be connected after performing the action. Undo/redo this action (refresh (F5) if necessary).

  25. SetupE+24.
    • Open the Visual editor for test1. Change name of 'in_term_3' to 'in_term_4'. A dialog will pop up asking for refactoring. Click yes.
    • Save and close visual editor for test2. Press F5 with fokus in visual editor of test_outer.
    • All terminal are sill connected and the new name appears.