NLE TEST CASES
--------------

Prior to Starting:

If you have run shotcut with this user before, remove any autosaves:

$ rm -f $HOME/.autosave.*.westley


TERMINOLIGY
-----------

Basics:

* A 'clip' is the general term used for inputs to the NLE - these are further
  sub-classified as:
	* 'stories' being any clip with both video and audio
	* 'audio' being any clip with only audio
	* 'stills' being any clip with only video
* A 'cut' is part or all of a clip
* A 'track' is a sequential arrangements of cuts of a particular type or types - 
  tracks are sub-classified as:
	* 'Video' contains a back to back sequence of stories and stills
	* 'Super' contains a sequence of titles to overlay on the Video track
	* 'Voice Over' contains audio cuts
	* 'Music' contains audio cuts
* A 'project' is an arrangement of tracks
* A 'template' is the base arrangement for a project and it describes track
  information, mixing levels, transition information and other details that
  control what can be done with a project

The NLE component consists of 6 main sub-components:

* the 'server' receives clips for use
* the 'browser' lists clips that's been received
* the 'preview' plays back clips, cuts and the project itself
* the 'cutting tool' is used to trim clips and finetune existing cuts
* the 'panel' provides a collection of tools for manipulating the cuts
* the 'multitrack' provides a visual representation of the project and provides
  many manipulatons of the project itself

This document provides a thorough rundown of both the expected and actual
behaviour of the application.


CONTENTS
--------

1. STARTUP
2. BROWSER
3. CUTTING AND THE BROWSER
4. MULTITRACK
4.1 'Video' TRACK
4.2 'Super' TRACK
4.3 'Voice Over' TRACK
4.4 'Music' TRACK
5. ATTRIBUTES PANEL
6. SUPER PANEL
7. OBSCURE PANEL
8. COMMENTS PANEL
9. PREVIEW MODE
10. NEW PROJECT
11. PUBLISH
12. GENERAL


1. STARTUP
----------

1.0.0 Run: shotcut-nle
--> should be presented with an empty nle with the shotcut logo showing
    in the preview

1.0.1 Exit the NLE
--> This is currently done by pressing Escape
+++ TODO: Agree an exit procedure

1.0.2 Confirm autosave file is created
--> ls $HOME/.shotcut/autosave.*.westley
--> This should respond with a single file (autosave.5260.westley)

1.0.3 Repeat 1.0.0 and 1.0.1
--> Confirm that start up/shutdown is unaffected by autosave existence

Optional:

+++ Confirm that window starts in a 'normal window' when you specify a
	switch of --normal-window
+++ Confirm that you can change port/have multiple versions running when you 
	specify a non-default port (ie: --port=5261) - this should also affect
	the result of 1.0.2 above
+++ Confirm that a shutdown of the original occurs when you start a new
	instance on a used port


2. BROWSER
----------

2.0.0 Repeat 1.0.0
--> confirm that arbitrary clicking on empty widgets has no side effects

2.0.1 In another shell, inject some clips into the process:
--> ie: run: shotcut-inject --port=5260 *.dv *.jpg *.mp3 etc
--> or use a trained instance of mc or your file manager of choice
--> Ensure that browser widget shows all clips entered
--> Invalid clips should should be received with an INVALID thumbnail/cut
+++ TODO: Agree on a 'technical difficulties' for missing clips in all cases

2.0.2 Selecting arbirtrary clips
--> confirm that the preview shows/plays the clips
--> confirm that the region above the preview shows the selected clips thumb 
    and details
+++ TODO: show an icon for audio only clips
+++ Possible BUG: Clicking on selected item refreshes cutter to defaults
+++ BUG: Cutter tool refreshes to default of selected when clicking on scroll 
	bar 

2.0.3 Playback of selected clip
--> space toggles playback/pause
--> < and > or , and . are equivalent to |<< and >>| resp.
--> transport bar below the preview is active
*** most buttons on the transport are 'pressure sensitive' (they snap back to 
	the previous play or pause state when released, with the exceptions of |< and
	>| which force a pause state on release).
+++ TODO: Reimplement |<< and >>| functionality at the project level

2.0.4 Selection of an image
--> Confirm that the default out point and length match requirements

2.0.5 Click on light buttons above browser
--> Confirm that they show/hide clips of the expected type
--> Confirm that cursor up/down always move to the next item shown

