Skip to content

Commit

Permalink
Add dom_not_found helper to Test::PAUSE::Web
Browse files Browse the repository at this point in the history
  • Loading branch information
charsbar committed Apr 27, 2024
1 parent 4ed66e7 commit 1b968b2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions t/pause_2017/lib/Test/PAUSE/Web.pm
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,17 @@ sub text_unlike {
$self;
}

sub dom_not_found {
my ($self, $selector) = @_;
my $at = $self->dom->at($selector);
if ($at) {
fail "'$selector' is found";
} else {
pass "'$selector' is not found";
}
$self;
}

sub title_is_ok {
my ($self, $url) = @_;
return if $self->dom->at('p.error_message'); # ignore if error
Expand Down

0 comments on commit 1b968b2

Please sign in to comment.