Skip to content

Commit

Permalink
Making sure widget-level param is selected
Browse files Browse the repository at this point in the history
  • Loading branch information
ranbena committed Oct 31, 2019
1 parent ad619b8 commit 6a11a87
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions client/cypress/integration/query/parameter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -619,17 +619,27 @@ describe('Parameter', () => {
cy.percySnapshot('Validation error in visualization embed');
});

it('shows validation error in dashboard widget', function () {
it('shows validation error in widget-level parameter', function () {
createDashboard('Foo')
.then(({ slug, id }) => {
this.dashboardUrl = `/dashboard/${slug}`;
return addWidget(id, this.vizId);
return addWidget(id, this.vizId, {
parameterMappings: {
'test-parameter': {
type: 'widget-level',
title: '',
name: 'test-parameter',
mapTo: 'test-parameter',
value: null,
},
},
});
})
.then(() => {
cy.visit(this.dashboardUrl);
});
expectValueValidationError();
cy.percySnapshot('Validation error in dashboard widget');
cy.percySnapshot('Validation error in widget-level parameter');
});
});

Expand Down

0 comments on commit 6a11a87

Please sign in to comment.