feat: Update poster dimensions to A4 size and enhance PDF generation tests
This commit is contained in:
@@ -49,13 +49,16 @@ describe.each([
|
||||
expect(screen.getByText(/تخصص دیگر/)).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("کادر ثابت ۱۰۸۰×۱۳۵۰ و overflow-hidden دستنخورده است", () => {
|
||||
// ۱۰۸۰×۱۵۲۷ همان نسبت A4 است (۲۱۰:۲۹۷). هر عدد دیگری یعنی PDF یا حاشیهٔ سفید
|
||||
// میگیرد یا از کاغذ بیرون میزند.
|
||||
it("کادر ثابت ۱۰۸۰×۱۵۲۷ با نسبت A4 و overflow-hidden دستنخورده است", () => {
|
||||
const { container } = render(<Component data={JAHANTAB} />);
|
||||
const frame = container.firstChild;
|
||||
|
||||
expect(frame.className).toContain("w-[1080px]");
|
||||
expect(frame.className).toContain("h-[1350px]");
|
||||
expect(frame.className).toContain("h-[1527px]");
|
||||
expect(frame.className).toContain("overflow-hidden");
|
||||
expect(1527 / 1080).toBeCloseTo(297 / 210, 2);
|
||||
});
|
||||
|
||||
it("خط زیرتخصص از بودجهٔ کاراکتر نمیگذرد", () => {
|
||||
|
||||
Reference in New Issue
Block a user