Steps to reproduce
- Build up a Recent Items history by visiting different objects (Contacts, Cases, etc.)
- Create at least 10 objects during a test run (see example code below)
- Initiate a test run
- Wait for test run to finish
- Visit the Home tab
Expected: Recent Items remains unchanged
Actual: Recent Items is cleared
@isTest public class ExampleClassTest {
@isTest
public static void testRecentItemsBug() {
for(Integer i = 0; i < 10; i++){
Contact c = new Contact(LastName = 'Test' + String.valueOf(i), Email = 'test' + String.valueOf(i) + '@test.com');
insert c;
}
}
}