Skip to content

Commit

Permalink
[Uptime] Unskip Uptime a11y tests (elastic#208399)
Browse files Browse the repository at this point in the history
## Summary

Resolves elastic#154003.

Unskip a11y uptime tests.
  • Loading branch information
justinkambic authored Feb 6, 2025
1 parent a990be6 commit ac5012b
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 84 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ export const PingHistogramComponent: React.FC<PingHistogramComponentProps> = ({
});

content = (
<ChartWrapper
height={height}
loading={loading}
<div
aria-label={i18n.translate('xpack.uptime.snapshotHistogram.description', {
defaultMessage:
'Bar Chart showing uptime status over time from {startTime} to {endTime}.',
Expand All @@ -137,58 +135,60 @@ export const PingHistogramComponent: React.FC<PingHistogramComponentProps> = ({
},
})}
>
<Chart>
<Settings
xDomain={{
minInterval,
min: absoluteStartDate,
max: absoluteEndDate,
}}
showLegend={false}
onBrushEnd={onBrushEnd}
onElementClick={onBarClicked}
locale={i18n.getLocale()}
baseTheme={baseTheme}
/>
<Axis
id={i18n.translate('xpack.uptime.snapshotHistogram.xAxisId', {
defaultMessage: 'Ping X Axis',
})}
position={Position.Bottom}
showOverlappingTicks={false}
tickFormat={timeFormatter(getChartDateLabel(absoluteStartDate, absoluteEndDate))}
/>
<Axis
id={i18n.translate('xpack.uptime.snapshotHistogram.yAxisId', {
defaultMessage: 'Ping Y Axis',
})}
position="left"
tickFormat={(d) => numeral(d).format('0')}
labelFormat={(d) => numeral(d).format('0a')}
title={i18n.translate('xpack.uptime.snapshotHistogram.yAxis.title', {
defaultMessage: 'Pings',
description:
'The label on the y-axis of a chart that displays the number of times Heartbeat has pinged a set of services/websites.',
})}
/>

<BarSeries
color={[danger, gray]}
data={barData}
id={STATUS_DOWN_LABEL}
name={i18n.translate('xpack.uptime.snapshotHistogram.series.pings', {
defaultMessage: 'Monitor Pings',
})}
stackAccessors={['x']}
splitSeriesAccessors={['type']}
timeZone={timeZone}
xAccessor="x"
xScaleType={ScaleType.Time}
yAccessors={['y']}
yScaleType={ScaleType.Linear}
/>
</Chart>
</ChartWrapper>
<ChartWrapper height={height} loading={loading}>
<Chart>
<Settings
xDomain={{
minInterval,
min: absoluteStartDate,
max: absoluteEndDate,
}}
showLegend={false}
onBrushEnd={onBrushEnd}
onElementClick={onBarClicked}
locale={i18n.getLocale()}
baseTheme={baseTheme}
/>
<Axis
id={i18n.translate('xpack.uptime.snapshotHistogram.xAxisId', {
defaultMessage: 'Ping X Axis',
})}
position={Position.Bottom}
showOverlappingTicks={false}
tickFormat={timeFormatter(getChartDateLabel(absoluteStartDate, absoluteEndDate))}
/>
<Axis
id={i18n.translate('xpack.uptime.snapshotHistogram.yAxisId', {
defaultMessage: 'Ping Y Axis',
})}
position="left"
tickFormat={(d) => numeral(d).format('0')}
labelFormat={(d) => numeral(d).format('0a')}
title={i18n.translate('xpack.uptime.snapshotHistogram.yAxis.title', {
defaultMessage: 'Pings',
description:
'The label on the y-axis of a chart that displays the number of times Heartbeat has pinged a set of services/websites.',
})}
/>

<BarSeries
color={[danger, gray]}
data={barData}
id={STATUS_DOWN_LABEL}
name={i18n.translate('xpack.uptime.snapshotHistogram.series.pings', {
defaultMessage: 'Monitor Pings',
})}
stackAccessors={['x']}
splitSeriesAccessors={['type']}
timeZone={timeZone}
xAccessor="x"
xScaleType={ScaleType.Time}
yAccessors={['y']}
yScaleType={ScaleType.Linear}
/>
</Chart>
</ChartWrapper>
</div>
);
}

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 @@ -133,7 +133,9 @@ export const MonitorStatusBar: React.FC = () => {
<MonitorRedirects monitorStatus={monitorStatus} />
<EuiDescriptionListTitle>{ENABLE_STATUS_ALERT}</EuiDescriptionListTitle>
{selectedMonitor && (
<EnableMonitorAlert monitorId={monitorId} selectedMonitor={selectedMonitor} />
<dd>
<EnableMonitorAlert monitorId={monitorId} selectedMonitor={selectedMonitor} />
</dd>
)}
</EuiDescriptionList>
</>
Expand Down
8 changes: 5 additions & 3 deletions x-pack/test/accessibility/apps/group1/uptime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const es = getService('es');
const toasts = getService('toasts');

// github.com/elastic/kibana/issues/153601
describe.skip('uptime Accessibility', () => {
describe('uptime Accessibility', () => {
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/uptime/blank');
await makeChecks(es, A11Y_TEST_MONITOR_ID, 150, 1, 1000, {
Expand Down Expand Up @@ -55,7 +54,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

it('overview page with expanded monitor detail', async () => {
await uptimeService.overview.expandMonitorDetail(A11Y_TEST_MONITOR_ID);
await uptimeService.overview.openIntegrationsPopoverForMonitor(A11Y_TEST_MONITOR_ID);
await uptimeService.overview.openIntegrationsPopoverForMonitor(
A11Y_TEST_MONITOR_ID,
'uptime'
);
await a11y.testAppSnapshot();
});

Expand Down
4 changes: 2 additions & 2 deletions x-pack/test/functional/services/uptime/overview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export function UptimeOverviewProvider({ getService }: FtrProviderContext) {
async expandMonitorDetail(id: string): Promise<void> {
return testSubjects.click(`xpack.synthetics.monitorList.${id}.expandMonitorDetail`);
},
async openIntegrationsPopoverForMonitor(id: string): Promise<void> {
return testSubjects.click(`xpack.synthetics.monitorList.actionsPopover.${id}`);
async openIntegrationsPopoverForMonitor(id: string, plugin = 'synthetics'): Promise<void> {
return testSubjects.click(`xpack.${plugin}.monitorList.actionsPopover.${id}`);
},
async openAlertsPopover(): Promise<void> {
return testSubjects.click('xpack.synthetics.alertsPopover.toggleButton');
Expand Down

0 comments on commit ac5012b

Please sign in to comment.