*****************************************************************************
** Input Method preference editor (iiim-properties) test cases for Solaris **
*****************************************************************************

	*Note1 : This test cases should be done in each supported
	         login locale
	*Note2 : This test cases should be done in each supported
	         Desktops (ex: CDE and JDS on Solaris)
	*Note3 : The applications which are used in this testing are
		- gtk application (ex: gedit, gnome-search-tool etc...)
		- gnome-terminal
		- motif application (ex: dtterm, dtpad etc...)
		- starsuite7, 8
		- java application (ex: Notepad
			% java -jar /usr/java/demo/jfc/Notepad/Notepad.jar
		- mozilla
	*Note4 : The test machine should have all of UTF-8 locales installed
	*Note5 : In all cases, if UI message is not localized or not correct
		 please file a issue for it

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

[Description]
	- login new user (or execute gnome-cleanup before test user login)
	- invoke terminal emulater (gnome-terminal or dttterm)
	- execute iiim-properties
	- click [OK] button
	- execute iiim-properties again
	- click window manager's close button (typically top/right X button)

[Expected Result]
	- iiim properties dialog comes up
	- iiim properties exit in both ways

-------------------- Case 2 ------------------------------------------------
[Objective]
	Test invoke/exit - 2
	*This is JDS only

[Description]
	- click "Launch" button and select "Preferenct"->"Desktop Preferenct"
	  ->"Input Methods"
	- click [Cancel] button
	- add 'Input Method switcher' to gnome-panel if it dose not exist
	  (click gnome-panel with right mouse button and select
	   "Add to Panel"->"Utility"->"InputMethod Switcher"
	- right click on 'Input Method switcher' on gnome-panel
	  and select "Preferences..."
   	- click [OK] button

[Expected  Result]
	- iiim properties dialog comes up in both ways
	- iiim properties exits in both ways

-------------------- Case 3 ------------------------------------------------
[Objective]
	Test invoke/exit - 3
	* This is CDE only

[Description]
	- click right mouse button on screen backgroud to popup
	  workspace menu, and select "Tool"->"Input Method Preference"
	- close window with window manager's "Close" menu

[Expected  Result]
	- iiim properties dialog comes up
	- iiim properties dialog exits

-------------------- Case 4 ------------------------------------------------
[Objective]
	Test Enable Input Method

[Description]
	- invoke iiim-properties with one of ways described above cases
	- invoke all type of applications (*Note3)
	- click "Enable Input Method" check box on iiim-properties
	  "General" tab to clear ckeck (off) and click "Apply"
	- type Ctrl+space on invoed applicatons
	- close iiim-properties
	- invoke iiim-properties
	- click "Enable Input Method" check box to check (on) and
	  click "Apply"
	- type Ctrl+space on applications

[Expected  Result]
	- Ctrl+space does not activate Input Method when option is off
	- Ctrl+space activate Input Method when option is on

-------------------- Case 5 ------------------------------------------------
[Objective]
	Test Status preference  - 1

[Description]
	- invoke iiim-properties
	- invoke all type of applications (*Note3)
	- make sure "Placement" list shows "Desktop Default" in General
	  tab of iiim-properties
	- click "Display Input Method status" check box on
	  iiim-properteis "General" tab to clear check (off)
	  and click "Apply"
	- change focus to other applications and type Ctrl+space and
	  other keys repeatedly
	- click "Display Input Method status" check box to check it (on)
	- type Ctrl+space and keys on applications

[Expected  Result]
	- Status is not displayed when option is off
	- Status is displayed when option is on
	  (gnome-panel on JDS and attached frame window on CDE)

-------------------- Case 6 ------------------------------------------------
[Objective]
	Test Status preference - 2

[Description]
	- invoke iiim-properties and all type of applications (*Note3)
	- select "Attach Window Frame" in "Placement" dropdown list
	  and click "OK".
	- change focus to other applications and type Ctrl+space and
	  other keys repeatedly
	- select "Desktop Default" in "Plamement" drowdown list
	  and click "Apply"
	- change focus to other applications and type Ctrl+space and
	  other keys repeatedly

[Expected  Result]
	- status is displayed at small window which is attached
	  when "Placement" is "Attached Window Frame"
	- statis is displayed at gnome-panel (on JDS) or
	  frame attached window (on CDE) when "Desktop Default"

-------------------- Case 7 ------------------------------------------------
[Objective]
	Test Language switching preference  - 1
	* This test is UTF-8 locale only

[Description]
	- logout and login
	- invoke iiim-properties and all type of applications (*Note3)
	- make sure "The language is applied to all applications" check box
	  is checked (on) (if it's off, then click it and click "Apply")
	- click one of applications
	- left mouse click on 'Input Method switcher' (JDS) or
	  motif or java application's attached frame status window (CDE)
	  (language list is brought up)
	- select language which is not current locale's one
	- back to prior focsed application and type keys
	- change focus to other application and type Ctrl+space and keys

[Expected  Result]
	- switching language is successfully
	- the input language of all of applications will be changed
	  to swiched language

-------------------- Case 8 ------------------------------------------------
[Objective]
	Test Language switching preference  - 2
	* This test is UTF-8 locale only
	
[Description]
	- logout and login
	- invoke iiim-properties and all type of applications (*Note3)
	- click "The language is applied to all applications" to
	  clear check (off) and click "Apply"
	- click one of applications
	- left mouse click on 'Input Method switcher' (JDS) or
	  motif or java application's attached frame status window (CDE)
	- select language which is not current locale's one
	- back to prior focsed application and type keys
	- change focus to other application and type Ctrl+space and keys

[Expected  Result]
	- switching language is succsessfully
	- switching language is only applied to the application which
	  had focus before language switching (other application's
	  input language remains login locale's language)

-------------------- Case 9 ------------------------------------------------
[Objective]
	Test Language switching preference - 3
	* This test is UTF-8 locale only

[Description]
	- logout and login
	- make sure "Input Method is activated" check box is checked (on)
	  (if not, then click it and click "Apply")
	- click one of applications
	- left mouse click on 'Input Method switcher' (JDS) or
	  motif or java application's attached frame status window (CDE)
	  (language list is brought up)
	- select language which is not current locale's one
	- back to prior focued application

[Expected  Result]
	- application's Input Method status is on

-------------------- Case 10 ------------------------------------------------
[Objective]
	Test Language switching preference - 4
	* This test is UTF-8 locale only

[Description]
	- logout and login
	- invoke iiim-properties and all type of applications (*Note3)
	- click "Input Method is activated" to clear check (off)
	  and click "Apply"
	- click one of applications
	- left mouse click on 'Input Method switcher' (JDS) or
	  motif or java application's attached frame status window (CDE)
	- select language which is not current locale's one
	- back to prior focsed application and type keys
	- type Ctrl+space on the application
	- switch language with above method
	- back to the application

[Expected  Result]
	- Input Method status is not changed after switching language
	  (if status is off, then switched language is also off, and
	   if it's on, then switched language is also on)

-------------------- Case 11 ------------------------------------------------
[Objective]
	Test Language/Script selection - 1
	* This test is UTF-8 locale only

[Description]
	- invoke iiim-properties and all type of applications (*Note3)
	- click "Languages / Scripts' tab on iiim-properties
	- click "Bengali" in left upper list 
	- click "Add" button at upper button group
	- click "Hebrew" in right upper list
	- clck "Remove" button at upper button group
	- click "Apply"
	- left mouse click on 'Input Method switcher' (JDS) or
	  motif or java application's attached frame status window (CDE)

[Expected  Result]
	- will see "Bengali" in the language selection popup menu
	- will not see "Hebrew" in the language selection popup menu

-------------------- Case 12 ------------------------------------------------
[Objective]
	Test Language/Script selection - 2
	* This test is UTF-8 locale only

[Description]
	- invoke iiim-properties and all type of applications (*Note3)
	- click "Languages / Scripts' tab on iiim-properties
	- click "Indic" in right upper list
	- click "unitle" in right lower list
	- click "Remove" button in lower button gruop
	- click "Apply"
	- left mouse click on 'Input Method switcher' (JDS) or
	  motif or java application's attached frame status window (CDE)

[Expected  Result]
	- "Indic" entry in language selection popup menu does not
	  have submenu (before executing "Remove"  'unitle", "Indic"
	  entry had submenu which shows 'indicle' and 'unitle')

-------------------- Case 13 ------------------------------------------------
[Objective]
	Test Trigger key to activate/deactivate customization - 1

[Description]
	- invoke iiim-properties and all type of applications (*Note3)
	- click "Trigger Keys" tab on iiim-properties
	- click "Add..." button (Hotkey Configuration dialog will be poped up)
	- type a key which should be trigger key (ex: Alt+1) and cick "Add"
	- click "Apply"
	- change focus to applications and type Alt+1

[Expected  Result]
	- newly specified key will work as Input Method
	  activate/deactivate hotkey
	  # not all of keys can work as trigger keys like 'Esc',
	  # 'F1' etc... This is known limitation, so if some keys
	  # work as trigger keys with this test, then this case
	  # can be Pass status.

-------------------- Case 14 ------------------------------------------------
[Objective]
	Test Trigger key to activate/deactivate customization - 2

[Description]
	- invoke iiim-properties and all type of applications (*Note3)
	- click "Trigger Keys" tab on iiim-properties
	- click "Alt+1" (newly added key in the previous test case)
	  in the list
	- click "Remove" button and click "Apply"
	- change focus to applications and type Alt+1

[Expected  Result]
	- "Alt+1" does not work as trigger key 

-------------------- Case 15 ------------------------------------------------
[Objective]
	Test Trigger key to activate/deactivate customization - 3

[Description]
	- invoke iiim-properties and all type of applications (*Note3)
	- click "Trigger Keys" tab on iiim-properties
	- click "Add..." button (Hotkey Configuration dialog will be poped up)
	- type "Shift+Ctrl+space" and click "Add"

[Expected  Result]
	- Error dialog which says that that key already registered as
	  other hotkeys

-------------------- Case 16 ------------------------------------------------
[Objective]
	Test Enable Language/Script choice window option
	* This test is UTF-8 locale only

[Description]
	- invoke iiim-properties and all type of applications (*Note3)
	- click "Misc" tab on iiim-properties
	- make sure "Enable Language/Script choice window by Hotkey" check box
	  is checked (on)
	- type "Shift+Ctrl+space' on gtk application
	- type "Shift+Ctrl+space' again
	- click "Enable Language/Script choice window by Hotkey" check box
	  to clear check (off)
	- type "Shift+Ctrl+space" on gtk application  

[Expected  Result]
	- LANG SWITCH menu will be popped up when check box is checked
	- LANG SWITCH menu will no be popped up when cleck box is not checked
	# Known issue here is the language list is not alligned with
	# "Languages / Scripts" language list, but has all of installed
	# language engines

-------------------- Case 17 ------------------------------------------------
[Objective]
	Test Enable Cycle(reverse) Languages/Scripts by Hotkey
	* This test is UTF-8 locale only

[Description]
	- invoke iiim-properties and all type of applications (*Note3)
	- click "Misc" tab on iiim-properties
	- make sure "Enable Cycle Language/Script by Hotkey" check box
	  is checked (on)
	- type "Shift+Ctrl+>' on gtk application
	- type some keys
	- type "Shift+Ctrl+<' on that application
	- type some keys
	- click "Enable language/script choice window by Hotkey" check box
	  to clear check (off)
	- type "Shift+Ctrl+space" on gtk application  
	- type some keys

[Expected  Result]
	- input language is changed with hotkey when check box is checked
	- input language is not changed with hotkey when check box is
	  not checked
	# Known issue here is the language list is not alligned with
	# "Languages / Scripts" language list, but has all of installed
	# language engines

-------------------- Case 18 ------------------------------------------------
[Objective]
	Test Hotkey for Language/Script choice window costomization
	* This test is UTF-8 locale only

[Description]
	- invoke iiim-properties and all type of applications (*Note3)
	- click "Misc" tab on iiim-properties
	- click top "Add..." button (Hotkey Configuration dialog
	  will be poped up)
	- type a key which should be hotkey (ex: Alt+2) and cick "Add"
	- make sure "Enable language/script choice window by Hotkey"
	  check box is checked
	- click "Apply"
	- change focus to applications and type "Alt+2"
	- type "Alt+2" again

[Expected  Result]
	- LANG SWITCH menu will be popped up with "Alt+2" and close
	  with same key

-------------------- Case 19 ------------------------------------------------
[Objective]
	Test Hotkey for cycle Language/Script customization - 1
	* This test is UTF-8 locale only

[Description]
	- invoke iiim-properties and all type of applications (*Note3)
	- click "Misc" tab on iiim-properties
	- click middle "Add..." button (Hotkey Configuration dialog will
          be poped up)
	- type a key which should be hotkey (ex: Alt+3) and cick "Add"
	- make sure "Enable Cycle Languages/Scripts by Hotkey" check box
	  is checked
	- click "Apply"
	- change focus to applications and type "Alt+3" and type some keys

[Expected  Result]
	- language is switched with "Alt+3"

-------------------- Case 20 ------------------------------------------------
[Objective]
	Test Hotkey for cycle Language/Script customization - 2
	* This test is UTF-8 locale only

[Description]
	- invoke iiim-properties and all type of applications (*Note3)
	- click "Misc" tab on iiim-properties
	- click bottom "Add..." button (Hotkey Configuration dialog will
          be poped up)
	- type a key which should be hotkey (ex: Alt+4) and cick "Add"
	- make sure "Enable Cycle Languages/Scripts by Hotkey" check box
	  is checked
	- click "Apply"
	- change focus to applications and type "Alt+4" and type some keys

[Expected  Result]
	- language is switched with "Alt+4"

-------------------- Case 21 ------------------------------------------------
[Objective]
	Test help feature - 1

[Description]
	- invoke iiim-properties
	- click "Help" button

[Expected  Result]
	- help window is brought up and content is showed correctly

-------------------- Case 22 ------------------------------------------------
[Objective]
	Test help feature - 2

[Description]
	- invoke iiim-properties
	- click "Trigger Keys" tab
	- click "Add..." button
	- click "Help" button on the "Hotkye Configuration" dialog

[Expected  Result]
	- help window is brought up and "Hotkey Condfiguration" dialog
	  help part is shown correctly

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