+$sel->set_speed(100);
+
+if ($part{multidir}) {
+ # if the current bconsole.conf doesn't contain two sections, we
+ # create it
+ if (!get_resource("$conf/bconsole.conf", "Director", "bweb-dir")) {
+ copy("$conf/bconsole.conf", "$tmp/bconsole.conf.$$");
+ my $r = get_resource("$conf/bconsole.conf", "Director", ".+?");
+ open(FP, ">>$conf/bconsole.conf");
+ $r =~ s/Name = .+$/Name = bweb1-dir/m;
+ print FP $r;
+ $r =~ s/Name = .+$/Name = bweb2-dir/m;
+ print FP $r;
+ close(FP);
+ }
+ $sel->open_ok("/cgi-bin/bweb/bweb.pl");
+ $sel->click_ok("link=Configuration");
+ $sel->wait_for_page_to_load_ok("30000");
+ $sel->is_text_present_ok("Main Configuration");
+
+ # create subconf
+ $sel->click_ok("//button[\@name='action' and \@value='add_conf']");
+ $sel->wait_for_page_to_load_ok("30000");
+ $sel->is_text_present_ok("Unnamed");
+
+ $sel->type_ok("name", "MyBweb");
+ $sel->type_ok("new_dir", "bweb1-dir");
+
+ $sel->type_ok("stat_job_table", "JobHisto");
+ $sel->click_ok("//button[\@name='action' and \@value='apply_conf']");
+ $sel->wait_for_page_to_load_ok("30000");
+ $sel->is_text_present_ok("MyBweb");
+ $sel->is_text_present_ok("bweb1-dir");
+
+ $sel->click_ok("link=Main");
+ $sel->wait_for_page_to_load_ok("30000");
+ $sel->is_text_present_ok("Directors");
+ $sel->click_ok("link=MyBweb");
+ $sel->wait_for_page_to_load_ok("30000");
+ $sel->is_text_present_ok("Informations on MyBweb");
+}