Skip to content

Commit

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

# Backport

This will backport the following commits from `main` to `8.16`:
- [[ObsUx][Infra] Unskip and try to fix hosts view test
(#197861)](#197861)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"jennypavlova","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-29T08:43:20Z","message":"[ObsUx][Infra]
Unskip and try to fix hosts view test (#197861)\n\nCloses
#191806\r\n\r\nThe parts of the unskipped test were fixed here - the
only case I\r\ncouldn't find the reason for failing after unskipping it
is `should have\r\nan option to open the chart in lens` - for some
reason, the whole menu\r\nis gone when checking the CI and I couldn't
reproduce that so this will\r\nbe the only skipped part so we can at
least have all the other `Hosts\r\nview`
tests","sha":"735b2de08a5ab8d4b65e101cca6a044372726627","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:obs-ux-infra_services","v8.16.0","backport:version"],"title":"[ObsUx][Infra]
Unskip and try to fix hosts view
test","number":197861,"url":"https://github.com/elastic/kibana/pull/197861","mergeCommit":{"message":"[ObsUx][Infra]
Unskip and try to fix hosts view test (#197861)\n\nCloses
#191806\r\n\r\nThe parts of the unskipped test were fixed here - the
only case I\r\ncouldn't find the reason for failing after unskipping it
is `should have\r\nan option to open the chart in lens` - for some
reason, the whole menu\r\nis gone when checking the CI and I couldn't
reproduce that so this will\r\nbe the only skipped part so we can at
least have all the other `Hosts\r\nview`
tests","sha":"735b2de08a5ab8d4b65e101cca6a044372726627"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197861","number":197861,"mergeCommit":{"message":"[ObsUx][Infra]
Unskip and try to fix hosts view test (#197861)\n\nCloses
#191806\r\n\r\nThe parts of the unskipped test were fixed here - the
only case I\r\ncouldn't find the reason for failing after unskipping it
is `should have\r\nan option to open the chart in lens` - for some
reason, the whole menu\r\nis gone when checking the CI and I couldn't
reproduce that so this will\r\nbe the only skipped part so we can at
least have all the other `Hosts\r\nview`
tests","sha":"735b2de08a5ab8d4b65e101cca6a044372726627"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: jennypavlova <[email protected]>
  • Loading branch information
kibanamachine and jennypavlova authored Oct 29, 2024
1 parent 7dc8539 commit 667e771
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 667e771

Please sign in to comment.