################################################################################
# LIB: frm_flight_lib
################################################################################
# $Revision: 1.1.1.1 $
# $Author: drajovic $
# $Date: 2002/11/27 16:05:08 $
# $Source: d:/Archive/CVS_QS/EMOS/EMOS_FRM_EXAMPLES/FlightDemo/Scripts/LIB/FRM/FRM_flight_lib/script,v $
# $NoKeywords: $
################################################################################
#/***
#* Librbrary containing the so called "block functions" - functions that are
#* responsible for processing individual test blocks. This is the hart of
#* EMOS Framework approach. Note the simplicity of these functions. If you
#* manage to keep your functions simple (no ifs, loops, direct calls to
#* WinRunner functions), then you are on the best way to have a very flexible
#* test system.
#*/

#/**
#* @see <a href="../../../images/AUT/FRM_FlightSchedule.jpg">GUI</a>
#* @see <a href="../../../images/AUT/FRM_FlightSchedule_block.jpg">Excel</a>
#*/
public function FRM_FlightSchedule ( in table, in test, in idx, inout mode )
{
	auto rc;
	rc = FRM_init_block( table, test, idx, mode );
	if ( rc != E_OK )
		return rc;
	rc+=set_window( "FlightSchedule", 5 );
	rc+=FRM_edit_set( table, test, "DateOfFlight" );
	rc+=FRM_list_select_item( table, test, "Fly From:" );
	rc+=FRM_list_select_item( table, test, "Fly To:" );
	rc+=FRM_button_press( table, test, "FLIGHT" );
	return rc;
}

#/**
#* @see <a href="../../../images/AUT/FRM_OrderInformation.jpg">GUI</a>
#* @see <a href="../../../images/AUT/FRM_OrderInformation_block.jpg">Excel</a>
#*/
public function FRM_OrderInformation ( in table, in test, in idx, inout mode )
{
	auto rc;
	rc = FRM_init_block( table, test, idx, mode );
	if ( rc != E_OK )
		return rc;
	rc+=set_window( "OrderInformation", 5 );
	rc+=FRM_edit_set( table, test, "Name:" );
	rc+=FRM_edit_set( table, test, "Departure Time:" );
	rc+=FRM_edit_set( table, test, "Arrival Time:" );
	rc+=FRM_edit_set( table, test, "Order No:" );
	rc+=FRM_edit_set( table, test, "Flight No:" );
	rc+=FRM_edit_set( table, test, "Airline:" );
	rc+=FRM_button_set( table, test, "First" );
	rc+=FRM_button_set( table, test, "Business" );
	rc+=FRM_button_set( table, test, "Economy" );
	rc+=FRM_edit_set( table, test, "Tickets:" );
	rc+=FRM_edit_set( table, test, "Price:" );
	rc+=FRM_edit_set( table, test, "Total:" );
	return rc;
}

#/**
#* @see <a href="../../../images/AUT/FRM_OrderAction.jpg">GUI</a>
#* @see <a href="../../../images/AUT/FRM_OrderAction_block.jpg">Excel</a>
#*/
public function FRM_OrderAction ( in table, in test, in idx, inout mode )
{
	auto rc;
	rc = FRM_init_block( table, test, idx, mode );
	if ( rc != E_OK )
		return rc;
	rc+=set_window( "OrderAction", 5 );
	rc+=FRM_button_press( table, test, "Insert Order" );
	rc+=FRM_button_press( table, test, "Update Order" );
	rc+=FRM_button_press( table, test, "Delete Order" );
	return rc;
}

#/**
#* @see <a href="../../../images/AUT/FRM_FlightsTable.jpg">GUI</a>
#* @see <a href="../../../images/AUT/FRM_FlightsTable_block.jpg">Excel</a>
#*/
public function FRM_FlightsTable ( in table, in test, in idx, inout mode )
{
	auto rc;
	rc = FRM_init_block( table, test, idx, mode );
	if ( rc != E_OK )
		return rc;
	rc+=set_window( "FlightsTable", 5 );
	rc+=FRM_list_select_item( table, test, "Flight" );
	rc+=FRM_button_press( table, test, "OK" );
	rc+=FRM_button_press( table, test, "Cancel" );
	return rc;
}

#/**
#* @see <a href="../../../images/AUT/FRM_OpenOrder.jpg">GUI</a>
#* @see <a href="../../../images/AUT/FRM_OpenOrder_block.jpg">Excel</a>
#*/
public function FRM_Open_Order ( in table, in test, in idx, inout mode )
{
	auto rc;
	rc = FRM_init_block( table, test, idx, mode );
	if ( rc != E_OK )
		return rc;
	rc+=set_window( "Open Order", 5 );
	rc+=FRM_button_set( table, test, "cbo_Customer Name" );
	rc+=FRM_edit_set( table, test, "Customer Name" );
	rc+=FRM_button_set( table, test, "cbo_Flight Date" );
	rc+=FRM_edit_set( table, test, "Flight Date" );
	rc+=FRM_button_set( table, test, "cbo_Order No." );
	rc+=FRM_edit_set( table, test, "OrderNo." );
	rc+=FRM_button_press( table, test, "OK" );
	rc+=FRM_button_press( table, test, "Cancel" );
	return rc;
}
