예제 #1
0
def test_cfui_server_download_txt(web_session, delete_files):
    web_session.web_driver.get("{}//middleware_server/show_list".format(
        web_session.MIQ_URL))
    web_session.logger.info("Begin download server report as text test")
    assert download_report(web_session, "middleware_server").text_format()

    web_session.logger.info("Begin download server report as cvv test")
    assert download_report(web_session, "middleware_server").csv_format()

    web_session.logger.info("Begin server file assert")
    file = "{}{}".format(os.getenv("HOME"), '/Downloads/Middleware Servers*')
    assert_download_exist("{}.txt".format(file))
    assert_download_exist("{}.csv".format(file))
예제 #2
0
def test_cfui_server_groups_detail(web_session, delete_files):
    web_session.logger.info("Begin download Server Groups Detail PDF text")
    utils = ui_utils(web_session)

    nav_to_server_groups(web_session)
    servers = utils.get_list_table()
    utils.click_on_row_containing_text(servers[0].get('Server Group Name'))
    utils.waitForTextOnPage("Properties", 5)

    assert download_report(web_session, '').pdf_format()

    assert_download_exist("{}{}".format(
        os.getenv("HOME"), '/Downloads/Middleware Server Group*.pdf'))
예제 #3
0
def test_cfui_domain_detail_download_pdf(web_session, delete_files):
    web_session.logger.info("Begin download Domain detail PDF text")
    utils = ui_utils(web_session)
    provider_name = web_session.HAWKULAR_PROVIDER_NAME
    navigate(web_session).get("{}/middleware_domain/show_list".format(
        web_session.MIQ_URL))
    assert utils.waitForTextOnPage(provider_name, 15)
    domains = utils.get_list_table()
    if not domains:
        web_session.logger.warning("No Domains found.")
        pytest.skip("Skip test - No Domains found.")

    utils.click_on_row_containing_text(domains[0].get('Feed'))

    assert download_report(web_session, '').pdf_format()

    assert_download_exist("{}{}".format(os.getenv("HOME"),
                                        '/Downloads/Middleware Domain*.pdf'))
예제 #4
0
def test_cfui_messaging_detail_download_pdf(web_session, delete_files):
    if web_session.appliance_version == 'master':
        web_session.logger.debug(
            "Download feature not supported for Messaging Detail.")
        pytest.skip(
            "Skip test - Download feature not supported for Messaging Detail - version: master"
        )

    web_session.logger.info("Begin download Messaging detail PDF text")
    utils = ui_utils(web_session)
    web_session.web_driver.get("{}/middleware_messaging/show_list".format(
        web_session.MIQ_URL))
    assert utils.waitForTextOnPage("Messaging Name", 10)
    messagings = utils.get_list_table()
    utils.click_on_row_containing_text(messagings[0].get('Messaging Name'))

    assert download_report(web_session, '').pdf_format()

    assert_download_exist("{}{}".format(
        os.getenv("HOME"),
        '/Downloads/ManageIQ-Providers-Hawkular-Middleware Manager-Middleware Messaging*.pdf'
    ))
예제 #5
0
def test_cfui_server_detail_download_pdf(web_session, delete_files):
    if web_session.appliance_version == 'master':
        web_session.logger.debug(
            "Download feature not supported for Server Detail.")
        pytest.skip(
            "Skip test - Download feature not supported for Server Detail - version: master."
        )

    web_session.logger.info("Begin download Server detail PDF text")
    utils = ui_utils(web_session)
    web_session.web_driver.get("{}/middleware_server/show_list".format(
        web_session.MIQ_URL))
    assert utils.waitForTextOnPage(web_session.HAWKULAR_PROVIDER_NAME, 10)
    servers = utils.get_list_table()
    utils.click_on_row_containing_text(servers[0].get('Feed'))

    assert download_report(web_session, '').pdf_format()

    assert_download_exist("{}{}".format(
        os.getenv("HOME"),
        '/Downloads/ManageIQ-Providers-Hawkular-Middleware Manager-Middleware Server*.pdf'
    ))
예제 #6
0
def test_cfui_provider_detail_pdf(web_session, delete_files):
    if web_session.appliance_version == 'master':
        web_session.logger.debug(
            "Download feature not supported for Provider Detail.")
        pytest.skip(
            "Skip test - Download feature not supported for Provider Detail - version: master."
        )

    web_session.logger.info("Begin download provider detail PDF text")
    utils = ui_utils(web_session)
    web_session.web_driver.get("{}//ems_middleware/show_list".format(
        web_session.MIQ_URL))
    view(web_session).list_View()
    utils.sleep(2)
    utils.click_on_row_containing_text(web_session.HAWKULAR_PROVIDER_NAME)
    utils.waitForTextOnPage('Status', 10)

    assert download_report(web_session, '').pdf_format()

    assert_download_exist("{}{}".format(
        os.getenv("HOME"),
        '/Downloads/ManageIQ-Providers-Hawkular-Middleware*.pdf'))