Skip to content

Commit

Permalink
fix for chart_types test (#57056) (#57125)
Browse files Browse the repository at this point in the history
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
rashmivkulkarni and elasticmachine authored Feb 7, 2020
1 parent c8fbc45 commit 0d11a76
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions test/functional/apps/visualize/_chart_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* under the License.
*/

import _ from 'lodash';
import expect from '@kbn/expect';
import { FtrProviderContext } from '../../ftr_provider_context';

Expand All @@ -34,7 +35,7 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
});

it('should show the correct chart types', async function() {
const expectedChartTypes = [
let expectedChartTypes = [
'Area',
'Controls',
'Coordinate Map',
Expand All @@ -55,13 +56,19 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
'Vertical Bar',
];
if (!isOss) {
expectedChartTypes.push('Maps');
expectedChartTypes.push('Maps', 'Lens');
expectedChartTypes = _.remove(expectedChartTypes, function(n) {
return n !== 'Coordinate Map';
});
expectedChartTypes = _.remove(expectedChartTypes, function(n) {
return n !== 'Region Map';
});
expectedChartTypes.sort();
}
log.debug('oss= ' + isOss);

// find all the chart types and make sure there all there
const chartTypes = await PageObjects.visualize.getChartTypes();
const chartTypes = (await PageObjects.visualize.getChartTypes()).sort();
log.debug('returned chart types = ' + chartTypes);
log.debug('expected chart types = ' + expectedChartTypes);
expect(chartTypes).to.eql(expectedChartTypes);
Expand Down

0 comments on commit 0d11a76

Please sign in to comment.