add integration test for automatic staff context switching