From aa7d2c6af3eadafb5433e04e0dd2d98b469eca67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 22 Apr 2020 12:00:30 +0200 Subject: [PATCH] E2E: Fixed e2e test issue due to change in testdata scenario change logic (#23774) --- public/app/plugins/datasource/testdata/query_ctrl.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/datasource/testdata/query_ctrl.ts b/public/app/plugins/datasource/testdata/query_ctrl.ts index dad3cdc6f6f..48bfa3bb605 100644 --- a/public/app/plugins/datasource/testdata/query_ctrl.ts +++ b/public/app/plugins/datasource/testdata/query_ctrl.ts @@ -88,8 +88,6 @@ export class TestDataQueryCtrl extends QueryCtrl { scenarioChanged() { this.scenario = _.find(this.scenarioList, { id: this.target.scenarioId }); - this.target.stringInput = this.scenario.stringInput; - this.showLabels = showLabelsFor.includes(this.target.scenarioId); if (this.target.scenarioId === 'manual_entry') { this.target.points = this.target.points || []; @@ -121,6 +119,9 @@ export class TestDataQueryCtrl extends QueryCtrl { delete this.target.stringInput; } + this.target.stringInput = this.scenario.stringInput ?? undefined; + this.showLabels = showLabelsFor.includes(this.target.scenarioId); + this.refresh(); }