"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.expectTextWithRetry = void 0;
const expectLocatorWithRetry_1 = require("./expectLocatorWithRetry");
const expectTextWithRetry = async (page, text, options) => {
    const { shouldBeVisible = true, totalTimeout = 60000, visibilityTimeout = 10000, maxRetries = 3, } = options || {};
    const item = page.getByText(text).last();
    await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(page, item, {
        shouldBeVisible,
        totalTimeout,
        visibilityTimeout,
        maxRetries,
        preAction: options?.preAction,
        postAction: options?.postAction,
    });
};
exports.expectTextWithRetry = expectTextWithRetry;
