fix(frontend): separate mobile back-to-top control
Deploy Canina / deploy (push) Successful in 2m7s

This commit is contained in:
devops committed 2026-10-17 07:44:07 +00:00
1 parent 5afa2a37be
commit 87ad359e60
2 files changed
+12 -1

No files matched your search

@@ -25,4 +25,15 @@ describe('Footer', () => {
const trustLink = screen.getByText('نمادهای اعتماد و مجوزهای رسمی').closest('a');
expect(trustLink).toHaveAttribute('href', '/trust-seals');
});
it('keeps the mobile back-to-top control above the support launcher and bottom nav', () => {
render(<Footer onB2BOpen={vi.fn()} />);
Object.defineProperty(window, 'scrollY', { configurable: true, value: 500 });
fireEvent.scroll(window);
const backToTop = screen.getByTitle('بازگشت به بالای صفحه');
expect(backToTop.className).toContain('bottom-36');
expect(backToTop.className).toContain('sm:bottom-8');
});
});