#=============================================================================================
# @TITLE			Create parallel medium --WITH NEW LOCATION NECESSARY--
#
# @NUMBER			DBM3_BackupP_004b_CreateParallelMedium_compNL
#
# @DESCRIPTION		Checking the window to enter parallel medium.
# 					Create parallel medium. 
#					(with reduced backupmedia size only 900KB, 
#					so that a new location will be nacessary in creation process)
#
#=============================================================================================
static WizardOpen = 1;
static unit_array [] = {"KB","MB","GB","Pages"};
static unit_array_ok = 1;
Testname = getvar("testname");
#=============================================================================================
# @STEP 1			Checking window and clicking 'New Parallel Medium'.
#=============================================================================================
if (win_exists("Database Manager Backup Wizard",0) == 0) {
	
	tl_step("Database Manager Backup Wizard - Window Check", "0", "Window still open - TN: " & Testname);
	
	set_window ("Database Manager Backup Wizard", 1);
	toolbar_button_press ("msvb_lib_toolbar", "New Parallel Medium");	

	
#=============================================================================================
# @STEP 8			Entering backup medium name and other data.
#=============================================================================================

	set_window ("Medium Properties", 3);
	edit_set ("txtName", "TestBackupP_comNL");	
	
	tbl_set_selected_cell ( "flxGrid","#1","#2" );
	edit_set ("txtSingle", database & "_COM_NL_01");
	tbl_set_selected_cell ( "flxGrid","#2","#2" );
	edit_set ("txtSingle", database & "_COM_NL_02");
	
	
	#set the size for the 2 standard mediums
	#the size must have a fix value so that a 3rd medium is created  !!
	#because this is the test part WITH NEW LOCATION !!  
	#so if the datasize of the DB changes these values have to be adjusted
	medium_1_size = 1300;
	medium_2_size = 1300;
	if (match (database, "TT730") != 0) {
		medium_1_size = 1000;
		medium_2_size = 1000;
	}
	
	tab_select_item ("tabPages", "&Extended");

	list_select_item ("cmbUnit", "KB");
	set_window ("Medium Properties", 4);
	tbl_set_selected_cell ( "flxGrid","#1","#1" );
	edit_set ("txtSingle", medium_1_size);
	tbl_set_selected_cell ( "flxGrid","#2","#1" );
	edit_set ("txtSingle", medium_2_size);
	#enable overwrite
	button_set ("ThunderRT6CheckBox_0", ON);

#=============================================================================================
# @STEP 9			Press OK and Next.
#=============================================================================================	
	
	set_window ("Medium Properties", 3);
	button_press("OK");
	
	set_window ("Database Manager Backup Wizard", 2);
	button_press("Next >");
	

} else {
	
	tl_step("Database Manager Backup Wizard - Window Check", "1", "Window not open - TN: " & Testname);
	WizardOpen = 0;
}
