{
await expect.element(page.getByText(/Wählen Sie zwei Personen aus/i)).toBeInTheDocument();
});
- it('does not show the swap button when no persons are selected', async () => {
+ it('hides the swap button when no persons are selected', async () => {
render(Page, { data: baseData });
- await expect.element(page.getByTestId('conv-swap-btn')).not.toBeInTheDocument();
+ // Button is always in the DOM (holds grid column width on desktop) but made invisible
+ await expect.element(page.getByTestId('conv-swap-btn')).toHaveClass('invisible');
});
it('does not show the new document link when no persons are selected', async () => {
@@ -76,7 +77,7 @@ describe('Conversations page – no results', () => {
describe('Conversations page – swap button', () => {
it('shows the swap button when both persons are selected', async () => {
render(Page, { data: withPersons });
- await expect.element(page.getByTestId('conv-swap-btn')).toBeInTheDocument();
+ await expect.element(page.getByTestId('conv-swap-btn')).not.toHaveClass('invisible');
});
it('calls goto with swapped sender and receiver when clicked', async () => {