Exemplo n.º 1
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')
Exemplo n.º 2
0
 def test_profile_display_icon_disabled_in_edit_mode(self):
     self.navigateToAccountIntel()
     profile_management = ProfileManagement(self.driver)
     profile_management.exclude_tab().click()
     excluded_tab = ExcludedTab(self.driver)
     excluded_tab.click_on_edit_icon()
     assert True == excluded_tab.is_profile_display_enabled()
Exemplo n.º 3
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')
Exemplo n.º 4
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')
Exemplo n.º 5
0
 def test_reset_button_disabled_when_user_clicks_intially(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.click_star_reactive_icon()
     time.sleep(5)
     assert True == excluded_tab.is_reset_button_enabled()
     excluded_tab.click_close_button_star_icon()
Exemplo n.º 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
Exemplo n.º 7
0
 def test_reset_functionality_when_few_marked_accepted(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')
     assert True == excluded_tab.is_profile_approved('Kuoni Group')
     assert True == excluded_tab.is_profile_approved('Norwegian Government')
     excluded_tab.click_star_reactive_icon()
     excluded_tab.click_reset_button()
     excluded_tab.click_close_button_star_icon()
     excluded_tab.click_cancel_save_button()
     assert True == excluded_tab.is_profile_excluded('Kuoni Group')
     assert True == excluded_tab.is_profile_excluded('Norwegian Government')
Exemplo n.º 8
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')