From 258684ec1f67ca6eea17482915a39d86b38ab8a8 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Mon, 12 Nov 2007 22:39:44 +0000 Subject: [PATCH] ebl Add first cut of media tests git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5924 91ce42f0-d328-0410-95d8-f526ca767f89 --- gui/bweb/script/regress.pl | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/gui/bweb/script/regress.pl b/gui/bweb/script/regress.pl index 6a1150c503..607fd1bb93 100755 --- a/gui/bweb/script/regress.pl +++ b/gui/bweb/script/regress.pl @@ -137,7 +137,7 @@ $cli = $1; $agent->get("$url?action=client_status;client=$cli"); ok($agent->success(), "submit"); $c=$agent->content; -like($c, qr/Terminated Jobs/, "client status"); +like($c, qr/Terminated Jobs/, "check for client status"); $agent->get("$url?action=job;client=$cli"); ok($agent->success(), "submit"); @@ -147,6 +147,7 @@ like($c, qr/'$cli'\).selected = true;/, "list jobs for this client"); ################################################################ # Test location basic functions ################################################################ + my $loc = "loc$$"; ok($agent->follow_link(text_regex=>qr/Location/), "Go to Location page"); ok($agent->form_number(2), "Find form"); @@ -162,6 +163,19 @@ $agent->click_button(value => 'location_add'); ok($agent->success(), "submit"); $c=$agent->content; like($c, qr/$loc/, "Check if location is ok"); +################################################################ +# Test media +################################################################ + +ok($agent->follow_link(text_regex=>qr/All Media/), "Go to All Media page"); +ok($agent->success(), "submit"); $c=$agent->content; +ok($c =~ m/chkbox.value = '(.+?)'/, "get first media"); +my $vol = $1; + +$agent->get("$url?media=$vol;action=update_media"); +ok($agent->success(), "submit"); $c=$agent->content; +like($c, qr/$vol/, "Check if volume is ok"); + ################################################################ # Test group basic functions ################################################################ @@ -172,7 +186,7 @@ like($c, qr/$cli/, "check client=$cli"); my $grp = "test$$"; ok($agent->follow_link(text_regex=>qr/Groups/), "Go to Groups page"); -$c=$agent->content; +ok($agent->success(), "submit"); $c=$agent->content; unlike($c, qr/error/i, "Check for group installation"); ok($agent->form_number(2), "Find form"); $agent->click_button(value => 'groups_add'); -- 2.39.5