feat: enhance checkout process with purchase editing and status handling
- Implemented purchase editing functionality in CheckoutPageComponent, allowing users to modify items in their purchase. - Added a new guard (checkoutPendingPurchaseGuard) to prevent navigation away from the checkout page while a purchase is in progress. - Updated the login page to handle return URLs after authentication. - Enhanced product detail page to support direct purchases with a new buyNow method. - Introduced new UI elements and logic to handle purchase status, including expired and rejected states in PurchaseStatusPageComponent. - Improved cart component to allow editing of item quantities with a toggle button. - Added quantity selector enhancements to disable controls when necessary. - Updated tests to cover new functionalities and ensure proper behavior of components.
This commit is contained in:
@@ -235,7 +235,7 @@ describe('app routes', () => {
|
||||
it('redirects unauthenticated users from /checkout to /login', async () => {
|
||||
const { router } = await renderAppAt('/checkout', createTenantServiceStub(), createAuthServiceStub(false));
|
||||
|
||||
expect(router.url).toBe('/login');
|
||||
expect(router.url).toBe('/login?returnUrl=%2Fcheckout');
|
||||
});
|
||||
|
||||
it('allows authenticated users to access /checkout', async () => {
|
||||
|
||||
Reference in New Issue
Block a user