From 557c9bab3b93c0cb6c172a1b529611dd8f135f80 Mon Sep 17 00:00:00 2001 From: Ran Byron Date: Thu, 31 Oct 2019 11:27:48 +0200 Subject: [PATCH] Added cypress test --- .../integration/query/parameter_spec.js | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/client/cypress/integration/query/parameter_spec.js b/client/cypress/integration/query/parameter_spec.js index 0a2ff9aa3e..48ba7f773b 100644 --- a/client/cypress/integration/query/parameter_spec.js +++ b/client/cypress/integration/query/parameter_spec.js @@ -641,6 +641,29 @@ describe('Parameter', () => { expectValueValidationError(); cy.percySnapshot('Validation error in widget-level parameter'); }); + + it('shows validation error in dashboard-level parameter', function () { + createDashboard('Foo') + .then(({ slug, id }) => { + this.dashboardUrl = `/dashboard/${slug}`; + return addWidget(id, this.vizId, { + parameterMappings: { + 'test-parameter': { + type: 'dashboard-level', + title: '', + name: 'test-parameter', + mapTo: 'test-parameter', + value: null, + }, + }, + }); + }) + .then(() => { + cy.visit(this.dashboardUrl); + }); + expectValueValidationError(); + cy.percySnapshot('Validation error in dashboard-level parameter'); + }); }); describe('Apply Changes', () => {