Allow users to set where new fields must be created in a record page layout (#18420)

## Demo


https://github.com/user-attachments/assets/eaf89d0c-96e0-4e49-ac58-290c8e7403ff
This commit is contained in:
Baptiste Devessier
2026-03-06 14:04:57 +01:00
committed by GitHub
parent d37ed7e07c
commit a79b816117
19 changed files with 579 additions and 15 deletions
@@ -0,0 +1,38 @@
import { isValidReturnToPath } from '@/auth/utils/isValidReturnToPath';
describe('isValidReturnToPath', () => {
it('should return false for empty string', () => {
expect(isValidReturnToPath('')).toBe(false);
});
it('should return false for root path', () => {
expect(isValidReturnToPath('/')).toBe(false);
});
it('should return false for paths not starting with slash', () => {
expect(isValidReturnToPath('objects/people')).toBe(false);
});
it('should return false for double-slash paths', () => {
expect(isValidReturnToPath('//evil.com')).toBe(false);
});
it('should return false for onboarding paths', () => {
expect(isValidReturnToPath('/create/workspace')).toBe(false);
expect(isValidReturnToPath('/create/profile')).toBe(false);
});
it('should return false for sign-in paths', () => {
expect(isValidReturnToPath('/welcome')).toBe(false);
expect(isValidReturnToPath('/verify')).toBe(false);
});
it('should return false for reset-password paths', () => {
expect(isValidReturnToPath('/reset-password')).toBe(false);
});
it('should return true for valid application paths', () => {
expect(isValidReturnToPath('/objects/people')).toBe(true);
expect(isValidReturnToPath('/settings/accounts')).toBe(true);
});
});