Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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