fix: Even disabled button tooltip should show
-- Remove disable popover prop
This commit is contained in:
parent
48685a850d
commit
8820e4c7c9
|
|
@ -7,30 +7,51 @@ describe("Button Widget Functionality - Validate tooltip visibility", function()
|
|||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("Validate show tooltip on button hover", function() {
|
||||
it("Validate show/hide tooltip feature on normal button", function() {
|
||||
cy.openPropertyPane("buttonwidget");
|
||||
// add tooltip
|
||||
// Add tooltip
|
||||
cy.testJsontext(
|
||||
"tooltip",
|
||||
"Lorem Ipsum is simply dummy text of the printing and typesetting industry",
|
||||
);
|
||||
// Hover in
|
||||
cy.get(widgetsPage.buttonWidget).trigger("mouseover");
|
||||
// tooltip should show on hover
|
||||
// Check if a tooltip is displayed
|
||||
cy.get(".bp3-popover2-content").should(
|
||||
"have.text",
|
||||
"Lorem Ipsum is simply dummy text of the printing and typesetting industry",
|
||||
);
|
||||
// Hover out
|
||||
cy.get(widgetsPage.buttonWidget).trigger("mouseout");
|
||||
// Check if the tooltip is disappeared
|
||||
cy.get(".bp3-popover2-content")
|
||||
.contains(
|
||||
"Lorem Ipsum is simply dummy text of the printing and typesetting industry",
|
||||
)
|
||||
.should("not.exist");
|
||||
});
|
||||
|
||||
it("Validate tooltip hidden for disabled button", function() {
|
||||
// first disable button
|
||||
it("Validate show/hide tooltip feature for a disabled button", function() {
|
||||
// Disable the button
|
||||
cy.get(".t--property-control-disabled .bp3-switch").click({ force: true });
|
||||
cy.validateDisableWidget(
|
||||
widgetsPage.buttonWidget,
|
||||
commonlocators.disabledField,
|
||||
);
|
||||
// hover on button and check tooltip should not show
|
||||
// Hover in
|
||||
cy.get(widgetsPage.buttonWidget).trigger("mouseover");
|
||||
cy.get(".bp3-popover2-content").should("not.exist");
|
||||
// Check if a tooltip is displayed
|
||||
cy.get(".bp3-popover2-content").should(
|
||||
"have.text",
|
||||
"Lorem Ipsum is simply dummy text of the printing and typesetting industry",
|
||||
);
|
||||
// Hover out
|
||||
cy.get(widgetsPage.buttonWidget).trigger("mouseout");
|
||||
// Check if the tooltip is disappeared
|
||||
cy.get(".bp3-popover2-content")
|
||||
.contains(
|
||||
"Lorem Ipsum is simply dummy text of the printing and typesetting industry",
|
||||
)
|
||||
.should("not.exist");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -469,7 +469,6 @@ function ButtonComponent(props: ButtonComponentProps & RecaptchaProps) {
|
|||
<Popover2
|
||||
autoFocus={false}
|
||||
content={<Interweave content={props.tooltip} />}
|
||||
disabled={props.isDisabled}
|
||||
hoverOpenDelay={200}
|
||||
interactionKind="hover"
|
||||
portalClassName="btnTooltipContainer"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user