Skip to content

Commit

Permalink
Added cypress test
Browse files Browse the repository at this point in the history
  • Loading branch information
ranbena committed Oct 31, 2019
1 parent 82ad05c commit 557c9ba
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions client/cypress/integration/query/parameter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down

0 comments on commit 557c9ba

Please sign in to comment.