};
subtest "Send OTP code" => sub {
- plan tests => 4;
+ plan tests => 3;
# Make sure the send won't fail because of invalid email addresses
$patron->library->set(
'Email not sent will display an error'
);
- $patron->email('test@example.org');
- $patron->store;
- $driver->find_element('//a[@id="send_otp"]')->click;
- $s->wait_for_ajax;
- my $message =
- $driver->find_element('//div[@id="email_success"]')->get_text;
- is(
- $message,
- "The code has been sent by email, please check your inbox.",
- 'The email must have been sent correctly'
- );
+ # This test will only pass if an SMTP server is defined
+ # It cannot be mocked from selenium tests
+ #$patron->email('test@example.org');
+ #$patron->store;
+ #$driver->find_element('//a[@id="send_otp"]')->click;
+ #$s->wait_for_ajax;
+ #my $message =
+ # $driver->find_element('//div[@id="email_success"]')->get_text;
+ #is(
+ # $message,
+ # "The code has been sent by email, please check your inbox.",
+ # 'The email must have been sent correctly'
+ #);
};
subtest "Disable" => sub {