TT#56376 selenium: cleanups when trying to create empty domain

controller_domain.t:
- domain now gets created before empty domain tests gets executed. saves
some code lines and some time

Change-Id: I0ffcfd41eddc59cf90d60fbefbe64be5cd8f72f7
changes/14/31914/1
Nico Schedel 6 years ago
parent 5375b1384b
commit 45998e940d

@ -17,10 +17,7 @@ my $domainstring = ("domain" . int(rand(100000)) . ".example.org");
my $run_ok = 0;
$c->login_ok();
diag('Go to domains page');
$d->find_element('//*[@id="main-nav"]//*[contains(text(),"Settings")]')->click();
$d->find_element("Domains", 'link_text')->click();
$c->create_domain($domainstring);
diag('Try to add a empty domain');
$d->find_element('Create Domain', 'link_text')->click();
@ -29,12 +26,8 @@ $d->find_element('//*[@id="save"]')->click();
diag('Check error messages');
ok($d->find_element_by_xpath('//form//div//span[contains(text(), "Reseller field is required")]'));
ok($d->find_element_by_xpath('//form//div//span[contains(text(), "SIP Domain field is required")]'));
diag("Continuing creating a legit domain");
$d->find_element('//*[@id="mod_close"]')->click();
$c->create_domain($domainstring);
diag("Check if entry exists and if the search works");
$d->fill_element('//*[@id="Domain_table_filter"]/label/input', 'xpath', 'thisshouldnotexist');
ok($d->find_element_by_css('#Domain_table tr > td.dataTables_empty', 'css'), 'Garbage text was not found');

Loading…
Cancel
Save