Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addon Test: Show sub test provider toggle state in main testing module #30019

Merged
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
2 changes: 1 addition & 1 deletion code/addons/test/src/components/ContextMenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const ContextMenuItem: FC<{
padding="small"
disabled={state.crashed || isDisabled}
>
<Icon fill={theme.barTextColor} />
<Icon fill={theme.textMutedColor} />
</Button>
}
/>
Expand Down
2 changes: 1 addition & 1 deletion code/addons/test/src/components/Description.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const Wrapper = styled.div(({ theme }) => ({
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
fontSize: theme.typography.size.s1,
color: theme.barTextColor,
color: theme.textMutedColor,
}));

const PositiveText = styled.span(({ theme }) => ({
Expand Down
20 changes: 15 additions & 5 deletions code/addons/test/src/components/TestProviderRender.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ const StopIcon = styled(StopAltIcon)({
width: 10,
});

const ItemTitle = styled.span<{ enabled?: boolean }>(
({ enabled, theme }) =>
!enabled && {
color: theme.textMutedColor,
'&:after': {
content: '" (disabled)"',
},
}
);

const statusOrder: TestStatus[] = ['failed', 'warning', 'pending', 'passed', 'skipped'];
const statusMap: Record<TestStatus, ComponentProps<typeof TestStatusIcon>['status']> = {
failed: 'negative',
Expand Down Expand Up @@ -233,7 +243,7 @@ export const TestProviderRender: FC<
/>
<ListItem
as="label"
title="Coverage"
title={<ItemTitle enabled={config.coverage}>Coverage</ItemTitle>}
icon={<ShieldIcon color={theme.textMutedColor} />}
right={
<Checkbox
Expand All @@ -247,7 +257,7 @@ export const TestProviderRender: FC<
{isA11yAddon && (
<ListItem
as="label"
title="Accessibility"
title={<ItemTitle enabled={config.a11y}>Accessibility</ItemTitle>}
icon={<AccessibilityIcon color={theme.textMutedColor} />}
right={
<Checkbox
Expand Down Expand Up @@ -285,7 +295,7 @@ export const TestProviderRender: FC<
/>
{coverageSummary ? (
<ListItem
title="Coverage"
title={<ItemTitle enabled={config.coverage}>Coverage</ItemTitle>}
href={'/coverage/index.html'}
// @ts-expect-error ListItem doesn't include all anchor attributes in types, but it is an achor element
target="_blank"
Expand All @@ -300,13 +310,13 @@ export const TestProviderRender: FC<
/>
) : (
<ListItem
title="Coverage"
title={<ItemTitle enabled={config.coverage}>Coverage</ItemTitle>}
icon={<TestStatusIcon status="unknown" aria-label={`status: unknown`} />}
/>
)}
{isA11yAddon && (
<ListItem
title="Accessibility"
title={<ItemTitle enabled={config.a11y}>Accessibility</ItemTitle>}
onClick={
(a11yStatus === 'negative' || a11yStatus === 'warning') && a11yResults.length
? () => {
Expand Down
2 changes: 1 addition & 1 deletion code/core/src/components/components/Loader/Loader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const ProgressBar = styled.div(({ theme }) => ({
const ProgressMessage = styled.div(({ theme }) => ({
minHeight: '2em',
fontSize: `${theme.typography.size.s1}px`,
color: theme.barTextColor,
color: theme.textMutedColor,
}));

const ErrorIcon = styled(LightningOffIcon)(({ theme }) => ({
Expand Down
2 changes: 1 addition & 1 deletion code/core/src/components/components/tooltip/ListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const Title = styled(({ active, loading, disabled, ...rest }: TitleProps) => <sp
({ disabled, theme }) =>
disabled
? {
color: transparentize(0.7, theme.color.defaultText),
color: theme.textMutedColor,
}
: {}
);
Expand Down
2 changes: 1 addition & 1 deletion code/core/src/manager/components/sidebar/LegacyRender.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const TitleWrapper = styled.div<{ crashed?: boolean }>(({ crashed, theme }) => (

const DescriptionWrapper = styled.div(({ theme }) => ({
fontSize: theme.typography.size.s1,
color: theme.barTextColor,
color: theme.textMutedColor,
}));

const Progress = styled(ProgressSpinner)({
Expand Down
2 changes: 1 addition & 1 deletion code/core/src/manager/components/sidebar/SearchResults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const NoResults = styled.div(({ theme }) => ({
lineHeight: `18px`,
color: theme.color.defaultText,
small: {
color: theme.barTextColor,
color: theme.textMutedColor,
fontSize: `${theme.typography.size.s1}px`,
},
}));
Expand Down
Loading