Skip to content

Commit

Permalink
Fix data-test-subj
Browse files Browse the repository at this point in the history
  • Loading branch information
crespocarlos committed Apr 25, 2023
1 parent 2224bf6 commit 0c05d02
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const HOSTS_CHART: Omit<Props, 'loading' | 'value'> = {
toolTip: i18n.translate('xpack.infra.hostsViewPage.metricTrend.hostCount.tooltip', {
defaultMessage: 'The number of hosts returned by your current search criteria.',
}),
['data-test-subj']: 'hostsViewKPIGridHostsCountTile',
['data-test-subj']: 'hostsViewKPI-hostsCount',
};

export const HostsTile = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export const Tile = ({
hasShadow={false}
paddingSize={error ? 'm' : 'none'}
style={{ minHeight: MIN_HEIGHT }}
data-test-subj={`hostsViewKPIGrid${type}Tile`}
data-test-subj={`hostsViewKPI-${type}`}
>
{error ? (
<EuiFlexGroup
Expand Down
6 changes: 3 additions & 3 deletions x-pack/test/functional/page_objects/infra_hosts_view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export function InfraHostsViewProvider({ getService }: FtrProviderContext) {
},

async getMetricsTrendContainer() {
return testSubjects.find('hostsView-metricsTrend');
return testSubjects.find('hostsViewKPIGrid');
},

async getChartsContainer() {
Expand All @@ -114,12 +114,12 @@ export function InfraHostsViewProvider({ getService }: FtrProviderContext) {

async getAllMetricsTrendTiles() {
const container = await this.getMetricsTrendContainer();
return container.findAllByCssSelector('[data-test-subj*="hostsView-metricsTrend-"]');
return container.findAllByCssSelector('[data-test-subj*="hostsViewKPI-"]');
},

async getMetricsTrendTileValue(type: string) {
const container = await this.getMetricsTrendContainer();
const element = await container.findByTestSubject(`hostsView-metricsTrend-${type}`);
const element = await container.findByTestSubject(`hostsViewKPI-${type}`);
const div = await element.findByClassName('echMetricText__value');
return await div.getAttribute('title');
},
Expand Down

0 comments on commit 0c05d02

Please sign in to comment.