﻿***************************************************************************
** Virtual Keyboard Input Method (iiim-keyboard) test cases for Solaris  **
***************************************************************************

	*Note1 : This test cases should be done in each supported
	         login locale
	*Note2 : The applications which are used in this testing are
		- gedit (gtk)
		- gnome-terminal (gtk)
		- StarOffice9/OpenOffice.org3 (gtk)
		- Notepad (non gtk - java)
		- xterm (non gtk)
	*Note3 : The test machine should have all of UTF-8 locales installed
	*Note4 : In all cases, if UI message is not localized or not correct
		 please file a issue for it
        *Note5 : If tester account has ever tried the prototype version of
	         Virtual Keybaord before, please delete old preference with
		 below command.
		 % rm $HOME/.java/.userPrefs/com/sun/g11n/vkb/prefs.xml

-------------------- Case 1 ------------------------------------------------
[Objective]
	Test invoke/exit

[Description]
	- login new user (or execute gnome-cleanup before test user login)
	- invoke terminal emulater (gnome-terminal or dtterm)
	- execute iiim-keyboard
	- click window manager's close button (typically top/right X button)
	- click Input Method switcher (in gnome-panel) with secondly mouse
	  button (typically right mouse button)
	- select 'Virtual Keyboard' entry

[Expected Result]
	- Virtual Keyboard window comes up
	- Virtual Keyboard window exits
	- Virtual Keyboard window comes up again

-------------------- Case 2 ------------------------------------------------
[Objective]
	Test change symbol

[Description]
	- invoke iiim-keyboard
	- select arbitrary name from 'context menu' -> 'Symbols' and
          see the key top characters
	- click Shift/Caps Lock/AltGraph modifier keys and see the key
          top characters

	* 'context menu' is the pop up menu with secondary (right) mouse key
          on the Virtual Keyboard

[Expected  Result]
	- key top characters on Virtual Keyboard is changed according to
	  selected symbol
	- modifier keys change the appearance of key top characters

-------------------- Case 3 ------------------------------------------------
[Objective]
	Test input characters to GTK application (1) - gedit/gnome-terminal

[Description]
	- invoke iiim-keyboard
	- invoke gedit
	- invoke gnome-terminal
	- click gedit or gnome-terminal and enter some characters with
	  physical keyboard
	- move focus to the Virtual Keyboard
	- click keys on the Virtual Keyboard
	- try input with several symbol set with 'context menu' -> Symbols
	- try input with Shift / Caps / AltGraph modifier on the Virtual Keyboard

[Expected  Result]
	- active character on clicked key is entered into last focused
	  application (gedit or gnome-terminal)

-------------------- Case 4 ------------------------------------------------
[Objective]
	Test input characters to GTK application (2) - OpenOffice.org3 or StarOffice9

[Description]
	- invoke iiim-keyboard
	- invoke OpenOffice.org3 (or StarOffice9) (Writer, Calc or Impress)
	- click OpenOffice.org3 application and enter some characters with
	  physical keyboard
	- click keys on the Virtual Keyboard
	- try input with several symbol set with 'context menu' -> Symbols
	- try Shift / Caps / AltGraph modifier on the Virtual Keyboard

[Expected  Result]
	- active character on clicked key is entered into last focused
	  application (OpenOffice.org3)

-------------------- Case 5 ------------------------------------------------
[Objective]
	Test input characters to non GTK application (1) - Java Notepad

[Description]
	- invoke iiim-keyboard
	- invoke Notepad (java -jar /usr/java/demo/Notepad/Notepad.jar)
	- click Notepad and enter some characters with physical keyboard
	- click keys on the Virtual Keyboard
	- try input with several symbol set with 'context menu' -> Symbols
	- try Shift / Caps / AltGraph modifier on the Virtual Keyboard

[Expected  Result]
	- active character on clicked key is entered into last focused
	  application (notepad)

-------------------- Case 6 ------------------------------------------------
[Objective]
	Test input characters to non GTK application (2) - xterm

[Description]
	- invoke iiim-keyboard
	- invoke /usr/X11/bin/xterm
	- click xterm and enter some characters with physical keyboard
	- click keys on the Virtual Keyboard
	- try input with several symbol set with 'context menu' -> Symbols
	- try Shift / Caps / AltGraph modifier on the Virtual Keyboard

[Expected  Result]
	- active character on clicked key is entered into last focused
	  application (xterm)

-------------------- Case 7 ------------------------------------------------
[Objective]
	Test change layout

[Description]
	- invoke iiim-keyboard
	- select arbitrary name from 'context menu' -> 'Layout' and
          see the keys layout

