diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/default/flyout.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/default/flyout.tsx index 439062e027650..9262ea9664033 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/default/flyout.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/default/flyout.tsx @@ -62,7 +62,9 @@ export const DefaultDeprecationFlyout = ({ <> -

{message}

+

+ {message} +

{index && ( @@ -74,7 +76,7 @@ export const DefaultDeprecationFlyout = ({
-

{details}

+

{details}

{i18nTexts.learnMoreLinkLabel} diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/index_settings/flyout.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/index_settings/flyout.tsx index 1567562db53ee..edb46ee0dc85b 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/index_settings/flyout.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/index_settings/flyout.tsx @@ -110,7 +110,7 @@ export const RemoveIndexSettingsFlyout = ({ <> -

{message}

+

{message}

diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/ml_snapshots/flyout.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/ml_snapshots/flyout.tsx index 5d61b076119e7..a972b7ec192d2 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/ml_snapshots/flyout.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/ml_snapshots/flyout.tsx @@ -169,7 +169,7 @@ export const FixSnapshotsFlyout = ({ <> -

{i18nTexts.flyoutTitle}

+

{i18nTexts.flyoutTitle}

diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/reindex/flyout/container.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/reindex/flyout/container.tsx index 23008a4f2f1b8..d2d07b47acd49 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/reindex/flyout/container.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/reindex/flyout/container.tsx @@ -131,7 +131,7 @@ export const ReindexFlyout: React.FunctionComponent = ({ <> -

+

{ try { await es.indices.delete({ - index: [translogSettingsIndexDeprecation.index], + index: [multiFieldsIndexDeprecation.index, translogSettingsIndexDeprecation.index], }); } catch (e) { - log.debug('[Cleanup error] Error deleting index'); + log.debug('[Cleanup error] Error deleting indices'); throw e; } }); @@ -58,22 +84,46 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await a11y.testAppSnapshot(); }); - it('Elasticsearch deprecations page', async () => { - await PageObjects.common.navigateToUrl( - 'management', - 'stack/upgrade_assistant/es_deprecations', - { - ensureCurrentUrl: false, - shouldLoginIfPrompted: false, - shouldUseHashForSubUrl: false, - } - ); - - await retry.waitFor('Elasticsearch deprecations table to be visible', async () => { - return testSubjects.exists('esDeprecationsTable'); + describe('Elasticsearch deprecations page', () => { + beforeEach(async () => { + await PageObjects.common.navigateToUrl( + 'management', + 'stack/upgrade_assistant/es_deprecations', + { + ensureCurrentUrl: false, + shouldLoginIfPrompted: false, + shouldUseHashForSubUrl: false, + } + ); + + await retry.waitFor('Elasticsearch deprecations table to be visible', async () => { + return testSubjects.exists('esDeprecationsTable'); + }); }); - await a11y.testAppSnapshot(); + it('Deprecations table', async () => { + await a11y.testAppSnapshot(); + }); + + it('Index settings deprecation flyout', async () => { + await PageObjects.upgradeAssistant.clickEsDeprecation( + 'indexSettings' // An index setting deprecation was added in the before() hook so should be guaranteed + ); + await retry.waitFor('ES index settings deprecation flyout to be visible', async () => { + return testSubjects.exists('indexSettingsDetails'); + }); + await a11y.testAppSnapshot(); + }); + + it('Default deprecation flyout', async () => { + await PageObjects.upgradeAssistant.clickEsDeprecation( + 'default' // A default deprecation was added in the before() hook so should be guaranteed + ); + await retry.waitFor('ES default deprecation flyout to be visible', async () => { + return testSubjects.exists('defaultDeprecationDetails'); + }); + await a11y.testAppSnapshot(); + }); }); describe('Kibana deprecations page', () => { diff --git a/x-pack/test/functional/page_objects/upgrade_assistant_page.ts b/x-pack/test/functional/page_objects/upgrade_assistant_page.ts index 406800d775417..e763145a715ff 100644 --- a/x-pack/test/functional/page_objects/upgrade_assistant_page.ts +++ b/x-pack/test/functional/page_objects/upgrade_assistant_page.ts @@ -57,4 +57,17 @@ export class UpgradeAssistantPageObject extends FtrService { this.log.debug('Unable to find selected deprecation row'); } } + + async clickEsDeprecation(deprecationType: 'indexSettings' | 'default' | 'reindex' | 'ml') { + const table = await this.testSubjects.find('esDeprecationsTable'); + const deprecationIssueLink = await ( + await table.findByTestSubject(`${deprecationType}TableCell-message`) + ).findByCssSelector('button'); + + if (deprecationIssueLink) { + await deprecationIssueLink.click(); + } else { + this.log.debug('Unable to find selected deprecation'); + } + } }