Browse Source

fix(gui): keep parsed meta data in cache

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/4630/head
Pranav C 2 years ago
parent
commit
9d8bc1d81b
  1. 6
      packages/nocodb/src/lib/models/View.ts
  2. 4
      tests/playwright/pages/Dashboard/Grid/Column/LTAR/ChildList.ts

6
packages/nocodb/src/lib/models/View.ts

@ -852,8 +852,6 @@ export default class View implements ViewType {
'meta',
'uuid',
]);
// if meta data defined then stringify it
stringifyMetaProp(updateObj);
// get existing cache
const key = `${CacheScope.VIEW}:${viewId}`;
@ -870,6 +868,10 @@ export default class View implements ViewType {
// set cache
await NocoCache.set(key, o);
}
// if meta data defined then stringify it
stringifyMetaProp(updateObj);
// set meta
await ncMeta.metaUpdate(null, null, MetaTable.VIEWS, updateObj, viewId);
return this.get(viewId);

4
tests/playwright/pages/Dashboard/Grid/Column/LTAR/ChildList.ts

@ -20,7 +20,9 @@ export class ChildList extends BasePage {
// button: Link to 'City'
// icon: reload
await expect(this.get().locator(`.ant-modal-title`)).toHaveText(`Child list`);
await expect(await this.get().locator(`button:has-text("Link to '${linkField}'")`).isVisible()).toBeTruthy();
await expect(
await this.get().locator(`button:has-text("Link to"):hasText("${linkField}'")`).isVisible()
).toBeTruthy();
await expect(await this.get().locator(`[data-testid="nc-child-list-reload"]`).isVisible()).toBeTruthy();
// child list body validation (card count, card title)

Loading…
Cancel
Save