f397158a29
- Updated Cypress tests for the tender translation page to improve visibility checks and streamline assertions. - Refactored test structure to utilize a dedicated function for fetching the visible title heading. - Adjusted test cases to ensure accurate language switching and URL handling for tender details. - Improved layout consistency in the translation page by refining element visibility checks and ensuring proper section rendering.
28 lines
983 B
TypeScript
28 lines
983 B
TypeScript
import type { TTenderDetails } from "@/lib/api/types/Tenders";
|
|
import { HEADER_SCROLL_MARGIN, TENDER_SECTION_IDS } from "../constants";
|
|
import { SectionHeading } from "./section-heading";
|
|
|
|
type TenderTranslationSectionProps = {
|
|
tender: TTenderDetails;
|
|
};
|
|
|
|
export function TenderTranslationSection({
|
|
tender,
|
|
}: TenderTranslationSectionProps) {
|
|
return (
|
|
<div id={TENDER_SECTION_IDS.translation} className={HEADER_SCROLL_MARGIN}>
|
|
<SectionHeading>Translation</SectionHeading>
|
|
<div className="grid gap-4 sm:grid-cols-2">
|
|
<div className="rounded-2xl border border-stroke/60 bg-gray-2/40 p-6 shadow-inner dark:border-dark-3 dark:bg-dark-3/30">
|
|
<p className="mb-2 text-xs font-semibold uppercase tracking-wide text-dark-5 dark:text-dark-6">
|
|
Resolved language
|
|
</p>
|
|
<p className="text-sm text-dark dark:text-white">
|
|
{tender.language || "original"}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|