chore: address review feedback - consistent style, spec accuracy, test regex

This commit is contained in:
Sergey Krylov 2026-06-17 13:50:36 +03:00
parent cc8ff0a088
commit 0517501415
3 changed files with 6 additions and 6 deletions

View File

@ -64,7 +64,7 @@ function OperationInstrument({ operation }: { operation: BrokerOperation }) {
return <Link to={path}>{label}</Link>;
}
const pagButtonStyle: React.CSSProperties = {
const pagButtonStyle = {
padding: '6px 14px',
borderRadius: 6,
border: '1px solid #e0e0e0',
@ -74,13 +74,13 @@ const pagButtonStyle: React.CSSProperties = {
fontWeight: 600,
cursor: 'pointer',
lineHeight: 1.4,
};
} satisfies React.CSSProperties;
const pagButtonDisabledStyle: React.CSSProperties = {
const pagButtonDisabledStyle = {
...pagButtonStyle,
opacity: 0.35,
cursor: 'not-allowed',
};
} satisfies React.CSSProperties;
export function BrokerOperationsTable({
isLoading,

View File

@ -311,7 +311,7 @@ describe('Broker pages', () => {
expect(screen.getByText('Выплата купона')).toBeInTheDocument();
expect(screen.getByText('Налог')).toBeInTheDocument();
expect(screen.getByText(/\+120,00\s*[Р]/)).toBeInTheDocument();
expect(screen.getByText(/\+120,00\s*₽/)).toBeInTheDocument();
expect(screen.getByRole('link', { name: 'SU26238RMFS5' })).toHaveAttribute(
'href',
'/bonds/SU26238RMFS5',

View File

@ -22,7 +22,7 @@
- Компонент `OperationType` (строки 87-108)
- Объект `impactStyles` (строки 30-47)
- Импорт `getBrokerOperationImpactLabel` (не используется больше)
- Импорт `type BrokerOperationImpact` (не используется больше)
- Импорт `type BrokerOperationImpact` не удаляется — он всё ещё используется в сигнатуре `moneyColor(impact: BrokerOperationImpact)`
**Сохраняется:**
- `getBrokerOperationImpact()` — всё ещё нужна для `moneyColor()` (цвет суммы)