UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

35 lines (34 loc) 1.08 kB
import { screen as o } from "@testing-library/react"; import e from "@testing-library/user-event"; async function c(t, a = e) { const n = await o.findByRole("button", { name: "Add Column" }); if (await a.click(n), t != null) { const i = await o.findAllByLabelText("Name"); await a.type(i[i.length - 1], t); } } async function y(t, a, n = e) { if (a.columnName) { const i = (await o.findAllByLabelText("Name"))[t]; await n.clear(i), await n.type(i, a.columnName); } if (a.columnType) { const i = (await o.findAllByLabelText("Column Type"))[t]; await n.selectOptions(i, a.columnType); } if (a.maximumSize) { const i = (await o.findAllByLabelText("Maximum Size"))[t]; await n.clear(i), await n.type(i, String(a.maximumSize)); } } async function f(t, a, n = e, i) { await n.hover(t), await o.findByRole("tooltip", { name: a }, { timeout: i }), await n.unhover(t); } export { c as addColumnModelToForm, y as modifyColumnModelInForm, f as verifyTooltipText }; //# sourceMappingURL=TableColumnSchemaEditorTestUtils.js.map