Skip to content
Open
Show file tree
Hide file tree
Changes from all 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 @@ -51,9 +51,6 @@ test.describe('Test Quick Start plugin', () => {
page,
testInfo,
'quick-start-accessibility.json',
{
skipViolationsAssert: true,
},
);

// Click and verify setupAuthentication step
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ test.describe('Test Quick Start plugin', () => {
page,
testInfo,
'quick-start-user-accessibility.json',
{ skipViolationsAssert: true },
);

await uiHelper.verifyText(translations.header.subtitle);
Expand Down
13 changes: 4 additions & 9 deletions workspaces/quickstart/e2e-tests/utils/accessibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ export async function runAccessibilityTests(
page: Page,
testInfo: TestInfo,
attachName = 'accessibility-scan-results.json',
options: { skipViolationsAssert?: boolean; attachName?: string } = {
skipViolationsAssert: false,
},
) {
const accessibilityScanResults = await new AxeBuilder({ page })
.withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa'])
Expand All @@ -33,10 +30,8 @@ export async function runAccessibilityTests(
contentType: 'application/json',
});

if (!options?.skipViolationsAssert) {
expect(
accessibilityScanResults.violations,
'Accessibility violations found',
).toEqual([]);
}
expect(
accessibilityScanResults.violations,
'Accessibility violations found',
).toEqual([]);
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ describe('Quickstart', () => {

// Complete first admin item
const expandButtons = screen.getAllByRole('button', {
name: /expand item/i,
name: /expand .+ details/i,
});
fireEvent.click(expandButtons[0]);

Expand Down Expand Up @@ -131,7 +131,7 @@ describe('Quickstart', () => {

// Complete first developer item
const expandButtons = screen.getAllByRole('button', {
name: /expand item/i,
name: /expand .+ details/i,
});
fireEvent.click(expandButtons[0]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ describe('QuickstartContent', () => {
);

const expandIcon1 = screen.getAllByRole('button', {
name: /expand item/i,
name: /expand .+ details/i,
})[0];
const expandIcon2 = screen.getAllByRole('button', {
name: /expand item/i,
name: /expand .+ details/i,
})[1];

fireEvent.click(expandIcon1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ describe('QuickstartItem)', () => {
).toBeInTheDocument();
});

it('calls handleOpen when expand/collapse icon is clicked', async () => {
it('calls handleOpen when the item row is clicked', async () => {
await renderItem(false);
const toggleBtn = screen.getByRole('button', {
name: /expand item/i,
name: /expand test step details/i,
});
fireEvent.click(toggleBtn);
expect(mockHandleOpen).toHaveBeenCalled();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import ListItemText from '@mui/material/ListItemText';
import { useEffect, useState } from 'react';
import { QuickstartItemIcon } from './QuickstartItemIcon';
import { QuickstartCtaLink } from './QuickstartCtaLink';
import IconButton from '@mui/material/IconButton';
import { QuickstartItemData } from '../../types';
import { useTranslation } from '../../hooks/useTranslation';
import { getTranslatedTextWithFallback } from '../../utils';
Expand Down Expand Up @@ -121,20 +120,20 @@ export const QuickstartItem = ({
: { color: theme => theme.palette.text.secondary }),
}}
/>
<IconButton
aria-label={
open
? t('item.collapseButtonAriaLabel')
: t('item.expandButtonAriaLabel')
}
<Box
component="span"
aria-hidden="true"
sx={{
display: 'flex',
alignItems: 'center',
padding: '8px',
...(open
? { color: theme => theme.palette.text.primary }
: { color: theme => theme.palette.text.secondary }),
}}
>
{open ? <ExpandLess /> : <ExpandMore />}
</IconButton>
</Box>
</ListItem>
<Collapse in={open} timeout="auto" unmountOnExit>
<List
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ export const QuickstartFooter = ({

return (
<Box>
<LinearProgress variant="determinate" value={progress} />
<LinearProgress
variant="determinate"
value={progress}
aria-label={t('footer.progressBarAriaLabel')}
/>
<Box
sx={{
display: 'flex',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const quickstartTranslationDe = createTranslationMessages({
'footer.hide': 'Verstecken',
'footer.notStarted': 'Nicht gestartet',
'footer.progress': '{{progress}}% Fortschritt',
'footer.progressBarAriaLabel': 'Schnellstart-Fortschritt',
'header.subtitle': 'Wir führen Sie durch einige kurze Schritte.',
'header.title': "Los geht's mit dem Developer Hub!",
'item.collapseAriaLabel': 'Details zum Ausblenden von {{title}}',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const quickstartTranslationEs = createTranslationMessages({
'footer.hide': 'Ocultar',
'footer.notStarted': 'No iniciado',
'footer.progress': 'Progreso del {{progress}} %',
'footer.progressBarAriaLabel': 'Progreso de inicio rápido',
'header.subtitle': 'Aquí le explicamos algunos pasos rápidos',
'header.title': 'Empecemos con Developer Hub',
'item.collapseAriaLabel': 'Contraer detalles de {{title}}',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const quickstartTranslationFr = createTranslationMessages({
'footer.hide': 'Masquer',
'footer.notStarted': 'Non démarré',
'footer.progress': '{{progress}}% de progression',
'footer.progressBarAriaLabel': 'Progression du démarrage rapide',
'header.subtitle':
'Nous allons vous guider à travers quelques étapes rapides.',
'header.title': 'Commençons par le Developer Hub',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const quickstartTranslationIt = createTranslationMessages({
'footer.hide': 'Nascondi',
'footer.notStarted': 'Non avviato',
'footer.progress': '{{progress}}% di progresso',
'footer.progressBarAriaLabel': 'Avanzamento avvio rapido',
'header.subtitle': 'Ti guideremo attraverso alcuni semplici passaggi',
'header.title': 'Iniziamo a usare Developer Hub',
'item.collapseAriaLabel': 'Comprimi i dettagli di {{title}}',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const quickstartTranslationJa = createTranslationMessages({
'footer.hide': '非表示',
'footer.notStarted': '開始されていません',
'footer.progress': '進捗 {{progress}}%',
'footer.progressBarAriaLabel': 'クイックスタートの進捗',
'header.subtitle': 'いくつかの簡単なステップをご案内します',
'header.title': 'Developer Hub を使い始めましょう',
'item.collapseAriaLabel': '{{title}} の詳細を折りたたむ',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export const quickstartMessages = {
progress: '{{progress}}% progress',
notStarted: 'Not started',
hide: 'Hide',
progressBarAriaLabel: 'Quick start progress',
},
content: {
emptyState: {
Expand Down
Loading