[console] Restore font size flaky test (#197691)

## Summary

The test no longer appears flaky based on the flaky test runner. In
addition to this PR there's also
https://github.com/elastic/kibana/pull/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 https://github.com/elastic/kibana/issues/193868
This commit is contained in:
Matthew Kime 2024-10-31 14:30:55 -05:00 committed by GitHub
parent 216f899621
commit 92430b5aae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View file

@ -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);

View file

@ -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 {
@ -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);
});
}