Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Lens] Smokescreen lens test unskip #80190

Merged
merged 7 commits into from
Oct 13, 2020
Merged
Show file tree
Hide file tree
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
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