Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 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 @@ -190,13 +190,15 @@ export class UpgradeAssistantTabs extends React.Component<Props, TabsState> {
return [
{
id: 'overview',
'data-test-subj': 'upgradeAssistantOverviewTab',
name: i18n.translate('xpack.upgradeAssistant.overviewTab.overviewTabTitle', {
defaultMessage: 'Overview',
}),
content: <OverviewTab checkupData={checkupData} {...commonProps} />,
},
{
id: 'cluster',
'data-test-subj': 'upgradeAssistantClusterTab',
name: i18n.translate('xpack.upgradeAssistant.checkupTab.clusterTabLabel', {
defaultMessage: 'Cluster',
}),
Expand All @@ -213,6 +215,7 @@ export class UpgradeAssistantTabs extends React.Component<Props, TabsState> {
},
{
id: 'indices',
'data-test-subj': 'upgradeAssistantIndicesTab',
name: i18n.translate('xpack.upgradeAssistant.checkupTab.indicesTabLabel', {
defaultMessage: 'Indices',
}),
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ export const CheckupTab: FunctionComponent<CheckupTabProps> = ({
<>
<EuiSpacer />
<EuiText grow={false}>
<p>
<p
data-test-subj={`upgradeAssistant${
checkupLabel.charAt(0).toUpperCase() + checkupLabel.slice(1)
}TabDetail`}
>
<FormattedMessage
id="xpack.upgradeAssistant.checkupTab.tabDetail"
defaultMessage="These {strongCheckupLabel} issues need your attention. Resolve them before upgrading to Elasticsearch {nextEsVersion}."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const OverviewTab: FunctionComponent<UpgradeAssistantTabProps> = (props)
<>
<EuiSpacer />

<EuiText grow={false}>
<EuiText data-test-subj="upgradeAssistantOverviewTabDetail" grow={false}>
<p>
<FormattedMessage
id="xpack.upgradeAssistant.overviewTab.tabDetail"
Expand Down
44 changes: 44 additions & 0 deletions x-pack/test/accessibility/apps/upgrade_assistant.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { FtrProviderContext } from '../ftr_provider_context';

export default function ({ getService, getPageObjects }: FtrProviderContext) {
const PageObjects = getPageObjects(['upgradeAssistant', 'common']);
const a11y = getService('a11y');
const testSubjects = getService('testSubjects');
const retry = getService('retry');

describe('Upgrade Assistant Home', () => {
before(async () => {
await PageObjects.upgradeAssistant.navigateToPage();
});

it('Overview Tab', async () => {
await retry.waitFor('Upgrade Assistant overview tab to be visible', async () => {
return testSubjects.exists('upgradeAssistantOverviewTabDetail');
});
await a11y.testAppSnapshot();
});

it('Cluster Tab', async () => {
await testSubjects.click('upgradeAssistantClusterTab');
await retry.waitFor('Upgrade Assistant Cluster tab to be visible', async () => {
return testSubjects.exists('upgradeAssistantClusterTabDetail');
});
await a11y.testAppSnapshot();
});

it('Indices Tab', async () => {
await testSubjects.click('upgradeAssistantIndicesTab');
await retry.waitFor('Upgrade Assistant Cluster tab to be visible', async () => {
return testSubjects.exists('upgradeAssistantIndexTabDetail');
});
await a11y.testAppSnapshot();
});
});
}
1 change: 1 addition & 0 deletions x-pack/test/accessibility/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
require.resolve('./apps/index_lifecycle_management'),
require.resolve('./apps/ml'),
require.resolve('./apps/lens'),
require.resolve('./apps/upgrade_assistant'),
],

pageObjects,
Expand Down