diff --git a/cfme/infrastructure/virtual_machines.py b/cfme/infrastructure/virtual_machines.py index dc85c041f1..03a940f4f5 100644 --- a/cfme/infrastructure/virtual_machines.py +++ b/cfme/infrastructure/virtual_machines.py @@ -453,6 +453,18 @@ def is_displayed(self): self.context['object'].name in [row.name.text for row in self.affected_vms.rows()]) +class InfraVmOsView(InfraVmView): + """The Operating System page""" + title = Text('#explorer_title_text') + basic_information = SummaryTable(title="Basic Information") + + @property + def is_displayed(self): + name = self.context['object'].name + expected_title = f'"OS Info" for Virtual Machine "{name}"' + return self.in_infra_vms and self.title.text == expected_title + + class InfraVmSnapshotToolbar(View): """The toolbar on the snapshots page""" history = Dropdown('History') @@ -1528,6 +1540,15 @@ def resetter(self, *args, **kwargs): self.view.reset_page() +@navigator.register(InfraVm, 'OS Info') +class VmOsInfo(CFMENavigateStep): + VIEW = InfraVmOsView + prerequisite = NavigateToSibling('Details') + + def step(self, *args, **kwargs): + self.prerequisite_view.entities.summary('Properties').click_at('Operating System') + + @navigator.register(InfraTemplate, 'Details') @navigator.register(InfraVm, 'Details') class VmAllWithTemplatesDetails(CFMENavigateStep): diff --git a/cfme/tests/infrastructure/test_snapshot.py b/cfme/tests/infrastructure/test_snapshot.py index 8e7b8d70ed..e32f89a69e 100644 --- a/cfme/tests/infrastructure/test_snapshot.py +++ b/cfme/tests/infrastructure/test_snapshot.py @@ -228,9 +228,8 @@ def verify_revert_snapshot(full_test_vm, provider, soft_assert, register_event, assert ssh_client.run_command('test -e snapshot2.txt') == 1 -@pytest.mark.meta( - blockers=[BZ(1805803, unblock=lambda provider: not provider.one_of(RHEVMProvider), - ignore_bugs={1745065})], automates=[1805803]) +@pytest.mark.uncollectif(lambda provider: provider.one_of(RHEVMProvider), + reason="RHV providers blocked for BZ 1805803 marked WONTFIX") @pytest.mark.parametrize('create_vm', ['full_template'], indirect=True) def test_verify_revert_snapshot(create_vm, provider, soft_assert, register_event, request): """Tests revert snapshot @@ -241,14 +240,27 @@ def test_verify_revert_snapshot(create_vm, provider, soft_assert, register_event test_flag: snapshot, provision Bugzilla: - 1561618 + 1805803 Polarion: assignee: prichard casecomponent: Infra initialEstimate: 1/4h """ + # getting the initial value for OS details. + view = navigate_to(create_vm, 'Details') + os_text_initial = view.entities.summary('Properties').get_text_of('Operating System') verify_revert_snapshot(create_vm, provider, soft_assert, register_event, request) + # verify that the system info is displayed + view = navigate_to(create_vm, 'Details') + # check that the OS is in the field. + os_text_compare = view.entities.summary('Properties').get_text_of('Operating System') + assert os_text_compare == os_text_initial + os_view = navigate_to(create_vm, 'OS Info') + # check that the OS Info view is displayed and contains OS data + assert os_view.is_displayed + os_text_compare = view.entities.summary('Basic Information').get_text_of('Operating System') + assert os_text_compare == os_text_initial @pytest.mark.parametrize('create_vm', ['full_template'], indirect=True)