Skip to content

Commit

Permalink
[Discover] Update deprecated class
Browse files Browse the repository at this point in the history
  • Loading branch information
jughosta committed Sep 23, 2022
1 parent 90a9c94 commit 6add59f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions test/functional/apps/management/_scripted_fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
'timePicker',
]);

describe('scripted fields 111', function () {
describe('scripted fields', function () {
this.tags(['skipFirefox']);

before(async function () {
Expand Down Expand Up @@ -499,7 +499,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await filterBar.removeAllFilters();
});

// TODO: fix these flaky tests
it('should visualize scripted field in vertical bar chart', async function () {
await PageObjects.discover.clickFieldListItemVisualize(scriptedPainlessFieldName2);
await PageObjects.header.waitUntilLoadingHasFinished();
Expand Down
3 changes: 2 additions & 1 deletion test/functional/page_objects/discover_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -486,14 +486,15 @@ export class DiscoverPageObject extends FtrService {

public async clickFieldListItemVisualize(fieldName: string) {
const field = await this.testSubjects.find(`field-${fieldName}-showDetails`);
const isActive = await field.elementHasClass('dscSidebarItem--active');
const isActive = await field.elementHasClass('kbnFieldButton-isActive');

if (!isActive) {
// expand the field to show the "Visualize" button
await field.click();
}

await this.testSubjects.click(`fieldVisualize-${fieldName}`);
await this.header.waitUntilLoadingHasFinished();
}

public async expectFieldListItemVisualize(field: string) {
Expand Down

0 comments on commit 6add59f

Please sign in to comment.