Skip to content

Commit

Permalink
[ObsUx][Infra] Unskip and try to fix hosts view test (elastic#197861)
Browse files Browse the repository at this point in the history
Closes elastic#191806

The parts of the unskipped test were fixed here - the only case I
couldn't find the reason for failing after unskipping it is `should have
an option to open the chart in lens` - for some reason, the whole menu
is gone when checking the CI and I couldn't reproduce that so this will
be the only skipped part so we can at least have all the other `Hosts
view` tests
  • Loading branch information
jennypavlova authored Oct 29, 2024
1 parent 3131dd9 commit 735b2de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions x-pack/test/functional/apps/infra/hosts_view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
(await pageObjects.infraHostsView.isKPIChartsLoaded())
);

// Failing: See https://github.com/elastic/kibana/issues/191806
describe.skip('Hosts View', function () {
describe('Hosts View', function () {
let synthEsInfraClient: InfraSynthtraceEsClient;
let syntEsLogsClient: LogsSynthtraceEsClient;
let synthtraceApmClient: ApmSynthtraceEsClient;
Expand Down Expand Up @@ -420,10 +419,9 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
].forEach(({ metric, value }) => {
it(`${metric} tile should show ${value}`, async () => {
await retry.tryForTime(5000, async () => {
const tileValue = await pageObjects.assetDetails.getAssetDetailsKPITileValue(
metric
expect(await pageObjects.assetDetails.getAssetDetailsKPITileValue(metric)).to.eql(
value
);
expect(tileValue).to.eql(value);
});
});
});
Expand Down Expand Up @@ -676,7 +674,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {

describe('Metrics Tab', () => {
before(async () => {
await browser.scrollTop();
await pageObjects.infraHostsView.visitMetricsTab();
});

Expand All @@ -689,7 +686,8 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
expect(metricCharts.length).to.equal(11);
});

it('should have an option to open the chart in lens', async () => {
// flaky, the option is not visible
it.skip('should have an option to open the chart in lens', async () => {
await retry.tryForTime(5000, async () => {
await pageObjects.infraHostsView.clickAndValidateMetricChartActionOptions();
await browser.pressKeys(browser.keys.ESCAPE);
Expand Down
2 changes: 1 addition & 1 deletion x-pack/test/functional/page_objects/infra_hosts_view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export function InfraHostsViewProvider({ getService }: FtrProviderContext) {
await element.moveMouseTo();
const button = await element.findByTestSubject('embeddablePanelToggleMenuIcon');
await button.click();
await testSubjects.existOrFail('embeddablePanelAction-openInLens');
return testSubjects.existOrFail('embeddablePanelAction-openInLens');
},

// KPIs
Expand Down

0 comments on commit 735b2de

Please sign in to comment.