<commit_before>import { and, isPresent } from '@serenity-js/assertions';
import { Expectation } from '@serenity-js/core';

import { PageElement } from '../screenplay';
import { ElementExpectation } from './ElementExpectation';
import { isVisible } from './isVisible';

/**
 * @desc
 *  Expectation that the element is enabled.
 *
 * @returns {@serenity-js/core/lib/screenplay/questions~Expectation<boolean, Element<'async'>>}
 *
 * @see https://webdriver.io/docs/api/element/isEnabled/
 * @see {@link @serenity-js/assertions~Ensure}
 * @see {@link @serenity-js/core/lib/screenplay/questions~Check}
 * @see {@link @serenity-js/core/lib/screenplay/interactions~Wait}
 */
export function isEnabled(): Expectation<PageElement> {
    return Expectation.to<boolean, PageElement>('become enabled').soThatActual(and(
        isPresent(),
        ElementExpectation.forElementTo('become enabled', actual => actual.isEnabled())
    ));
}<commit_msg>style(web): applied eslint suggestion<commit_after>import { and, isPresent } from '@serenity-js/assertions';
import { Expectation } from '@serenity-js/core';

import { PageElement } from '../screenplay';
import { ElementExpectation } from './ElementExpectation';

/**
 * @desc
 *  Expectation that the element is enabled.
 *
 * @returns {@serenity-js/core/lib/screenplay/questions~Expectation<boolean, Element<'async'>>}
 *
 * @see https://webdriver.io/docs/api/element/isEnabled/
 * @see {@link @serenity-js/assertions~Ensure}
 * @see {@link @serenity-js/core/lib/screenplay/questions~Check}
 * @see {@link @serenity-js/core/lib/screenplay/interactions~Wait}
 */
export function isEnabled(): Expectation<PageElement> {
    return Expectation.to<boolean, PageElement>('become enabled').soThatActual(and(
        isPresent(),
        ElementExpectation.forElementTo('become enabled', actual => actual.isEnabled())
    ));
}
{'fraction_non_alphanumeric': 0.15905427189682966, 'fraction_numerical': 0.0, 'mean_word_length': 4.929936305732484, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 2, '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': '3213976', 'n_tokens_mistral': 581, 'n_tokens_neox': 579, 'n_words': 109}