From 9ba9cbf3005d889076eb5bebe61653a2a35447df Mon Sep 17 00:00:00 2001 From: Oscar Kilhed Date: Tue, 2 Apr 2024 16:15:53 +0200 Subject: [PATCH] Bump scenes to 4.1.2 (#85470) * Bump scenes to 4.1.2 * Fix tests after fixing the sorting in rows --------- Co-authored-by: Ivan Ortega --- package.json | 2 +- .../serialization/transformSaveModelToScene.test.ts | 6 ++++-- yarn.lock | 10 +++++----- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 7ff5a123538..2b8072821d3 100644 --- a/package.json +++ b/package.json @@ -253,7 +253,7 @@ "@grafana/prometheus": "workspace:*", "@grafana/runtime": "workspace:*", "@grafana/saga-icons": "workspace:*", - "@grafana/scenes": "4.0.4", + "@grafana/scenes": "4.1.2", "@grafana/schema": "workspace:*", "@grafana/sql": "workspace:*", "@grafana/ui": "workspace:*", diff --git a/public/app/features/dashboard-scene/serialization/transformSaveModelToScene.test.ts b/public/app/features/dashboard-scene/serialization/transformSaveModelToScene.test.ts index 47d9033ae77..136d33b281c 100644 --- a/public/app/features/dashboard-scene/serialization/transformSaveModelToScene.test.ts +++ b/public/app/features/dashboard-scene/serialization/transformSaveModelToScene.test.ts @@ -234,8 +234,10 @@ describe('transformSaveModelToScene', () => { expect(rowScene.state.children[0]).toBeInstanceOf(DashboardGridItem); expect(rowScene.state.children[1]).toBeInstanceOf(DashboardGridItem); expect(rowScene.state.children[2]).toBeInstanceOf(DashboardGridItem); - expect((rowScene.state.children[1] as DashboardGridItem).state.body!).toBeInstanceOf(AddLibraryPanelWidget); - expect((rowScene.state.children[2] as DashboardGridItem).state.body!).toBeInstanceOf(LibraryVizPanel); + // Panels are sorted by position in the row + expect((rowScene.state.children[0] as DashboardGridItem).state.body!).toBeInstanceOf(AddLibraryPanelWidget); + expect((rowScene.state.children[1] as DashboardGridItem).state.body!).toBeInstanceOf(LibraryVizPanel); + expect((rowScene.state.children[2] as DashboardGridItem).state.body!).toBeInstanceOf(VizPanel); }); it('should create panels within expanded row', () => { diff --git a/yarn.lock b/yarn.lock index af29d4c4b0c..4aad8fe05e0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4121,9 +4121,9 @@ __metadata: languageName: unknown linkType: soft -"@grafana/scenes@npm:4.0.4": - version: 4.0.4 - resolution: "@grafana/scenes@npm:4.0.4" +"@grafana/scenes@npm:4.1.2": + version: 4.1.2 + resolution: "@grafana/scenes@npm:4.1.2" dependencies: "@grafana/e2e-selectors": "npm:10.3.3" react-grid-layout: "npm:1.3.4" @@ -4137,7 +4137,7 @@ __metadata: "@grafana/ui": ^10.0.3 react: ^18.0.0 react-dom: ^18.0.0 - checksum: 10/2d5b7925c9f4d1eaad5f322a669da055341e2a47e19cb26e40f50e0090ec0d823f3041017ed4f2d7a5af6f7f4025097f6b6a2c4e7779fa61df788d298e3745dd + checksum: 10/3627d1f200b30872615d9427af3bdac534f8a39a5dd1ba1b3a55b9e6664cf5f0e9750fd9c0d36d1e54d7dd20f7e74a8f5e56f3e145e02f315bd9f104cdb448bd languageName: node linkType: hard @@ -18546,7 +18546,7 @@ __metadata: "@grafana/prometheus": "workspace:*" "@grafana/runtime": "workspace:*" "@grafana/saga-icons": "workspace:*" - "@grafana/scenes": "npm:4.0.4" + "@grafana/scenes": "npm:4.1.2" "@grafana/schema": "workspace:*" "@grafana/sql": "workspace:*" "@grafana/tsconfig": "npm:^1.3.0-rc1"