mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Stack Monitoring] Fix monitoring func test (#115013)
* add noDataContainer test-subj * remove unnecessary test step * Fix test subjects for overview page * remove unused service * update NoData component snapshots Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
91d48ff475
commit
e49ec25fae
3 changed files with 12 additions and 9 deletions
|
@ -3,6 +3,7 @@
|
|||
exports[`NoData should show a default message if reason is unknown 1`] = `
|
||||
<div
|
||||
class="euiPage euiPage--paddingMedium euiPage--grow"
|
||||
data-test-subj="noDataContainer"
|
||||
>
|
||||
<h1
|
||||
class="euiScreenReaderOnly"
|
||||
|
@ -94,6 +95,7 @@ exports[`NoData should show a default message if reason is unknown 1`] = `
|
|||
exports[`NoData should show text next to the spinner while checking a setting 1`] = `
|
||||
<div
|
||||
class="euiPage euiPage--paddingMedium euiPage--grow"
|
||||
data-test-subj="noDataContainer"
|
||||
>
|
||||
<h1
|
||||
class="euiScreenReaderOnly"
|
||||
|
|
|
@ -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
|
||||
|
@ -97,13 +101,13 @@ export function NoData(props) {
|
|||
<CloudDeployment />
|
||||
</EuiPageContent>
|
||||
</EuiPageBody>
|
||||
</EuiPage>
|
||||
</NoDataContainer>
|
||||
);
|
||||
}
|
||||
|
||||
if (useInternalCollection) {
|
||||
return (
|
||||
<EuiPage>
|
||||
<NoDataContainer>
|
||||
<EuiScreenReaderOnly>
|
||||
<h1>
|
||||
<FormattedMessage
|
||||
|
@ -140,12 +144,12 @@ export function NoData(props) {
|
|||
) : null}
|
||||
</EuiPageContent>
|
||||
</EuiPageBody>
|
||||
</EuiPage>
|
||||
</NoDataContainer>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<EuiPage>
|
||||
<NoDataContainer>
|
||||
<EuiScreenReaderOnly>
|
||||
<h1>
|
||||
<FormattedMessage
|
||||
|
@ -211,7 +215,7 @@ export function NoData(props) {
|
|||
</EuiButtonEmpty>
|
||||
</EuiPageContent>
|
||||
</EuiPageBody>
|
||||
</EuiPage>
|
||||
</NoDataContainer>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -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');
|
||||
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue