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 2 commits
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
74 changes: 36 additions & 38 deletions cfme/tests/infrastructure/test_snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,42 @@ def test_snapshot_history_btn(create_vm, provider):
assert snapshot_view.is_displayed


@pytest.mark.tier(1)
@pytest.mark.meta(automates=[1395116])
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
Bugzilla:
1395116
"""
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 2 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 Expand Up @@ -686,44 +722,6 @@ def test_snapshot_tree_view_functionality():
pass


@pytest.mark.manual
@pytest.mark.provider([VMwareProvider])
@pytest.mark.tier(1)
@pytest.mark.meta(coverage=[1395116])
def test_snapshot_link_after_deleting_snapshot():
"""
test snapshot link in vm summary page after deleting snapshot
Have a vm, create couple of snapshots. Delete one snapshot. From the
vm summary page use the history button and try to go back to
snapshots. Go to the vm summary page again and try to click snapshots
link, it should work.

Polarion:
assignee: prichard
casecomponent: Infra
caseimportance: medium
initialEstimate: 1/6h
setup:
1. Add vmware provider
2. Create testing VM
testSteps:
digitronik marked this conversation as resolved.
Show resolved Hide resolved
1. Create two snapshots
2. Delete one snapshot
3. Use history button to navigate back to VM summary page
4. From the vm summary page use the history button and try to go back to snapshots.
5. From vm summary page click the snapshot link
expectedResults:
1. Snapshots successfully created
2. Snapshot successfully deleted
3. VM summary page displayed
4. Snapshots page displayed
5. Snapshots page displayed
Bugzilla:
1395116
"""
pass


@pytest.mark.manual
@pytest.mark.provider([VMwareProvider])
@test_requirements.ssui
Expand Down