Skip to content

Commit

Permalink
elyra-ai#1635 add unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Veena S <[email protected]>
  • Loading branch information
veenas1 committed Apr 16, 2024
1 parent 6c4b220 commit f4d07ef
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -389,3 +389,21 @@ describe("radioset classnames appear correctly", () => {
expect(wrapper.find(".table-subpanel-radioset-control-class")).to.have.length(1);
});
});

describe("should use Carbon RadioButtonGroup", () => {
let wrapper;
beforeEach(() => {
const renderedObject = propertyUtils.flyoutEditorForm(radioParamDef);
wrapper = renderedObject.wrapper;
});

it("radioset should use Carbon RadioButtonGroup", () => {
const radioBoolean = (wrapper.find("div[data-id='properties-radioBooleanWithEnum']"));
const radioGroup = radioBoolean.find("fieldset.cds--radio-button-group");
expect(radioGroup).to.have.length(1);
// horizontal radioset should have carbon's cds--radio-button-group--label-right class
const radioGroupHorizontal = radioBoolean.find("fieldset.cds--radio-button-group--label-right");
expect(radioGroupHorizontal).to.have.length(1);
});

});

0 comments on commit f4d07ef

Please sign in to comment.