Skip to content

Commit

Permalink
Item14237: Tests are incompatible with v3
Browse files Browse the repository at this point in the history
  • Loading branch information
vrurg committed May 12, 2018
1 parent 83f7976 commit 02d8a12
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
11 changes: 9 additions & 2 deletions UnitTestContrib/test/unit/ConfigureSaveTests.pm
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,17 @@ use Foswiki::Configure::Wizards::Save;
use Foswiki::Configure::Reporter;
use Foswiki::Sandbox;

use Moo;
use namespace::clean;
use Foswiki::Class;
extends qw( ConfigureTestCase );

around set_up => sub {
my $orig = shift;
my $this = shift;
$Foswiki::ExtManager::extDisabled{'DBConfig'} =
'Interfering with ConfigureSaveTests';
$orig->( $this, @_ );
};

# TODO: this needs to test that backups are correctly made
sub test_changecfg {
my $this = shift;
Expand Down
6 changes: 6 additions & 0 deletions UnitTestContrib/test/unit/ConfigureTestCase.pm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ has wrote_lsc => (
);
has test_work_dir => ( is => 'rw', );

sub skip {
my $this = shift;
my ($test) = @_;
return "Not compatible with Foswiki v3";
}

# Set up the test fixture
around set_up => sub {
my $orig = shift;
Expand Down
5 changes: 4 additions & 1 deletion UnitTestContrib/test/unit/FoswikiSeleniumTestCase.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ use v5.14;

use Encode;
use Foswiki();
use Unit::Request();

#use Unit::Request();
use Unit::Response();
use Foswiki::UI::Register();
use Try::Tiny;
Expand Down Expand Up @@ -64,6 +65,8 @@ sub skip {
my $browsers = $Foswiki::cfg{UnitTestContrib}{SeleniumRc}{Browsers};
my $reason;

return "Broken on Foswiki v3";

if ( !( ref($browsers) eq 'HASH' && scalar( keys %{$browsers} ) ) ) {
$reason =
"No browsers configured in \$Foswiki::cfg{UnitTestContrib}{SeleniumRc}{Browsers}";
Expand Down

0 comments on commit 02d8a12

Please sign in to comment.