import { mockCurrentUser, mockLoggedInUser } from '../../../../../helpers/testMocks';
import { renderApp } from '../../../../../helpers/testReactTestingUtils';
import { AlmKeys } from '../../../../../types/alm-settings';
+import { ComponentQualifier } from '../../../../../types/component';
import { Feature } from '../../../../../types/features';
import { BranchStatusContext } from '../../../branch-status/BranchStatusContext';
import { Header, HeaderProps } from '../Header';
currentUser: mockLoggedInUser(),
component: mockComponent({
configuration: { showSettings: true },
- breadcrumbs: [{ name: 'project', key: 'project', qualifier: 'TRK' }],
+ breadcrumbs: [{ name: 'project', key: 'project', qualifier: ComponentQualifier.Project }],
}),
});
await user.click(screen.getByRole('button', { name: 'branch-1 overview.quality_gate_x.OK' }));
currentUser: mockLoggedInUser(),
component: mockComponent({
configuration: { showSettings: true },
- breadcrumbs: [{ name: 'project', key: 'project', qualifier: 'APP' }],
+ breadcrumbs: [{ name: 'project', key: 'project', qualifier: ComponentQualifier.Application }],
qualifier: 'APP',
}),
branchLikes: [mockMainBranch()],
<Header
branchLikes={branchLikes}
component={mockComponent({
- breadcrumbs: [{ name: 'project', key: 'project', qualifier: 'TRK' }],
+ breadcrumbs: [{ name: 'project', key: 'project', qualifier: ComponentQualifier.Project }],
})}
currentBranchLike={branchLikes[0]}
currentUser={mockCurrentUser()}
import { translateWithParameters } from '../../../../../helpers/l10n';
import { formatMeasure } from '../../../../../helpers/measures';
import { BranchLike } from '../../../../../types/branch-like';
+import { MetricType } from '../../../../../types/metrics';
import { Component } from '../../../../../types/types';
import { BranchStatusContext } from '../../../branch-status/BranchStatusContext';
return null;
}
const { status } = branchStatus;
- const formatted = formatMeasure(status, 'LEVEL');
+ const formatted = formatMeasure(status, MetricType.Level);
const ariaLabel = translateWithParameters('overview.quality_gate_x', formatted);
return (
<div className={classNames(className, `it__level-${status}`)}>