Skip to content

Commit

Permalink
[Lens] Smokescreen lens test unskip (#80190)
Browse files Browse the repository at this point in the history
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
dej611 and kibanamachine authored Oct 13, 2020
1 parent 62b8498 commit 1290ef4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
6 changes: 4 additions & 2 deletions x-pack/test/functional/apps/lens/smokescreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const listingTable = getService('listingTable');
const testSubjects = getService('testSubjects');

// Failing: See https://github.com/elastic/kibana/issues/77969
describe.skip('lens smokescreen tests', () => {
describe('lens smokescreen tests', () => {
it('should allow creation of lens xy chart', async () => {
await PageObjects.visualize.navigateToNewVisualization();
await PageObjects.visualize.clickVisType('lens');
Expand Down Expand Up @@ -153,13 +152,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
dimension: 'lnsXY_yDimensionPanel > lns-dimensionTrigger',
operation: 'max',
field: 'memory',
keepOpen: true,
});
await PageObjects.lens.editDimensionLabel('Test of label');
await PageObjects.lens.editDimensionFormat('Percent');
await PageObjects.lens.editDimensionColor('#ff0000');
await PageObjects.lens.editMissingValues('Linear');

await PageObjects.lens.assertMissingValues('Linear');

await PageObjects.lens.openDimensionEditor('lnsXY_yDimensionPanel > lns-dimensionTrigger');
await PageObjects.lens.assertColor('#ff0000');

await testSubjects.existOrFail('indexPattern-dimension-formatDecimals');
Expand Down
12 changes: 12 additions & 0 deletions x-pack/test/functional/page_objects/lens_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,18 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
}
},

/**
* Open the specified dimension.
*
* @param dimension - the selector of the dimension panel to open
* @param layerIndex - the index of the layer
*/
async openDimensionEditor(dimension: string, layerIndex = 0) {
await retry.try(async () => {
await testSubjects.click(`lns-layerPanel-${layerIndex} > ${dimension}`);
});
},

// closes the dimension editor flyout
async closeDimensionEditor() {
await testSubjects.click('lns-indexPattern-dimensionContainerTitle');
Expand Down

0 comments on commit 1290ef4

Please sign in to comment.