Make a dashboard its widgets: drop the pages and sections nobody drew
This commit is contained in:
@@ -48,7 +48,7 @@ test.beforeAll(async ({ browser }) => {
|
||||
dashboard.columns = 12
|
||||
dashboard.canvas_width = 1920
|
||||
dashboard.canvas_height = 1080
|
||||
dashboard.pages[0].sections[0].widgets = WIDGETS
|
||||
dashboard.widgets = WIDGETS
|
||||
await api(page, `/dashboards/${dashboardName}`, {
|
||||
method: "PUT",
|
||||
data: dashboard,
|
||||
@@ -65,7 +65,7 @@ async function placements(page: Page) {
|
||||
const doc = await (
|
||||
await api(page, `/dashboards/${dashboardName}?draft=true`)
|
||||
).json()
|
||||
const widgets = doc.pages[0].sections[0].widgets as {
|
||||
const widgets = doc.widgets as {
|
||||
id: string
|
||||
layout: { lg: { x: number; y: number } }
|
||||
}[]
|
||||
|
||||
Reference in New Issue
Block a user