Common.pm:
- create_customer() now requires a contact and billing profile
- will enable tests for invoices
controller_customer and controller_subscriber have been changed to use
create_customer() correctly
Change-Id: Icde5caf82205537f24dd2c6c6c1ee7476583e049
ok($d->find_element_by_xpath('//*[@id="Customer_table"]/tbody/tr[1]/td[contains(text(), "'.$customerid.'")]'),'Customer ID is correct');
ok($d->find_element_by_xpath('//*[@id="Customer_table"]/tbody/tr[1]/td[contains(text(), "default")]'),'Reseller is correct');
ok($d->wait_for_text('//*[@id="Customer_table"]/tbody/tr[1]/td[contains(text(), "default-customer")]','default-customer@default.invalid'),'Contact Email is correct');
ok($d->find_element_by_xpath('//*[@id="Customer_table"]/tbody/tr[1]/td[contains(text(), "Default Billing Profile")]'),'Billing Profile is correct');
ok($d->find_element_by_xpath('//*[@id="Customer_table"]/tbody/tr[1]/td[contains(text(), "' .$resellername.'")]'),'Reseller is correct');
ok($d->wait_for_text('//*[@id="Customer_table"]/tbody/tr[1]/td[4]',$contactmail),'Contact Email is correct');
ok($d->find_element_by_xpath('//*[@id="Customer_table"]/tbody/tr[1]/td[contains(text(), "' .$billingname.'")]'),'Billing Profile is correct');
diag("Open Details for our just created Customer");
ok($d->wait_for_text('//*[@id="collapse_contact"]//table//tr//td[contains(text(), "Email")]/../td[2]','default-customer@default.invalid'),"Email is correct");
ok($d->wait_for_text('//*[@id="collapse_contact"]//table//tr//td[contains(text(), "Email")]/../td[2]',$contactmail),"Email is correct");
ok($d->find_element_by_xpath('//*[@id="collapse_contact"]//table//tr//td[contains(text(), "Name")]/../td[contains(text(), "Alice")]'),"Name is correct");
ok($d->find_element_by_xpath('//*[@id="collapse_contact"]//table//tr//td[contains(text(), "Company")]/../td[contains(text(), "Sipwise")]'),"Company is correct");
ok($d->find_element_by_xpath('//*[@id="collapse_contact"]//table//tr//td[contains(text(), "Address")]/../td[text()[contains(.,"03141")]]'),"Postal code is correct");
$d->fill_element('//*[@id="description"]','xpath','This is a description. It describes things');
@ -88,7 +96,7 @@ sub ctr_subscriber {
diag('Check details');
ok($d->wait_for_text('//*[@id="subscriber_profile_sets_table"]/tbody/tr/td[3]',$setname),'Name is correct');
ok($d->wait_for_text('//*[@id="subscriber_profile_sets_table"]/tbody/tr/td[4]','This is a description. It describes things'),'Description is correct');
ok($d->find_element_by_xpath('//*[@id="subscriber_profile_sets_table"]//tr//td[contains(text(), "default")]'),'Reseller is correct');
ok($d->find_element_by_xpath('//*[@id="subscriber_profile_sets_table"]//tr//td[contains(text(), "' .$resellername.'")]'),'Reseller is correct');