Exemple #1
0
    def test_ath_1398_Group_Report(self):
        """
        ################################################################################################################
        1   Select a group from group monitoring and create report.
            Move a VC from the group to different group, and click on the report generated before.
            Remove a client associated to an AP of the group.
            Add/remove SSID
        2   Select a group and go to report page.
        ################################################################################################################
        """
        conf = self.config.config_vars
        log.info(
            "STEP 1.1 : Select a group from group monitoring and create report."
        )
        overview_page = self.LeftPanel.goto_monitoringPage()
        overview_page.go_to_all_groups_page()
        overview_page.go_to_default_group()
        self.LeftPanel.goto_configuration_page()
        self.LeftPanel.go_to_network_page()
        self.NetworkPage.delete_all_networks()
        ssid_wpa2 = self.config.config_vars.Network_name
        basic_info = self.NetworkPage.create_new_network()
        virtual_lan = basic_info.employee_network_info(ssid_wpa2)
        security = virtual_lan.use_vlan_defaults()
        access = security.assert_roaming_defaults(True, False)
        access.finish_network_setup()
        self.NetworkPage.assert_new_network(ssid_wpa2)
        DeviceLibrary.connect_client_to_ap("Client_1", "test1")
        reports_network_page = self.LeftPanel.go_to_reports_network()
        reports_network_page.delete_all_reports()
        report = reports_network_page.create_report(conf.time_span_last_day,
                                                    'now',
                                                    conf.repeat_one_time,
                                                    'disabled')
        reports_network_page.verify_report_generation(report, "Completed")
        reports_network_page.go_to_first_report()
        reports_network_page.assert_ap_name_present_in_ap_table("IAP_1")

        log.info(
            "STEP 1.2 : Move a VC from the group to different group, and click on the report generated before."
        )
        overview_page.create_new_group("GroupA", "test123")
        inner_left_panel = self.TopPanel.get_inner_left_panel()
        manage_group_page = inner_left_panel.manage_group()
        manage_group_page.move_all_ap_to_group("GroupA")
        time.sleep(200)
        DeviceLibrary.reconnect("IAP_1")
        reports_network_page = self.LeftPanel.go_to_reports_network()
        reports_network_page.go_to_first_report()
        reports_network_page.assert_ap_name_present_in_ap_table("IAP_1")

        log.info(
            "STEP 1.3 : Remove a client associated to an AP of the group.")
        DeviceLibrary.disconnect_client_from_ap("Client_1")
        reports_network_page = self.LeftPanel.go_to_reports_network()
        reports_network_page.go_to_first_report()
        reports_network_page.assert_ap_name_present_in_ap_table("IAP_1")

        log.info("STEP 1.4 : Add/remove SSID")
        overview_page.go_to_default_group()
        self.LeftPanel.go_to_network_page()
        ssid_wep = "test3"
        basic_info = self.NetworkPage.create_new_network()
        virtual_lan = basic_info.employee_network_info(ssid_wep)
        security = virtual_lan.use_vlan_defaults()
        security.set_security_level_and_key_management("Personal")
        access = security.use_security_default()
        access.finish_network_setup()
        self.NetworkPage.assert_new_network(ssid_wep)
        reports_network_page = self.LeftPanel.go_to_reports_network()
        reports_network_page.go_to_first_report()
        reports_network_page.assert_ap_name_present_in_ap_table("IAP_1")

        log.info("STEP 2 : Select a group and go to report page.")
        overview_page.go_to_default_group()
        reports_network_page = self.LeftPanel.go_to_reports_network()
        reports_network_page.assert_group_name("default")

        log.info("CLEANUP")
        #self.browser.refresh()

        self.LeftPanel.go_to_monitoring_page()
        inner_left_panel = self.TopPanel.click_slider_icon()
        manage_group_page = inner_left_panel.manage_group()
        manage_group_page.move_all_ap_to_group("default")
        time.sleep(200)
        DeviceLibrary.reconnect("IAP_1")
    def test_ath_9226_Group_Report(self):
        """
        ################################################################################################################
        1   Select a group from group monitoring and create report.
            Move a VC from the group to different group, and click on the report generated before.
            Remove a client associated to an AP of the group.
            Add/remove SSID
        2   Select a group and go to report page.
        ################################################################################################################
        """
        conf = self.config.config_vars
        log.info("STEP 1.1 : Select a group from group monitoring and create report.")
        overview_page = self.LeftPanel.goto_monitoringPage()
        #overview_page.go_to_default_group()
        reports_security_page = self.LeftPanel.go_to_reports_security()
        reports_security_page.delete_all_reports()

        report = reports_security_page.create_security_report("Last day", "Now", self.config.config_vars.one_time)
        reports_security_page.verify_report_generation(report, "Completed")
        reports_security_page.go_to_first_report()
        wids_count = reports_security_page.get_report_count("aps")

        log.info("STEP 1.2 : Move a VC from the group to different group, and click on the report generated before.")
        overview_page.create_new_group("GroupA", "test123")
        inner_left_panel = self.TopPanel.get_inner_left_panel()
        manage_group_page = inner_left_panel.manage_group()
        manage_group_page.move_all_ap_to_group("GroupA")
        time.sleep(200)
        DeviceLibrary.reconnect("IAP_1")

        reports_security_page = self.LeftPanel.go_to_reports_security()
        reports_security_page.go_to_first_report()

        wids_count1 = reports_security_page.get_report_count("aps")
        if wids_count != wids_count1:
            raise AssertionError("Report got changed.")

        log.info("STEP 1.3 : Remove a client associated to an AP of the group.")
        DeviceLibrary.disconnect_client_from_ap("Client_1")
        reports_security_page = self.LeftPanel.go_to_reports_security()
        reports_security_page.go_to_first_report()

        wids_count1 = reports_security_page.get_report_count("aps")
        if wids_count != wids_count1:
            raise AssertionError("Report got changed.")
        log.info("STEP 1.4 : Add/remove SSID")
        overview_page.go_to_default_group()
        self.LeftPanel.go_to_network_page()
        ssid_wep = "test3"
        basic_info = self.NetworkPage.create_new_network()
        virtual_lan = basic_info.employee_network_info(ssid_wep)
        security = virtual_lan.use_vlan_defaults()
        security.set_security_level_and_key_management("Personal")
        access = security.use_security_default()
        access.finish_network_setup()
        self.NetworkPage.assert_new_network(ssid_wep)
        reports_security_page = self.LeftPanel.go_to_reports_security()
        reports_security_page.go_to_first_report()

        wids_count1 = reports_security_page.get_report_count("aps")
        if wids_count != wids_count1:
            raise AssertionError("Report got changed.")

        log.info("STEP 2 : Select a group and go to report page.")
        overview_page.go_to_default_group()
        reports_security_page = self.LeftPanel.go_to_reports_security()
        reports_security_page.assert_group_name("default")

        log.info("CLEANUP")
        self.LeftPanel.go_to_monitoring_page()
        inner_left_panel = self.TopPanel.click_slider_icon()
        manage_group_page = inner_left_panel.manage_group()
        manage_group_page.move_all_ap_to_group("default")
        time.sleep(200)
        DeviceLibrary.reconnect("IAP_1")