Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Stack Monitoring] Fix monitoring func test #115013

Merged
merged 6 commits into from
Oct 14, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const ClusterOverview: React.FC<{}> = () => {
{
id: 'clusterName',
label: clusters[0].cluster_name,
testSubj: 'clusterName',
testSubj: 'overviewTabsclusterName',
route: '/overview',
},
];
Expand Down
16 changes: 10 additions & 6 deletions x-pack/plugins/monitoring/public/components/no_data/no_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,13 @@ export function NoData(props) {
window.location.hash = getSafeForExternalLink('#/elasticsearch/nodes');
}

const NoDataContainer = ({ children }) => {
return <EuiPage data-test-subj="noDataContainer">{children}</EuiPage>;
};

if (isCloudEnabled) {
return (
<EuiPage>
<NoDataContainer>
<EuiScreenReaderOnly>
<h1>
<FormattedMessage
Expand Down Expand Up @@ -97,13 +101,13 @@ export function NoData(props) {
<CloudDeployment />
</EuiPageContent>
</EuiPageBody>
</EuiPage>
</NoDataContainer>
);
}

if (useInternalCollection) {
return (
<EuiPage>
<NoDataContainer>
<EuiScreenReaderOnly>
<h1>
<FormattedMessage
Expand Down Expand Up @@ -140,12 +144,12 @@ export function NoData(props) {
) : null}
</EuiPageContent>
</EuiPageBody>
</EuiPage>
</NoDataContainer>
);
}

return (
<EuiPage>
<NoDataContainer>
<EuiScreenReaderOnly>
<h1>
<FormattedMessage
Expand Down Expand Up @@ -211,7 +215,7 @@ export function NoData(props) {
</EuiButtonEmpty>
</EuiPageContent>
</EuiPageBody>
</EuiPage>
</NoDataContainer>
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ <h1 class="euiTitle euiTitle--xsmall">{{pageTitle || monitoringMain.instance}}</
</div>

<div ng-if="monitoringMain.inOverview" class="euiTabs" role="navigation">
<a class="euiTab" data-test-subj="clusterName">{{ pageData.cluster_name }}</a>
<a class="euiTab" data-test-subj="overviewTabsclusterName">{{ pageData.cluster_name }}</a>
</div>

<div ng-if="monitoringMain.inAlerts" class="euiTabs" role="navigation">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export default function ({ getService, getPageObjects }) {
const PageObjects = getPageObjects(['monitoring', 'common', 'header']);
const esSupertest = getService('esSupertest');
const noData = getService('monitoringNoData');
const testSubjects = getService('testSubjects');
const clusterOverview = getService('monitoringClusterOverview');
const retry = getService('retry');
const esDeleteAllIndices = getService('esDeleteAllIndices');
Expand Down Expand Up @@ -53,8 +52,6 @@ export default function ({ getService, getPageObjects }) {
// Here we are checking that once Monitoring is enabled,
// it moves on to the cluster overview page.
await retry.tryForTime(20000, async () => {
// Click the refresh button
await testSubjects.click('querySubmitButton');
await clusterOverview.closeAlertsModal();
expect(await clusterOverview.isOnClusterOverview()).to.be(true);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ export function MonitoringClusterOverviewProvider({ getService }) {
const retry = getService('retry');

const SUBJ_CLUSTER_ALERTS = `clusterAlertsContainer`;
const SUBJ_CLUSTER_OVERVIEW = 'clusterOverviewContainer';
const SUBJ_CLUSTER_NAME = `${SUBJ_CLUSTER_OVERVIEW} > clusterName`;
const SUBJ_CLUSTER_NAME = `overviewTabsclusterName`;

const SUBJ_ES_PANEL = `clusterItemContainerElasticsearch`;
const SUBJ_ES_STATUS = `${SUBJ_ES_PANEL} > statusIcon`;
Expand Down