f48cb7e249
- Bumped NEXT_PUBLIC_APP_VERSION to 2.0.3 for the latest release. - Improved Cypress test for customer feedback page to handle delayed route transitions. - Refactored CompanyDetailsPage to enhance layout and added new components for better structure. - Updated TenderDetails to conditionally render location and currency information based on validity checks. - Added data-cy attributes to various form elements and tables for improved testing capabilities.
46 lines
1.1 KiB
TypeScript
46 lines
1.1 KiB
TypeScript
export type CompanyCategoryRow = {
|
|
id: string;
|
|
name: string;
|
|
description: string;
|
|
published: boolean;
|
|
created_at: number;
|
|
updated_at: number;
|
|
published_at: number;
|
|
thumbnail: string;
|
|
};
|
|
|
|
export const makeCompanyCategory = (
|
|
overrides: Partial<CompanyCategoryRow> = {},
|
|
index = 1,
|
|
): CompanyCategoryRow => ({
|
|
id: `507f1f77bcf86cd7994390${(10 + index).toString().padStart(2, "0")}`,
|
|
name: `E2E Category ${index}`,
|
|
description: "This is a sufficiently long description for category rows and forms.",
|
|
published: false,
|
|
created_at: 1_700_000_000 + index,
|
|
updated_at: 1_700_000_000 + index,
|
|
published_at: 0,
|
|
thumbnail: "",
|
|
...overrides,
|
|
});
|
|
|
|
export const categoriesListResponse = (categories: CompanyCategoryRow[]) => ({
|
|
success: true,
|
|
message: "ok",
|
|
data: { categories },
|
|
});
|
|
|
|
export const categoryDetailsResponse = (data: {
|
|
name: string;
|
|
description: string;
|
|
thumbnail?: string;
|
|
}) => ({
|
|
success: true,
|
|
message: "ok",
|
|
data: {
|
|
name: data.name,
|
|
description: data.description,
|
|
thumbnail: data.thumbnail ?? "",
|
|
},
|
|
});
|