cypress-bootstrap
Version:
Cypress Bootstrap is a project scaffolding tool that sets up a Cypress automation framework with a standardized folder structure and Page Object Model (POM) design. It helps teams quickly start testing with built-in best practices and sample specs.
19 lines (14 loc) • 698 B
text/typescript
/**
* Since this is just a sample test framework, we have two different base URLs, for UI and API. Hence, I am setting the full URL here.
*/
const apiBase = process.env.API_BASE_URL || 'http://localhost:3000';
export const apiEndpoints = {
customers: `${apiBase}/customers`,
customerById: (id: string) => `${apiBase}/customers/${id}`,
subscriptions: `${apiBase}/subscriptions`,
subscriptionById: (id: string) => `${apiBase}/subscriptions/${id}`,
products: `${apiBase}/products`,
productById: (id: string) => `${apiBase}/products/${id}`,
productTypes: `${apiBase}/product-types`,
productTypeById: (id: string) => `${apiBase}/product-types/${id}`,
} as const;