Refactor the overcloud views tests
Refactor the overcloud views tests

Move the repeated parts of tests to a separate function.

Change-Id: I45cd89b72857202a205609c65b3a9a545982beee

rdo-management/tuskar-ui,rdo-management/tuskar-ui,rdo-management/tuskar-ui,rdo-management/tuskar-ui