2.0.6 Double click on light buttons above browser
--> Confirm that only clips of the selected type is shown
--> Confirm that cursor up/down always move to the next item shown

2.0.7 Confirm placement in multitrack with ctrl-enter
--> clips will be placed in the active track as per the rules of a drop at the 
	current position
--> confirm that only clips of the correct type is placed in the project
--> confirm that when inserted, the position on the multitrack is at the end of
	the newly placed cut
+++ Possible BUG: this action ignores the cutting tool selection 
+++ Possible BUG: attempts to ctrl-enter clips of the wrong type into the current
	track will be silently ignored and the selected item will move to the next
	as per cursor down behaviour

2.0.8 Confirm placement in multitrack with drag and drop from the browser
--> clips will be placed in the specified position as per the rules of the track
--> confirm that when inserted, the position on the multitrack is at the start of
	the newly placed cut
+++ Possible BUG: this action ignores the cutting tool selection 
+++ Possible BUG: attempts to drop clips of the wrong type onto a track will be 
	silently ignored

2.0.9 Confirm 'browser tracking' functionality
--> When the tracking button is on, navigating/playing the project should change
	the selection
+++ TODO: Probably remove this functionality?

2.0.10 Confirm multitrack tracking
--> When you select an item in the browser, it's existence on the multitrack is 
	reflected by the colouring of the items on the multitrack - when you're 
	navigating in the browser, the multitrack will reflect this by showing the
	items as warm or cold. 

2.0.11 Confirm 'Clean' functionality in parallel with light buttons
--> Clean should remove all items in the current view which are currently not in
	the project
+++ BUG: Ocassionally, the last clip in use may hang around after a Clean - 
	pressing clean again should recover from this situation.

2.0.12 Remove all items from the project and clean (select and press Del for each item)
--> Confirm same behaviour as 2.0.8

2.0.13 Exit the NLE when the project is empty

Optional:

+++ Confirm behaviour of synthetic producers (colour, noise etc).
+++ Confirm behaviour of other shotcut client applications (inigo, shotcut-editor,
	shotcut-preview, mactor etc).


3. CUTTING AND THE BROWSER
--------------------------

3.0.0 Restart the NLE
--> If you're following on from section 2 above, the project should be empty

3.0.1 Inject some clips
--> Same as 2.0.1

3.0.2 Select an item from the browser
--> Confirm that the preview and cutting tool below the preview reflect the 
	full length

3.0.3 Keyboard focus for cutting
--> Pressing tab from the browser cycles between:
*** the browser (selected item is red with focus, blue without)
*** cutting tool (position pointer is black or blue)
*** multitrack (labels on the left are light with focus, dark without)

3.0.4 Focus shifting to the cutting tool and keyboard control
--> i and o will change the in and out points to the current position
--> ctrl-i, ctrl-o and ctrl-p bring focus to the in, out and position slides 
	respectively
--> ctrl-u will toggle between unlocked and locked mode
--> left and right cursor keys will change the selected slide by 1 frame
--> ctrl-left and ctrl-right move the selected slide by 25 frames
--> home will move the position to the current in point
--> end will move the position current out point
--> ctrl-enter simulates a drop on to the currently selected cut on the
	timeline 
+++ TODO: Have keyboard equivalent for link operations

3.0.5 Using the mouse
--> clicking and dragging the in, out and position slides changes the 
	associated value
--> clicking and dragging the middle bar provides drag and drop functionality
--> in and out can be changed to the current position by clicking on the in and
	out buttons

3.0.6 Lock mode
--> Confirm that position cannot move outside the selected in/out region when 
	lock mode is active

3.0.7 Link mode
--> when in link mode, the distance between in and out will remain constant
	when in or out points are changed


4. THE MULTITRACK
-----------------

4.0.0 Clicking on an item in the multitrack seeks to the associated track and cut
--> confirm that selecting an item on the multitrack
*** forces focus on the multitrack
*** moves the position inidicator above the multitrack 
*** causes the active track to change when necessary
*** causes the item above the preview to change to the selected item
*** the selected cuts is shown as hot
*** instances of other cuts from the same clip are shown as warm
*** overlapping items on other tracks are shown as luke warm
*** all other items are cold

4.0.1 Clicking on the multitrack while playing
--> space toggles playback/pause
--> same behaviour as 4.0.0, playback state is unaltered unless the end is reached

