Wiki

Clone wiki

main / Code_Editor_Test_Cases

Code Editor Test Cases

Context Menu Actions

The following actions must all be tested each time a build is made.

  • New Code action from the table.
  • Rename Code action from the table.
  • Delete Code action from the table.
  • View Associated Fragments from the table.
  • New Root Code from the tree.
  • New Sub-Code from the tree.
  • Rename Code from the tree.
  • Remove code from the tree.

Delete and Remove should be tested under the following conditions.

  • (Delete only) A code that is not in the hierarchy.
  • A code the is only a leaf.
  • A code that has 1 child.
  • A code that has more than 1 child.
  • A code that has a child who has 1 child.
  • A code that has a child who has more than 1 child.
  • (Delete only) A code that is in multiple places in the hierarchy (Preferably for each of the cases listed).
  • (Delete only) A code that is part of at least 1 fragment with the corresponding rtf editor open.
  • (Delete only) A code that is part of at least 2 fragments in different documents with both rtf editors open.

The above should be tested under each of the following conditions:

  • The editor is clean.
  • The editor is dirty due to unsaved descriptions.
  • Filtering is on and the editor is clean.
  • Filtering is on and the editor is dirty due to unsaved descriptions.

When testing with unsaved descriptions we should verify both that saving the description after the action works properly and closing the editor without saving does not save the description.

Drag and drop

(S) indicates that the action should succeed. (F) indicates that the action should fail.

From the table

  • Drag a code to the root. (S)
  • Drag a code to the root when it is already a root. (F)
  • Drag a code to another root code. (S)
  • Drag a code to another root code which already has it as a child. (F)
  • Drag a code to another non-root code. (S)
  • Drag a code to another non-root code which has it in its chain of parents. (F)

From the tree

  • Drag a root code to the root. (F)
  • Drag a non-root code to the root. (S)
  • Drag a non-root code which already exists as a root to the root. (F)
  • Drag a root code with no children to another root code which has no children. (S)
  • Drag a root code with children to another root code which has no children. (S)
  • Drag a root code with children to one of its children. (F)
  • Drag a root code with children to another instance of one of its children. (F)
  • Drag a non-root code with children to the root. (S)
  • Drag a non-root code with children to another code with children. (S)
  • Drag a non-root code with children to another code which already has it as a child. (F)
  • Drag a non-root code with children to another code which has one of its children in its chain of parents. (F)

The tree cases should be tested both with move and with copy (holding Ctrl).

Updated