import React from 'react';
import { render, screen } from '@testing-library/react';
import { SimpleMatchRules } from './SimpleMatchRules';
describe('SimpleMatchRules tests', function () {
    it('should render negative rule correctly', function () {
        var matchRules = [
            { uri: 'uri1', label: 'label1' },
            { uri: 'uri2', label: 'label2', negativeRule: {} }
        ];
        render(React.createElement(SimpleMatchRules, { matchRules: matchRules }));
        var ruleItems = screen.getAllByText(/^•+/);
        expect(ruleItems).toHaveLength(2);
        expect(ruleItems[0]).toHaveTextContent(matchRules[0].label);
        expect(ruleItems[0].querySelector('svg')).not.toBeInTheDocument();
        expect(ruleItems[1]).toHaveTextContent(matchRules[1].label);
        expect(ruleItems[1].querySelector('svg')).toBeInTheDocument();
    });
});
