23 lines
697 B
TypeScript
23 lines
697 B
TypeScript
import { shallow } from "enzyme";
|
|
import React from "react";
|
|
import { IProductDetail } from "../../shared/enumerations/Product";
|
|
import CommissionRatesTableRow from "./CommissionRatesTableRow";
|
|
|
|
describe("A row in the commission rates table", () => {
|
|
it("Displays a row", () => {
|
|
const props = {
|
|
product: { title: "ATMCard" } as IProductDetail,
|
|
roles: [],
|
|
commissions: [],
|
|
onRateChange: () => {},
|
|
rowIndex: 1
|
|
};
|
|
|
|
const wrapper = shallow(<CommissionRatesTableRow {...props} />);
|
|
|
|
const tableRow = wrapper.find('[data-test="commission-rate-row"]');
|
|
|
|
expect(tableRow.length).toBe(1);
|
|
});
|
|
});
|