Does a child have to visit a parent who is not home and boyfriend has to care for the child?

If it was planned the parent would not be home all day, no. But if we are talking about babysitting for a few hours until they come home from work this should not be an issue.

You should discuss the situation with your attorney. If the parent is not present during their scheduled visitations with the child then perhaps the visitation schedule should be modified.