Skip to content

Commit

Permalink
fix: unable to change button color on table widget (#8521)
Browse files Browse the repository at this point in the history
* fix: unable to change button color on table widget

* Adds test for Table button color validation

* removes commented out code
  • Loading branch information
aswathkk authored and mohanarpit committed Oct 14, 2021
1 parent de9a056 commit 0faf333
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,23 @@ describe("Table Widget property pane feature validation", function() {
expect(someText).to.equal("Successful tobias.funke@reqres.in");
});
});

it("Table Button color validation", function() {
cy.openPropertyPane("tablewidget");
// Open column details of "id".
cy.editColumn("id");
// Changing column data type to "Button"
cy.changeColumnType("Button");
const color = "rgb(255, 0, 0)";
cy.get(widgetsPage.buttonColor)
.click({ force: true })
.clear()
.type(color);
// Close Property pane
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.get(widgetsPage.tableBtn).should("have.css", "background-color", color);
});

it("Table widget triggeredRow property should be accessible", function() {
cy.get(commonlocators.TextInside).should("have.text", "Tobias Funke");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const getCellProperties = (
columnProperties.cellBackground,
rowIndex,
),
buttonColor: getPropertyValue(columnProperties.buttonColor, rowIndex),
buttonLabelColor: getPropertyValue(
columnProperties.buttonLabelColor,
rowIndex,
Expand Down

0 comments on commit 0faf333

Please sign in to comment.