./basic.case
open /billing/callc/logout
type login_username admin
type login_psw admin1
clickAndWait commit
verifyTextPresent Succesfully logged in
open /billing/services/list
verifyTextPresent Selfcost
verifyText id=self_price_1 0.0000
open /billing/services/edit/1
verifyTextPresent Self Cost (USD):
verifyValue id=service[selfcost_price] 0.0
type id=service[selfcost_price] 2
clickAndWait name=commit
waitForTextPresent Service was successfully updated
verifyText id=self_price_1 2.0000
open /billing/services/new
type id=service_name Service one time fee
click id=service_servicetype_one_time_fee
waitForValue id=service[price] 0.0
type id=service[price] 5.0
type id=service[selfcost_price] 110.0
clickAndWait name=commit
waitForTextPresent Service was successfully created
verifyText id=self_price_2 110.0000
open /billing/services/new
type id=service_name Service periodic fee
click id=service_servicetype_periodic_fee
verifyElementPresent name=service[periodtype]
type id=service[price] 3.0
type id=service[selfcost_price] #@$%^
clickAndWait name=commit
waitForTextPresent Service was successfully created
verifyText id=self_price_3 0.0000
open /billing/services/new
type id=service_name Service flat-rate
click id=service_servicetype_flat_rate
waitForValue id=service[price] 0.0
type id=service[price] 5.0
type id=service[selfcost_price] sgdfvh
type id=service_quantity 3
clickAndWait name=commit
waitForTextPresent Service was successfully created
verifyText id=self_price_4 0.0000
open /billing/services/edit/2
type id=service[price] 45
type id=service[selfcost_price] 45
clickAndWait name=commit
verifyTextPresent Service was successfully updated
verifyText id=self_price_2 45.0000
open /billing/stats/profit
select id=date_from_year label=2011
select id=date_from_month label=October
select id=date_from_day label=1
select id=date_till_year label=2011
select id=date_till_month label=October
select id=date_till_day label=31
clickAndWait name=commit
waitForText id=number_calls_profit 0.0000
waitForText id=subscription_profit 8.0000
waitForText id=number_total_profit 8.0000
open /billing/services/subscription_new/3
select id=subscription_service_id label=Test_periodic_service, Price: 10.0
select id=activation_start_year label=2009
clickAndWait name=commit
open /billing/stats/profit
select id=date_from_year label=2011
select id=date_from_month label=October
select id=date_from_day label=1
select id=date_till_year label=2011
select id=date_till_month label=October
select id=date_till_day label=31
clickAndWait name=commit
waitForText id=number_calls_profit 0.0000
waitForText id=subscription_profit 16.0000