import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
import "react";
import * as __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__ from "@tachybase/test/client";
import * as __WEBPACK_EXTERNAL_MODULE__demos_demo1_mjs__ from "../demos/demo1.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__demos_demo2_mjs__ from "../demos/demo2.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__demos_demo3_mjs__ from "../demos/demo3.mjs";
describe('Radio', ()=>{
    it('select radio', ()=>{
        const { container } = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.render)(/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__demos_demo1_mjs__["default"], {}));
        const [radio1, radio2] = Array.from(container.querySelectorAll('.ant-radio-input'));
        expect(radio2).toBeDisabled();
        __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.fireEvent.click(radio1);
        expect(radio1).toBeChecked();
        expect(radio2).toBeChecked();
        expect(radio2).toBeDisabled();
    });
    it('select radio group', ()=>{
        var _container_querySelector, _container_querySelector1;
        const { container } = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.render)(/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__demos_demo2_mjs__["default"], {}));
        const 男 = __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.screen.getByLabelText('男');
        const 女 = __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.screen.getByLabelText('女');
        __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.fireEvent.click(男);
        expect(男).toBeChecked();
        expect(null === (_container_querySelector = container.querySelector('.ant-tag')) || void 0 === _container_querySelector ? void 0 : _container_querySelector.innerHTML).toBe('男');
        __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.fireEvent.click(女);
        expect(女).toBeChecked();
        expect(男).not.toBeChecked();
        expect(null === (_container_querySelector1 = container.querySelector('.ant-tag')) || void 0 === _container_querySelector1 ? void 0 : _container_querySelector1.innerHTML).toBe('女');
    });
    it('select radio group with color', ()=>{
        var _container_querySelector, _container_querySelector1;
        const { container } = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.render)(/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__demos_demo3_mjs__["default"], {}));
        const 男 = __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.screen.getByLabelText('男');
        const 女 = __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.screen.getByLabelText('女');
        __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.fireEvent.click(男);
        expect(男).toBeChecked();
        expect(null === (_container_querySelector = container.querySelector('.ant-tag-blue')) || void 0 === _container_querySelector ? void 0 : _container_querySelector.innerHTML).toBe('男');
        __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.fireEvent.click(女);
        expect(女).toBeChecked();
        expect(男).not.toBeChecked();
        expect(null === (_container_querySelector1 = container.querySelector('.ant-tag-red')) || void 0 === _container_querySelector1 ? void 0 : _container_querySelector1.innerHTML).toBe('女');
    });
});
