Clean up portal integration tests and add a test for item history