def delete_keypair_from_view_page(self, keypair_name): """ Navigates to Keypair View via menu. Deletes keypair from view page. Verifies keypair was removed from view page. :param keypair_name: """ BasePage(self).goto_keypair_view_page_via_menu() KeypairLanding(self).click_action_delete_keypair_on_view_page(keypair_name) DeleteKeypairModal(self).click_delete_keypair_submit_button() BasePage(self).goto_keypair_view_page_via_menu() KeypairLanding(self).verify_keypair_not_present_on_view_page(keypair_name)
def delete_keypair_from_detail_page(self, keypair_name): """ Navigates to Keypair View via menu, finds keypair, goes to keypair detail page via keypair name link. Deletes keypair. :param keypair_name: """ BasePage(self).goto_keypair_view_page_via_menu() KeypairLanding(self).click_keypair_link_on_view_page(keypair_name) KeypairDetailPage(self, keypair_name).click_action_delete_keypair_on_detail_page() DeleteKeypairModal(self).click_delete_keypair_submit_button() BasePage(self).goto_keypair_view_page_via_menu() KeypairLanding(self).verify_keypair_not_present_on_view_page(keypair_name)
def import_keypair(self, keypair, keypair_name): """ Navigates to Keypair View via menu. Imports keypair. Verifies keypair visible on Keypair View page. :param keypair_name: """ BasePage(self).goto_keypair_view_page_via_menu() KeypairLanding(self).click_import_keypair_button() ImportKeypairDialog(self).import_keypair(keypair, keypair_name) KeypairDetailPage(self, keypair_name)
def create_keypair_from_keypair_view_page(self, keypair_name): """ Navigates from Dashboard to keypair landing page via menu. Creates keypair, verifies keypair detail page is loaded after keypair creation. :param keypair_name: """ BasePage(self).goto_keypair_view_page_via_menu() KeypairLanding(self).click_create_keypair_button_on_view_page() CreateKeypairDialog(self).create_keypair(keypair_name) KeypairDetailPage(self, keypair_name)