test(ui): align markets assertions with shared states
This commit is contained in:
parent
00d8683987
commit
8775eab371
@ -28,21 +28,20 @@ describe('MarketOpportunities Components', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
describe('TopVolatile', () => {
|
describe('TopVolatile', () => {
|
||||||
it('renders up/down classes and values correctly', () => {
|
it('renders positive and negative mover values correctly', () => {
|
||||||
render(<TopVolatile botState={mockBotState} />);
|
render(<TopVolatile botState={mockBotState} />);
|
||||||
|
|
||||||
expect(screen.getByText('BTC/USDT')).toBeInTheDocument();
|
expect(screen.getByText('BTC/USDT')).toBeInTheDocument();
|
||||||
expect(screen.getByText('+5.25%')).toBeInTheDocument();
|
expect(screen.getByText('+5.25%')).toBeInTheDocument();
|
||||||
expect(screen.getByText('+5.25%')).toHaveClass('up');
|
|
||||||
|
expect(screen.getByText('ETH/USDT')).toBeInTheDocument();
|
||||||
expect(screen.getByText('ETH/USDT')).toBeInTheDocument();
|
expect(screen.getByText('-2.10%')).toBeInTheDocument();
|
||||||
expect(screen.getByText('-2.10%')).toBeInTheDocument();
|
});
|
||||||
expect(screen.getByText('-2.10%')).toHaveClass('down');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('shows scanning when no symbols', () => {
|
it('shows scanning when no symbols', () => {
|
||||||
render(<TopVolatile botState={{ symbols: {} } as any} />);
|
render(<TopVolatile botState={{ symbols: {} } as any} />);
|
||||||
expect(screen.getByText('Waiting for live market ticks...')).toBeInTheDocument();
|
expect(screen.getByText('Waiting for live market ticks')).toBeInTheDocument();
|
||||||
|
expect(screen.getByText('Movers will appear as soon as the market stream starts publishing.')).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -64,7 +63,8 @@ describe('MarketOpportunities Components', () => {
|
|||||||
}
|
}
|
||||||
} as any;
|
} as any;
|
||||||
render(<AISetups botState={state} />);
|
render(<AISetups botState={state} />);
|
||||||
expect(screen.getByText('No AI confidence signals yet.')).toBeInTheDocument();
|
expect(screen.getByText('No AI confidence signals yet')).toBeInTheDocument();
|
||||||
|
expect(screen.getByText('High-confidence setups will appear after strategy rules publish analysis metadata.')).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user