Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add internal text to switch component #3327

Merged
merged 15 commits into from
Feb 6, 2019
Prev Previous commit
Next Next commit
test
  • Loading branch information
Leah Anderson committed Jan 31, 2019
commit 52ce53e9e3e5f8b824c8a384a9cf67e2d9fbe0fc
9 changes: 8 additions & 1 deletion packages/core/test/controls/controlsTests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,14 @@ describe("Controls:", () => {
});
});

controlsTests(Switch, "checkbox", Classes.SWITCH);
controlsTests(Switch, "checkbox", Classes.SWITCH, () => {
describe("internal text", () => {
const switchWithText = mount(<Switch activeText="Active Text" inactiveText="Inactive Text" />);
it("renders internal text", () => {
giladgray marked this conversation as resolved.
Show resolved Hide resolved
assert.equal(switchWithText.find(`.${Classes.SWITCH}-active-text`).text(), "Active Text");
});
});
});

controlsTests(Radio, "radio", Classes.RADIO);

Expand Down