Page layouts vary by profile + record type. Testing confirms users see right layout.
Approach:
- Login as each affected profile.
- Navigate to records of each record type.
- Verify expected fields visible.
- Verify expected related lists.
- Verify expected buttons.
For Lightning Record Pages:
- Confirm right Lightning Record Page renders for App + Record Type + Profile combination.
Apex tests: limited — page layouts are config, not code. Use UI tests.
Provar / Cypress: javascript test('Sales Rep sees correct layout', async () => { await loginAs('sales-rep'); await navigateTo('/account/recordType=B2B/123'); await assertVisible('Account.Annual_Revenue__c'); await assertVisible('Related: Opportunities'); await assertNotVisible('Account.Internal_Notes__c'); // hidden for sales rep });
Common pitfalls:
- Not testing per-profile.
- Not testing per-record-type.
- Lightning Record Page assignments overlooked.
Senior insight: layout assignments break silently. Periodic verification matters.
