def test_snapshot_view(self):
     '''This test verifies the operations snapshot.
      ' Steps:
      1. Create new mirror and mirrorset for user 'brandon'.
      2. "View snapshot" for its first (only in this case) mirrorset.
      3. Create a snaphot
      4. Save the snpashot uuid
      5. open Snapshot page
      6. Verify that snapshot is visible with same uuid.'''
     self.test_snapshot_operations()
     self.create_login_session('brandon')
     mirrorsSet = MirrorSetPage(self.driver)
     mirrorsSet.driver.get(self.live_server_url)
     mirrorsSet.mirror_set_button.click()
     uuid = mirrorsSet.getLastestSnapShot_uuid('mySet')
     uuid = uuid.text
     snapshotPage = SnapshotPage(self.driver)
     snapshotPage.driver.get(self.live_server_url)
     snapshotPage.snapshot_button.click()
     uuids = snapshotPage.snapshotDetailsByMirrorSet('mySet')
     self.assertTrue(uuid in uuids, "Snapshot didn't showed up")
 def test_snapshot_tags(self):
     '''This tests verifies the tag addtion/deletion and
     modification on snapshot.
     Steps:
      1. Create Mirror, Mirror-set and a snapshot
      2. Save the snapshot uuid.
      3. Create a new tag on snapshot.
      4. Edit the snapshot tag.
      5. Delete a snapshot tag.
      6. Create a new snapshot-tag '''
     self.test_mirror_set()
     self.create_login_session('brandon')
     mirrorsSet = MirrorSetPage(self.driver)
     mirrorsSet.driver.get(self.live_server_url)
     mirrorsSet.mirror_set_button.click()
     viewButton = mirrorsSet.view_snapshot('mySet')
     viewButton.click()
     mirrorsSet.new_submit_button.click()
     mirrorsSet.mirror_set_button.click()
     uuid = mirrorsSet.getLastestSnapShot_uuid("mySet").text
     snapshot = SnapshotPage(self.driver)
     snapshot.snapshot_button.click()
     # create new tag
     snapshot.create_new_snapshot_tag(snapshotuuid=uuid, tag='testtag')
     self.assertTrue(snapshot.verify_tag_present(snapshotuuid=uuid, tag='testtag'), "Tag not added")
     # edit snapshot tag
     snapshot.edit_snapshot_tag(snapshotuuid=uuid, tag='testtagedited', oldtag='testtag')
     self.assertTrue(snapshot.verify_tag_present(snapshotuuid=uuid, tag='testtagedited'), "Tag not edited")
     # deleted snapshot tag
     snapshot.deleted_snapshot_tag(snapshotuuid=uuid, tag='testtagedited')
     self.assertFalse(snapshot.verify_tag_present(snapshotuuid=uuid, tag='testtagedited'), "Tag not deleted")
     # add one more tag on same snapshot
     snapshot.create_new_snapshot_tag(snapshotuuid=uuid, tag='testsecondtag')
     self.assertTrue(snapshot.verify_tag_present(snapshotuuid=uuid, tag='testsecondtag'), "Tag not added")