Skip to content

Commit

Permalink
[console] Restore font size flaky test (elastic#197691)
Browse files Browse the repository at this point in the history
## Summary

The test no longer appears flaky based on the flaky test runner. In
addition to this PR there's also
elastic#197563 for 400+ passes. It should
be noted that in one run 25 runs were skipped and one run failed due to
an unrelated test.

Closes elastic#193868
  • Loading branch information
mattkime authored Oct 31, 2024
1 parent 216f899 commit 92430b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 1 addition & 2 deletions test/functional/apps/console/_misc_console_behavior.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.console.openConsole();
});

// Failing: See https://github.com/elastic/kibana/issues/193868
describe.skip('customizable font size', () => {
describe('customizable font size', () => {
it('should allow the font size to be customized', async () => {
await PageObjects.console.openConfig();
await PageObjects.console.setFontSizeSetting(20);
Expand Down
5 changes: 4 additions & 1 deletion test/functional/page_objects/console_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import { Key } from 'selenium-webdriver';
import { asyncForEach } from '@kbn/std';
import expect from '@kbn/expect';
import { FtrService } from '../ftr_provider_context';

export class ConsolePageObject extends FtrService {
Expand Down Expand Up @@ -368,10 +369,12 @@ export class ConsolePageObject extends FtrService {
public async setFontSizeSetting(newSize: number) {
// while the settings form opens/loads this may fail, so retry for a while
await this.retry.try(async () => {
const newSizeString = String(newSize);
const fontSizeInput = await this.testSubjects.find('setting-font-size-input');
await fontSizeInput.clearValue({ withJS: true });
await fontSizeInput.click();
await fontSizeInput.type(String(newSize));
await fontSizeInput.type(newSizeString);
expect(await fontSizeInput.getAttribute('value')).to.be(newSizeString);
});
}

Expand Down

0 comments on commit 92430b5

Please sign in to comment.