4.0.2 Clicking on labels to the left
--> changes selected track without altering position
--> multitrack is updated to reflect the warmth of the current track (as per 4.0.0)
--> cutting tool disappears if track is empty (at the current project position)

4.0.3 Cursor up and Down
--> Changes active track

[ The following sections assume testing in the default project type where all ]
[ tracks are available                                                        ]


4.1 'Video' TRACK
-----------------

4.1.0 Dropping items from the browser/cutting tool
-->	All cuts are placed back to back - no gaps are allowed on this track
--> insertion will occur to the left or right of the existing cut, depending on
	where the drop occurs on an existing cut
--> Only 'Projects', 'Stories' and 'Stills' are accepted on this track

4.1.1 Moving cuts 
--> Attempts to move onto another track will be reject
--> same placement rules as 4.1.0, and affected track behaviour is similar with
	the items on the lower tracks being moved if they meet the following 
	requirements:

4.1.2 Deleting cuts
--> Confirm that cuts can be removed
--> Only blanks from Voice Over are removed

4.1.3 Double clicking on a cut turns it into an SB
--> 

4.1.4 Right button click
--> Mutes or unmutes the audio for the cut selected

4.1.5 Exit and restart the nle
--> Ensure that mute and SB settings are retained


4.2 'Super' TRACK
-----------------

4.2.0 Dropping items from the browser/cutting tool
--> will have no effect - supers are introduced via the 'Super Panel'


4.3 'Voice Over' TRACK
----------------------

4.3.0 Dropping items from the browser/cutting tool
--> only audio only items will be accepted


4.4 'Music' TRACK
-----------------

4.4.0 Dropping items from the browser/cutting tool
--> only audio only items will be accepted


5. ATTRIBUTES PANEL
-------------------

5.0.0 Population
--> This panel is only populated when editing a cut from the Video track

5.0.1 Turning on and off
--> confirm that the item is reflected correctly in the preview


6. SUPER PANEL
--------------

5.0.0 Population
--> This panel is only populated when editing a cut from the Video track
--> super won't be directly selectable

TO BE IMPLEMENTED

7. OBSCURE PANEL
----------------

5.0.0 Population
--> This panel is only populated when editing a cut from the Video track
--> super won't be directly selectable

TO BE IMPLEMENTED


8. COMMENTS PANEL
-----------------

8.0.0 State retention/display
--> Selecting an item via the browser will enable the project and clip comments
	and populate them correctly
--> Selecting an item via the multitrack will enable the project, clip and cut
	comments and populate them accordingly


9. PREVIEW MODE
---------------

9.0.0 Preview behaviour
--> Cuts between scenes should show transitions

9.0.1 Cutting tool behaviour
--> The only slider left is the position slider

9.0.2 Multitrack editing
--> Disabled


10. NEW PROJECT
---------------

10.0.0 Press New Project
--> Selection presents a list of available templates

10.0.1 Cancel
--> Window is closed, current project remains

10.0.2 Press New Project, enter a title, select a template an press OK
--> multitrack should be emptied and adopt the tracks of dictated by the template
--> Title should appear in the Comments Panel


11. PUBLISH
-----------

11.0.0 Press Publish
--> Behaviour is to pass the project to the default miracle server 
--> When shotcut-server is running, a list of targets should be presented


12. GENERAL
----------

12.0.0 Auto recovery
--> exit the application at any point and restart
--> confirm that:
*** the used items from the previous session are present in the browser
*** the multitrack and user settings in the panels are recovered

12.0.1 Undo/Redo
--> All modifications on the panels and multitrack are recovered with ctrl-z and 
	ctrl-r
+++ INTENDED: Only items that affect playout are tracked with undo/redo

12.0.2 Track CPU usage and memory
--> shotcut-nle should have low cpu usage when in a paused state

12.0.3 'Hidden' state
--> when the shotcut-nle window is hidden (by switching workspaces in your window
	manager, or minimising when in --normal-window mode), the current play state
	should drop to paused and the main mlt consumer component should be stopped -
	when the application is re-displayed, it should be restarted in a paused state.

12.0.4 Editing during playback
--> this should cause a pause as soon as an edit operation is attempted

12.0.5 Exiting during playback
--> this should cause a pause as soon as an exit operation is attempted

12.0.6 Panel shortcuts
--> ctrl 1 to 4 should switch the active panels

12.0.7 Multitrack button shortcuts
--> alt 1 to 8 should activate the buttons at the bottom of the multitrack

