Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

[1LP][RFR] Add test_snapshot_link_after_delete #10187

Merged
merged 4 commits into from
Jun 18, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions cfme/tests/infrastructure/test_snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,39 @@ def test_snapshot_history_btn(create_vm, provider):
assert snapshot_view.is_displayed


def test_snapshot_link_after_delete(create_vm, provider):
john-dupuy marked this conversation as resolved.
Show resolved Hide resolved
"""Tests snapshot link and history button after delete
Metadata:
test_flag: snapshot

Polarion:
assignee: prichard
casecomponent: Infra
caseimportance: medium
initialEstimate: 1/6h
"""
has_name = not provider.one_of(RHEVMProvider)
snapshot1 = new_snapshot(create_vm, has_name=has_name)
snapshot1.create()
snapshot2 = new_snapshot(create_vm, has_name=has_name)
snapshot2.create()
snapshot1.delete()
john-dupuy marked this conversation as resolved.
Show resolved Hide resolved
# snap 1 will be the active so we'd be testing a negative case for rhv(rhv should not allow
# deletion of active snap).
snapshot_view = navigate_to(create_vm, 'SnapshotsAll')
back_to_vm_item = f'VM and Instance "{create_vm.name}"'
snapshot_view.toolbar.history.item_select(back_to_vm_item)
vm_details_view = navigate_to(create_vm, 'Details') # no nav should be needed.
snapshot_item = f'"Snapshots" for Virtual Machine "{create_vm.name}"'
vm_details_view.toolbar.history.item_select(snapshot_item)
snapshot_view = create_vm.create_view(InfraVmSnapshotView)
assert snapshot_view.is_displayed
# Now go back to Datails and click on the snapshots link ?Do I want to use history button here?
vm_details_view = navigate_to(create_vm, 'Details')
vm_details_view.entities.summary('Properties').click_at("Snapshots")
assert snapshot_view.is_displayed


@pytest.mark.provider([VMwareProvider])
def test_create_snapshot_via_ae(appliance, request, domain, create_vm):
"""This test checks whether the vm.create_snapshot works in AE.
Expand Down