"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = __importDefault(require("react"));
var react_2 = require("@testing-library/react");
var TransitiveMatchRulesTooltip_1 = require("./TransitiveMatchRulesTooltip");
describe('TransitiveMatchRulesTooltip tests', function () {
    var rules = [
        { label: 'label1', matchRules: [{ uri: 'uri1', label: 'label11' }] },
        { label: 'label2', matchRules: [{ uri: 'uri2', label: 'label22' }] }
    ];
    it('should render all rules', function () {
        (0, react_2.render)(react_1.default.createElement(TransitiveMatchRulesTooltip_1.TransitiveMatchRulesTooltip, { transitiveMatchRules: rules }));
        var matchRules = react_2.screen.getAllByTestId('match-rule-wrapper');
        expect(matchRules).toHaveLength(rules.length);
        expect((0, react_2.within)(matchRules[0]).getByText('label1')).toBeInTheDocument();
        expect((0, react_2.within)(matchRules[0]).getByText('Match rules')).toBeInTheDocument();
        expect((0, react_2.within)(matchRules[0]).getByText('- label11')).toBeInTheDocument();
        expect((0, react_2.within)(matchRules[1]).getByText('label2')).toBeInTheDocument();
        expect((0, react_2.within)(matchRules[1]).getByText('Match rules')).toBeInTheDocument();
        expect((0, react_2.within)(matchRules[1]).getByText('- label22')).toBeInTheDocument();
    });
});
