fix: unable to change button color on table widget (#8521)

* fix: unable to change button color on table widget

* Adds test for Table button color validation

* removes commented out code
This commit is contained in:
Aswath K 2021-10-14 16:25:03 +05:30 committed by GitHub
parent da49fabfdf
commit ce4b984e27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

View File

@ -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");
});

View File

@ -47,6 +47,7 @@ export const getCellProperties = (
columnProperties.cellBackground,
rowIndex,
),
buttonColor: getPropertyValue(columnProperties.buttonColor, rowIndex),
buttonLabelColor: getPropertyValue(
columnProperties.buttonLabelColor,
rowIndex,