mirror of
https://github.com/grafana/grafana.git
synced 2024-11-21 08:34:25 -06:00
Update scenes to v5.23.1 (#95951)
* Update scenes to v5.23.1 * Fix e2e tests * Fix unit tests --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Bogdan Matei <bogdan.matei@grafana.com>
This commit is contained in:
parent
fbbb4463f8
commit
70c21a2e4d
@ -9,6 +9,9 @@ describe('Dashboard templating', () => {
|
||||
// Open dashboard global variables and interpolation
|
||||
e2e.flows.openDashboard({ uid: 'HYaGDGIMk' });
|
||||
|
||||
const timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
const example = `Example: from=now-6h&to=now&timezone=${encodeURIComponent(timeZone)}`;
|
||||
|
||||
const items: string[] = [];
|
||||
const expectedItems: string[] = [
|
||||
'__dashboard = Templating - Global variables and interpolation',
|
||||
@ -36,7 +39,7 @@ describe('Dashboard templating', () => {
|
||||
`Server:text = All`,
|
||||
`Server:queryparam = var-Server=$__all`,
|
||||
`1 < 2`,
|
||||
`Example: from=now-6h&to=now`,
|
||||
example,
|
||||
];
|
||||
|
||||
cy.get('.markdown-html li')
|
||||
@ -51,10 +54,10 @@ describe('Dashboard templating', () => {
|
||||
});
|
||||
|
||||
// Check link interpolation is working correctly
|
||||
cy.contains('a', 'Example: from=now-6h&to=now').should(
|
||||
cy.contains('a', example).should(
|
||||
'have.attr',
|
||||
'href',
|
||||
'https://example.com/?from=now-6h&to=now'
|
||||
`https://example.com/?from=now-6h&to=now&timezone=${encodeURIComponent(timeZone)}`
|
||||
);
|
||||
});
|
||||
});
|
||||
|
@ -268,8 +268,8 @@
|
||||
"@grafana/prometheus": "workspace:*",
|
||||
"@grafana/runtime": "workspace:*",
|
||||
"@grafana/saga-icons": "workspace:*",
|
||||
"@grafana/scenes": "5.22.1",
|
||||
"@grafana/scenes-react": "5.22.1",
|
||||
"@grafana/scenes": "5.23.1",
|
||||
"@grafana/scenes-react": "5.23.1",
|
||||
"@grafana/schema": "workspace:*",
|
||||
"@grafana/sql": "workspace:*",
|
||||
"@grafana/ui": "workspace:*",
|
||||
|
@ -55,11 +55,14 @@ describe('TrailStore', () => {
|
||||
});
|
||||
|
||||
describe('Initialize store with one recent trail with final current step', () => {
|
||||
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
|
||||
const history: SerializedTrail['history'] = [
|
||||
{
|
||||
urlValues: {
|
||||
from: 'now-1h',
|
||||
to: 'now',
|
||||
timezone,
|
||||
'var-ds': 'cb3a3391-700f-4cc6-81be-a122488e93e6',
|
||||
'var-filters': [],
|
||||
refresh: '',
|
||||
@ -73,6 +76,7 @@ describe('TrailStore', () => {
|
||||
metric: 'access_permissions_duration_count',
|
||||
from: 'now-1h',
|
||||
to: 'now',
|
||||
timezone,
|
||||
'var-ds': 'cb3a3391-700f-4cc6-81be-a122488e93e6',
|
||||
'var-filters': [],
|
||||
refresh: '',
|
||||
@ -153,6 +157,7 @@ describe('TrailStore', () => {
|
||||
['metric', 'different_metric'],
|
||||
['from', 'now-1y'],
|
||||
['to', 'now-30m'],
|
||||
['timezone', 'utc'],
|
||||
['var-ds', 'ds'],
|
||||
['var-groupby', 'job'],
|
||||
['var-filters', 'cluster|=|dev-eu-west-2'],
|
||||
@ -212,11 +217,14 @@ describe('TrailStore', () => {
|
||||
});
|
||||
|
||||
describe('Initialize store with one recent trail with non final current step', () => {
|
||||
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
|
||||
const history: SerializedTrail['history'] = [
|
||||
{
|
||||
urlValues: {
|
||||
from: 'now-1h',
|
||||
to: 'now',
|
||||
timezone,
|
||||
'var-ds': 'ds',
|
||||
'var-filters': [],
|
||||
refresh: '',
|
||||
@ -230,6 +238,7 @@ describe('TrailStore', () => {
|
||||
metric: 'current_metric',
|
||||
from: 'now-1h',
|
||||
to: 'now',
|
||||
timezone,
|
||||
'var-ds': 'ds',
|
||||
'var-filters': [],
|
||||
refresh: '',
|
||||
@ -243,6 +252,7 @@ describe('TrailStore', () => {
|
||||
metric: 'final_metric',
|
||||
from: 'now-1h',
|
||||
to: 'now',
|
||||
timezone,
|
||||
'var-ds': 'ds',
|
||||
'var-filters': [],
|
||||
refresh: '',
|
||||
@ -450,6 +460,7 @@ describe('TrailStore', () => {
|
||||
['metric', 'different_metric'],
|
||||
['from', 'now-1y'],
|
||||
['to', 'now-30m'],
|
||||
['timezone', 'utc'],
|
||||
['var-ds', 'different'],
|
||||
['var-groupby', 'job'],
|
||||
['var-filters', 'cluster|=|dev-eu-west-2'],
|
||||
@ -485,6 +496,8 @@ describe('TrailStore', () => {
|
||||
});
|
||||
|
||||
describe('Initialize store with one bookmark trail but no recent trails', () => {
|
||||
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
|
||||
beforeEach(() => {
|
||||
localStorage.clear();
|
||||
localStorage.setItem(
|
||||
@ -495,6 +508,7 @@ describe('TrailStore', () => {
|
||||
metric: 'bookmarked_metric',
|
||||
from: 'now-1h',
|
||||
to: 'now',
|
||||
timezone,
|
||||
'var-ds': 'prom-mock',
|
||||
'var-deployment_environment': ['undefined'],
|
||||
'var-otel_resources': [''],
|
||||
@ -571,6 +585,8 @@ describe('TrailStore', () => {
|
||||
});
|
||||
|
||||
describe('Initialize store with one legacy bookmark trail', () => {
|
||||
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
|
||||
beforeEach(() => {
|
||||
localStorage.clear();
|
||||
localStorage.setItem(
|
||||
@ -582,6 +598,7 @@ describe('TrailStore', () => {
|
||||
urlValues: {
|
||||
from: 'now-1h',
|
||||
to: 'now',
|
||||
timezone,
|
||||
'var-ds': 'cb3a3391-700f-4cc6-81be-a122488e93e6',
|
||||
'var-filters': [],
|
||||
refresh: '',
|
||||
@ -594,6 +611,7 @@ describe('TrailStore', () => {
|
||||
metric: 'access_permissions_duration_count',
|
||||
from: 'now-1h',
|
||||
to: 'now',
|
||||
timezone,
|
||||
'var-ds': 'cb3a3391-700f-4cc6-81be-a122488e93e6',
|
||||
'var-filters': [],
|
||||
refresh: '',
|
||||
@ -683,6 +701,8 @@ describe('TrailStore', () => {
|
||||
});
|
||||
|
||||
describe('Initialize store with one bookmark matching recent trail not on final step', () => {
|
||||
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
|
||||
beforeEach(() => {
|
||||
localStorage.clear();
|
||||
localStorage.setItem(
|
||||
@ -694,6 +714,7 @@ describe('TrailStore', () => {
|
||||
urlValues: {
|
||||
from: 'now-1h',
|
||||
to: 'now',
|
||||
timezone,
|
||||
'var-ds': 'prom-mock',
|
||||
'var-deployment_environment': ['undefined'],
|
||||
'var-otel_resources': [''],
|
||||
@ -707,6 +728,7 @@ describe('TrailStore', () => {
|
||||
metric: 'bookmarked_metric',
|
||||
from: 'now-1h',
|
||||
to: 'now',
|
||||
timezone,
|
||||
'var-ds': 'prom-mock',
|
||||
'var-deployment_environment': ['undefined'],
|
||||
'var-otel_resources': [''],
|
||||
@ -720,6 +742,7 @@ describe('TrailStore', () => {
|
||||
metric: 'some_other_metric',
|
||||
from: 'now-1h',
|
||||
to: 'now',
|
||||
timezone,
|
||||
'var-ds': 'prom-mock',
|
||||
'var-deployment_environment': ['undefined'],
|
||||
'var-otel_resources': [''],
|
||||
@ -741,6 +764,7 @@ describe('TrailStore', () => {
|
||||
metric: 'bookmarked_metric',
|
||||
from: 'now-1h',
|
||||
to: 'now',
|
||||
timezone,
|
||||
'var-ds': 'prom-mock',
|
||||
'var-deployment_environment': ['undefined'],
|
||||
'var-otel_resources': [''],
|
||||
|
22
yarn.lock
22
yarn.lock
@ -4025,12 +4025,12 @@ __metadata:
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@grafana/scenes-react@npm:5.22.1":
|
||||
version: 5.22.1
|
||||
resolution: "@grafana/scenes-react@npm:5.22.1"
|
||||
"@grafana/scenes-react@npm:5.23.1":
|
||||
version: 5.23.1
|
||||
resolution: "@grafana/scenes-react@npm:5.23.1"
|
||||
dependencies:
|
||||
"@grafana/e2e-selectors": "npm:^11.0.0"
|
||||
"@grafana/scenes": "npm:5.22.1"
|
||||
"@grafana/scenes": "npm:5.23.1"
|
||||
react-use: "npm:17.4.0"
|
||||
peerDependencies:
|
||||
"@grafana/data": ^11.0.0
|
||||
@ -4039,13 +4039,13 @@ __metadata:
|
||||
"@grafana/ui": ^11.0.0
|
||||
react: ^18.0.0
|
||||
react-dom: ^18.0.0
|
||||
checksum: 10/7ef272c760bb8d92a9d91a5497996a4bef44915eb83f2807d3a8b19075b401ee90d31ea665f3bf60333d2d909e488cd88e54dc93ae2dd88e925045dc5c79f650
|
||||
checksum: 10/83a17169e3382fa6d6e83ec3aec619b3591602fe8ab45bea883c293fc8460f1869596efe1f90758e364319c143345e3ef19015e684224c3325bf503d8ddeca6a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@grafana/scenes@npm:5.22.1":
|
||||
version: 5.22.1
|
||||
resolution: "@grafana/scenes@npm:5.22.1"
|
||||
"@grafana/scenes@npm:5.23.1":
|
||||
version: 5.23.1
|
||||
resolution: "@grafana/scenes@npm:5.23.1"
|
||||
dependencies:
|
||||
"@floating-ui/react": "npm:0.26.16"
|
||||
"@grafana/e2e-selectors": "npm:^11.0.0"
|
||||
@ -4062,7 +4062,7 @@ __metadata:
|
||||
"@grafana/ui": ">=10.4"
|
||||
react: ^18.0.0
|
||||
react-dom: ^18.0.0
|
||||
checksum: 10/ebb5f887ee94ad9fa1f9d4bd7f9503502875e940380362c0f476e042eb421881585c122a1252b0567508b0e1415d78b928ba22a04adb5b93882f601b86105f76
|
||||
checksum: 10/74cc74cc42102638ab3388e910242f3f641b325da5e42a2ab9bd18d9e6d14e55adbc93f25dcfad594ecc97003f1920c27b2e166e73e1a5f17459e0573615a1fd
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@ -18932,8 +18932,8 @@ __metadata:
|
||||
"@grafana/prometheus": "workspace:*"
|
||||
"@grafana/runtime": "workspace:*"
|
||||
"@grafana/saga-icons": "workspace:*"
|
||||
"@grafana/scenes": "npm:5.22.1"
|
||||
"@grafana/scenes-react": "npm:5.22.1"
|
||||
"@grafana/scenes": "npm:5.23.1"
|
||||
"@grafana/scenes-react": "npm:5.23.1"
|
||||
"@grafana/schema": "workspace:*"
|
||||
"@grafana/sql": "workspace:*"
|
||||
"@grafana/tsconfig": "npm:^2.0.0"
|
||||
|
Loading…
Reference in New Issue
Block a user