Exemple #1
0
    def test_contracted_flag_is_set_to_false_when_returned_from_excluded_tab(
            self):
        self.navigateToAccountIntel()
        profile_management = ProfileManagement(self.driver)
        profile_management.clickEditIcon()
        profile_management.exclude_account('Eli Lilly & Company')
        profile_management.click_save_button()

        profile_management.exclude_tab().click()
        excluded_tab = ExcludedTab(self.driver)

        actual = excluded_tab.all_master_profiles()
        expected = [
            "Eli Lilly & Company", "Kuoni Group", "New accenture",
            "Norges Fotballforbund", "Norwegian Government"
        ]

        assert actual == expected

        excluded_tab.click_on_edit_icon()
        excluded_tab.activate_account('Eli Lilly & Company')
        excluded_tab.click_save_button()
        actual = excluded_tab.all_master_profiles()
        expected = [
            "Kuoni Group", "New accenture", "Norges Fotballforbund",
            "Norwegian Government"
        ]

        assert actual == expected

        excluded_tab.click_on_profile_management_tab()
        assert True == profile_management.is_profile_accepted(
            'Eli Lilly & Company')
        assert False == profile_management.is_contracted_profile(
            'Eli Lilly & Company')
Exemple #2
0
    def test_grid_creation_based_on_valid_rn_filters(self):
        self.navigateToAccountIntel()
        profile_management = ProfileManagement(self.driver)
        profile_management.exclude_tab().click()
        excluded_tab = ExcludedTab(self.driver)
        excluded_tab.click_profile_display()
        excluded_tab.enter_from_field('2')
        excluded_tab.enter_to_field('5')
        excluded_tab.click_go_button()

        actual = excluded_tab.all_master_profiles()
        expected = [
            "New accenture", "Norges Fotballforbund", "Norwegian Government"
        ]
        assert actual == expected

        self.driver.refresh()
        excluded_tab.click_profile_display()

        excluded_tab.enter_from_field('2')
        excluded_tab.click_go_button()
        actual = excluded_tab.all_master_profiles()
        expected = [
            "New accenture", "Norges Fotballforbund", "Norwegian Government"
        ]
        assert actual == expected
Exemple #3
0
    def test_activate_profile_previously_in_pending_state(self):
        self.navigateToAccountIntel()
        profile_management = ProfileManagement(self.driver)
        profile_management.clickEditIcon()
        profile_management.exclude_account('Airbus Group')
        profile_management.click_save_button()
        profile_management.exclude_tab().click()
        exclude_tab = ExcludedTab(self.driver)
        actual = exclude_tab.all_master_profiles()
        expected = [
            "Airbus Group", "Kuoni Group", "New accenture",
            "Norges Fotballforbund", "Norwegian Government"
        ]
        assert actual == expected

        exclude_tab.click_on_edit_icon()
        exclude_tab.activate_account('Airbus Group')
        exclude_tab.click_save_button()
        actual = exclude_tab.all_master_profiles()
        expected = [
            "Kuoni Group", "New accenture", "Norges Fotballforbund",
            "Norwegian Government"
        ]
        assert actual == expected

        profile_management = exclude_tab.click_on_profile_management_tab()
        assert True == profile_management.is_profile_accepted('Airbus Group')
Exemple #4
0
    def test_contracted_flag_when_profile_marked_excluded_by_exclude_all_operation(
            self):
        self.navigateToAccountIntel()
        profile_management = ProfileManagement(self.driver)
        profile_management.clickEditIcon()
        profile_management.exclude_account('Eli Lilly & Company')
        profile_management.click_save_button()

        profile_management.exclude_tab().click()
        excluded_tab = ExcludedTab(self.driver)

        actual = excluded_tab.all_master_profiles()
        expected = [
            "Eli Lilly & Company", "Kuoni Group", "New accenture",
            "Norges Fotballforbund", "Norwegian Government"
        ]

        assert actual == expected

        excluded_tab.click_on_edit_icon()
        excluded_tab.click_star_reactive_icon()
        excluded_tab.click_accept_all()
        excluded_tab.click_close_button_star_icon()
        excluded_tab.click_save_button()

        excluded_tab.click_on_profile_management_tab()
        assert False == profile_management.is_profile_pending(
            'Eli Lilly & Company')
        assert False == profile_management.is_profile_pending(
            'Eli Lilly & Company')
Exemple #5
0
    def test_profile_name_filter(self):
        self.navigateToAccountIntel()
        profile_management = ProfileManagement(self.driver)
        profile_management.exclude_tab().click()
        excluded_tab = ExcludedTab(self.driver)
        excluded_tab.click_profile_display()
        excluded_tab.search_profile_and_select('Kuoni Group')
        excluded_tab.click_go_button()
        actual = excluded_tab.all_master_profiles()
        expected = ["Kuoni Group"]

        assert actual == expected
Exemple #6
0
 def test_profile_list_when_profile_activated_but_changes_not_saved(self):
     self.navigateToAccountIntel()
     profile_management = ProfileManagement(self.driver)
     profile_management.exclude_tab().click()
     excluded_tab = ExcludedTab(self.driver)
     excluded_tab.click_on_edit_icon()
     excluded_tab.activate_account('Kuoni Group')
     excluded_tab.activate_account('Norwegian Government')
     excluded_tab.click_cancel_save_button()
     actual = excluded_tab.all_master_profiles()
     expected = [
         "Kuoni Group", "New accenture", "Norges Fotballforbund",
         "Norwegian Government"
     ]
     assert actual == expected
Exemple #7
0
    def test_single_multiple_profile_activate(self):
        self.navigateToAccountIntel()
        profile_management = ProfileManagement(self.driver)
        profile_management.exclude_tab().click()
        excluded_tab = ExcludedTab(self.driver)
        excluded_tab.click_on_edit_icon()
        excluded_tab.activate_account('Kuoni Group')
        excluded_tab.activate_account('Norwegian Government')
        excluded_tab.click_save_button()

        actual = excluded_tab.all_master_profiles()
        expected = ["New accenture", "Norges Fotballforbund"]
        assert actual == expected

        excluded_tab.click_on_profile_management_tab()
        assert True == profile_management.is_profile_accepted('Kuoni Group')
        assert True == profile_management.is_profile_accepted(
            'Norwegian Government')