[Expected  Result]
	- layout of keys on Virtual Keyboard is changed according to
	  selected layout

-------------------- Case 8 ------------------------------------------------
[Objective]
	Test edit key (1) - create new symbol set

[Description]
	- invoke iiim-keyboard
	- select 'Edit Key...' from 'context menu'
	- drag a key and drop it on another key
	- double click a key and change/add arbitrary string in popped up
	  "Key Editor" and click 'OK'
	- repeat above 2 steps several times
	- click 'Save As...'
	- enter arbitrary symbol name and click 'Save'
	- try new symbol set for inputting characters to other applications
	- see Input Method switcher's menu 

[Expected Result]
	- newly defined symbol set can be used for inputting characters to
          other application
	- Input Method switcher contains newly created symbol set

-------------------- Case 9 ------------------------------------------------
[Objective]
	Test edit key (2) - modify custom symbol set

[Description]
	- invoke iiim-keyboard
	- select custom symbol (created in Case 8) from 'context menu' ->
	  'Symbol'
	- select 'Edit Key...' from 'context menu'
	- drag a key and drop it on another key
	- double click a key and change/add arbitrary string in popped up
	  "Key Editor" and click 'OK'
	- click 'Save'

[Expected Result]
	- 'Save' button on Edit Window is activated
	- modification is effective after clicking 'Save' button

-------------------- Case 10 ------------------------------------------------
[Objective]
	Test delete custom symbol

[Description]
	- invoke iiim-keyboard
	- select 'Delete Custom Symbol...' from 'context menu'
	- select one newly created symbol name and click 'Delete' on the
	  'Delete Custom Symbol' dialog
	- see 'context menu' -> 'Symbols' sub menu

[Expected Result]
	- Deleted symbol name is deleted from Symbols sub menu
	- if user re-login it does not appear in Input Method Switcher's
	  menu anymore
	
-------------------- Case 11 -----------------------------------------------
[Objective]
	Test save keyboard

[Description]
	- invoke iiim-keyboard
	- see 'context menu' -> 'Show Keyboard' submenu
	- select arbitrary 'Symbol' or 'Layout' other than
	  "US/English - Generic 101"
	- select 'Save Keyboard' from 'context menu'
	- see 'context menu' -> 'Show Keyboard' submenu
	- repeat above 3 steps several times

[Expected Result]
	- Initial entry for 'Show Keyboard' submenu is
	  "US/English - Generic 101"
	- The saved symbol and layout combination is shown in
	  'Show Keyboard' submenu

-------------------- Case 12 -----------------------------------------------
[Objective]
	Test show keyboard

[Description]
	* assume Case 11 is done already

	- invoke iiim-keyboard
	- select one of the item in 'context menu' -> 'Show Keyboard'

[Expected Result]
	- The symbol and layout are changed according to selection of
	  'Show Keyboard' submenu

-------------------- Case 13 -----------------------------------------------
[Objective]
	Test delete keyboard

[Description]
	- invoke iiim-keyboard
	- select saved keyboard from 'context menu' -> 'Show Keyboard'
	- select 'Delete' from 'context menu'
	- see 'context menu' -> 'Show Keyboard' submenu

[Expected Result]
	- Deleted keyboard is deleted from 'Show Keyboard' submenu

-------------------- Case 14 -----------------------------------------------
[Objective]
	Test display multiple keyboards

[Description]
	- invoke iiim-keyboard
	- check 'Display Multiple Keyboards' checkbox in 'context menu'
	- select saved keyboard from 'context menu' -> 'Show Keyboard'
	- uncheck 'Display Multiple Keyboards' checkbox in 'context menu'

[Expected Result]
	- the Virtual Keyboard changed to have tab
	- newly selected keyboard is shown in newly added tab
	- the Virtual Keyboard changed back to single keyboard with uncheck
	  'Display Multiple Keyboards'

-------------------- Case 15 -----------------------------------------------
[Objective]
	Test synchronize physical keyboard

[Description]
	- invoke iiim-keyboard
	- select arbitrary Symbol from 'context menu' -> 'Symbols'
	- check 'Synchronize with physical keyboard' checkbox in
	  'context menu'
	- move focus to other application and make sure IM is on
	- type physical keyboard on the application

[Expected  Result]
	- The symbol of the last focused Virtual Keyboard is emulated
	  on the focused application

-------------------- Case 16 -----------------------------------------------
[Objective]
	Test help

[Description]
	- invoke iiim-keyboard
	- select 'Help' from 'context menu'

[Expected Result]
	- help is displayed with firefox browser

******************************** END ****************************************
