<commit_before>define(function(require) {
    'use strict';

    require('jasmine-jquery');
    var $ = require('jquery');
    var UserResetPasswordView = require('orouser/js/app/views/user-reset-password-view');

    describe('User Reset Password View', function() {

        function createUserResetPasswordView() {
            return new UserResetPasswordView({
                el: '#form',
                passwordInputSelector: '.password-field'
            });
        }

        beforeEach(function() {
            var html = [
                '<form id="form">',
                    '<input class="password-field"/>',
                '</form>'
            ].join('');

            window.setFixtures(html);
        });

        it('_getPasswordInput - when selector is passed', function() {
            expect(createUserResetPasswordView()._getPasswordInput().hasClass('password-field')).toBeTruthy();
        });

        it('_getPasswordRequirements - when are set in backend', function() {
            $('.password-field').data({
                'suggest-rules': 'rule_1,rule_2,rule_3'
            });

            expect(createUserResetPasswordView()._getPasswordRequirements().length).toEqual(3);
        });

        it('_getPasswordRequirements - when are not set in backend', function() {
            expect(createUserResetPasswordView()._getPasswordRequirements().length).toEqual(0);
        });

        it('_getRequiredPasswordLength - when are set in backend', function() {
            $('.password-field').data({
                'suggest-length': 5
            });

            expect(createUserResetPasswordView()._getRequiredPasswordLength()).toEqual(5);
        });

        it('_getRequiredPasswordLength - when are not set in backend', function() {
            expect(createUserResetPasswordView()._getRequiredPasswordLength()).toEqual(1);
        });

        it('_generatePassword', function() {
            var passwordLength = 15;

            $('.password-field').data({
                'suggest-length': passwordLength,
                'suggest-rules': 'lower_case,upper_case,numbers'
            });

            expect(createUserResetPasswordView()._generatePassword().length).toEqual(passwordLength);
        });
    });
});
<commit_msg>BAP-16140: Remove inline scripts from twig files - WidgetManager - fixed eslint errors<commit_after>define(function(require) {
    'use strict';

    require('jasmine-jquery');
    var $ = require('jquery');
    var UserResetPasswordView = require('orouser/js/app/views/user-reset-password-view');

    describe('User Reset Password View', function() {

        function createUserResetPasswordView() {
            return new UserResetPasswordView({
                el: '#form',
                passwordInputSelector: '.password-field'
            });
        }

        beforeEach(function() {
            /* eslint-disable indent */
            var html = [
                '<form id="form">',
                    '<input class="password-field"/>',
                '</form>'
            ].join('');
            /* eslint-enable */

            window.setFixtures(html);
        });

        it('_getPasswordInput - when selector is passed', function() {
            expect(createUserResetPasswordView()._getPasswordInput().hasClass('password-field')).toBeTruthy();
        });

        it('_getPasswordRequirements - when are set in backend', function() {
            $('.password-field').data({
                'suggest-rules': 'rule_1,rule_2,rule_3'
            });

            expect(createUserResetPasswordView()._getPasswordRequirements().length).toEqual(3);
        });

        it('_getPasswordRequirements - when are not set in backend', function() {
            expect(createUserResetPasswordView()._getPasswordRequirements().length).toEqual(0);
        });

        it('_getRequiredPasswordLength - when are set in backend', function() {
            $('.password-field').data({
                'suggest-length': 5
            });

            expect(createUserResetPasswordView()._getRequiredPasswordLength()).toEqual(5);
        });

        it('_getRequiredPasswordLength - when are not set in backend', function() {
            expect(createUserResetPasswordView()._getRequiredPasswordLength()).toEqual(1);
        });

        it('_generatePassword', function() {
            var passwordLength = 15;

            $('.password-field').data({
                'suggest-length': passwordLength,
                'suggest-rules': 'lower_case,upper_case,numbers'
            });

            expect(createUserResetPasswordView()._generatePassword().length).toEqual(passwordLength);
        });
    });
});

{'fraction_non_alphanumeric': 0.1381957773512476, 'fraction_numerical': 0.0053316272126252935, 'mean_word_length': 2.1970006816632583, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3315966', 'n_tokens_mistral': 1199, 'n_tokens_neox': 1144, 'n_words': 195}