View | Details | Raw Unified | Return to bug 28998
Collapse All | Expand All

(-)a/t/db_dependent/selenium/authentication_2fa.t (-4 / +2 lines)
Lines 21-27 use Test::More tests => 2; Link Here
21
use C4::Context;
21
use C4::Context;
22
use Koha::AuthUtils;
22
use Koha::AuthUtils;
23
use Koha::Auth::TwoFactorAuth;
23
use Koha::Auth::TwoFactorAuth;
24
use Koha::Encryption;
25
use t::lib::Mocks;
24
use t::lib::Mocks;
26
use t::lib::Selenium;
25
use t::lib::Selenium;
27
use t::lib::TestBuilder;
26
use t::lib::TestBuilder;
Lines 81-87 SKIP: { Link Here
81
        $s->submit_form;
80
        $s->submit_form;
82
        is( $driver->find_element('//div[@class="two-factor-status"]')->get_text(), 'Status: Enabled', '2FA is enabled' );
81
        is( $driver->find_element('//div[@class="two-factor-status"]')->get_text(), 'Status: Enabled', '2FA is enabled' );
83
        $patron = $patron->get_from_storage;
82
        $patron = $patron->get_from_storage;
84
        is( Koha::Encryption->new->decrypt_hex($patron->secret), $secret32, 'encrypted secret is set in DB' );
83
        is( $patron->decoded_secret, $secret32, 'encrypted secret is set in DB' );
85
84
86
    };
85
    };
87
86
Lines 90-96 SKIP: { Link Here
90
89
91
        my $mainpage = $s->base_url . q|mainpage.pl|;
90
        my $mainpage = $s->base_url . q|mainpage.pl|;
92
91
93
        my $secret32 = Koha::Encryption->new->decrypt_hex($patron->secret);
92
        my $secret32 = $patron->decoded_secret;
94
        { # ok first try
93
        { # ok first try
95
            $driver->get($mainpage . q|?logout.x=1|);
94
            $driver->get($mainpage . q|?logout.x=1|);
96
            $driver->get($s->base_url . q|circ/circulation.pl?borrowernumber=|.$patron->borrowernumber);
95
            $driver->get($s->base_url . q|circ/circulation.pl?borrowernumber=|.$patron->borrowernumber);
97
- 

Return to bug 28998