Skip to content

Commit

Permalink
[7.10] [Lens] Smokescreen lens test unskip (elastic#80190) (elastic#8…
Browse files Browse the repository at this point in the history
…0353)

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
dej611 and kibanamachine authored Oct 13, 2020
1 parent e80bb7f commit 651d052
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 651d052

Please sign in to comment.