Purpose: To test the Common Navigator Resource view in Eclipse. We will start out
with an empty workspace, create some projects and files, open files, open
some new perspectives, delete some files, test the filtering and sorting
options, and test the persistance of view state between sessions. The Common
Navigator Resource view tests are derived from the Navigator View tests. The following
test plan is a trimmed down version of the current Resource view test plan.
Setup:
Install Eclipse Platform.
Delete the metadata for org.eclipse.ui.
Method:
Start the workbench. Confirm that the default perspective (Resource)
and welcome editor both appear.
Open the Common Navigator Resource View (Window>Show View>Basic>Experimental Resource Navigator)
Create a project using the File > New wizard and verify that it appears
in the navigator.
Create another project by invoking New > Project from the navigator popup
menu. Verify that it appears in the navigator.
Create a .txt file, a .html file, and a .java file by invoking New > File
from the navigator popup menu. Verify that these files appear in
the navigator and that an editor is opened on each. Close all of
these editors.
If you select a file you can open it from the context menu. Open
a .txt file and verify that the default text editor opens. Open a
.java file and verify that the java editor opens.
You can also open a file in a specific editor. Select a .java file
and invoke Open With > Default Text Editor. The default text editor
should open rather than the java editor. If you select Open With
> System Editor something like notepad should open. The preferred
editor for a file is always indicated with a check mark in the Open With
menu.
Common Navigator Test Viewer
Create a file named 'model.properties' in the root of a project. Add
the following entries to the file:
After creating the file, open the 'Test Navigator Viewer'
(Show View>Other>Test Navigator View).
Expand the project in test viewer. Verify that in addition to
the resources, a logical model matching the structure from the properties
file is presented. Verify that each item has the correct label ('Parent',
'Child1', etc) and the correct icon (each element should have the shared
'element' icon from the workbench).
Verify that no context menu appears when a logical node is selected.
Deactivatethe 'Test Navigator Extension' by opening the Filters dialog, going
to the 'Types of Content' tab, and unchecking the 'Test Navigator Extension'
item. Verify that the logical model elements disappear from the tree.
Reactivatethe 'Test Navigator Extension' by opening the Filters dialog, going
to the 'Types of Content' tab, and checking the 'Test Navigator Extension'
item. Verify that the logical model elements reappear from the tree.
Deactivatethe 'Resources extension'. Verify that the tree becomes empty.