feat: implement project development module, transfer management features, and industrial AVM model integration

This commit is contained in:
Ho Ngoc Hai
2026-04-18 20:34:35 +07:00
parent 0f3b4d7b0d
commit 38b9def99a
66 changed files with 9051 additions and 17 deletions

View File

@@ -0,0 +1,21 @@
import { render, screen, fireEvent } from '@testing-library/react';
import { describe, expect, it } from 'vitest';
import { SocialShare } from '../social-share';
describe('SocialShare', () => {
it('renders Facebook, Zalo and copy-link actions', () => {
render(<SocialShare listingId="abc-123" listingTitle="Căn hộ mẫu" />);
expect(screen.getByLabelText('Chia sẻ lên Facebook')).toBeInTheDocument();
expect(screen.getByLabelText('Chia sẻ lên Zalo')).toBeInTheDocument();
expect(screen.getByLabelText('Sao chép liên kết')).toBeInTheDocument();
});
it('shows the backend QR code image when toggled on', () => {
render(<SocialShare listingId="abc-123" listingTitle="Căn hộ mẫu" />);
const toggle = screen.getByLabelText('Hiện mã QR');
fireEvent.click(toggle);
const img = screen.getByAltText('Mã QR cho Căn hộ mẫu') as HTMLImageElement;
expect(img).toBeInTheDocument();
expect(img.src).toContain('/listings/abc-123/qr-code');
});
});