fix: onboarding table widget is blank after adding binding (#8285)

This commit is contained in:
akash-codemonk 2021-10-08 13:22:08 +05:30 committed by GitHub
parent b02240cc34
commit 9f2c32b9de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 14 deletions

View File

@ -66,6 +66,11 @@ describe("Onboarding", function() {
.should("be.visible")
.click();
// Check if table is showing any data
cy.getTableDataSelector("0", "0").then((selector) => {
cy.get(selector).should("be.visible");
});
// wait for animation duration
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(1000);

View File

@ -2739,6 +2739,11 @@ Cypress.Commands.add("ExportVerify", (togglecss, name) => {
cy.togglebarDisable(togglecss);
});
Cypress.Commands.add("getTableDataSelector", (rowNum, colNum) => {
const selector = `.t--widget-tablewidget .tbody .td[data-rowindex=${rowNum}][data-colindex=${colNum}] div`;
return selector;
});
Cypress.Commands.add("readTabledataPublish", (rowNum, colNum) => {
// const selector = `.t--widget-tablewidget .e-gridcontent.e-lib.e-droppable td[index=${rowNum}][aria-colindex=${colNum}]`;
const selector = `.t--widget-tablewidget .tbody .td[data-rowindex=${rowNum}][data-colindex=${colNum}] div`;

View File

@ -175,8 +175,14 @@ function* listenForWidgetAdditions() {
widgetName: "Standup_Table",
tableData: [],
columnSizeMap: {
avatar: 20,
name: 30,
avatar: 80,
name: 120,
},
columnTypeMap: {
avatar: {
type: "image",
format: "",
},
},
migrated: false,
...getStandupTableDimensions(),
@ -334,18 +340,6 @@ function* listenForSuccessfulBinding() {
errors.length === 0;
if (bindSuccessful) {
yield put(
batchUpdateWidgetProperty(selectedWidget.widgetId, {
modify: {
columnTypeMap: {
avatar: {
type: "image",
format: "",
},
},
},
}),
);
AnalyticsUtil.logEvent("ONBOARDING_SUCCESSFUL_BINDING");
yield put(setCurrentStep(OnboardingStep.ADD_INPUT_WIDGET));