Exemple #1
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 #2
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 #3
0
    def test_profile_name_search_in_profile_display(self):
        self.navigateToAccountIntel()
        profile_management = ProfileManagement(self.driver)
        profile_management.exclude_tab().click()
        excluded_tab = ExcludedTab(self.driver)
        excluded_tab.click_profile_display()
        actual = excluded_tab.search_profile_get_result_in_profile_display(
            'Kuoni Group')
        expected = ['All Profiles', 'Kuoni Group']
        assert actual == expected

        self.driver.refresh()
        excluded_tab.click_profile_display()
        actual = excluded_tab.search_profile_get_result_in_profile_display(
            '*Lego')
        assert actual == expected

        self.driver.refresh()
        excluded_tab.click_profile_display()
        actual = excluded_tab.search_profile_get_result_in_profile_display(
            '*gover')
        expected = ["All Profiles", "Norwegian Government"]
        assert actual == expected

        self.driver.refresh()
        excluded_tab.click_profile_display()
        actual = excluded_tab.search_profile_get_result_in_profile_display(
            'asdfsa')
        expected = ['No result found']
        assert actual == expected
Exemple #4
0
    def test_rn_filter_invalid_data(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_to_field('-5')
        excluded_tab.click_go_button()
        actual = excluded_tab.get_error_text()
        expected = 'Please enter valid RN (To) number.'
        assert actual == expected

        self.driver.refresh()
        excluded_tab.click_profile_display()
        excluded_tab.enter_from_field('-5')
        excluded_tab.click_go_button()
        actual = excluded_tab.get_error_text()
        expected = 'Please enter valid RN (from) number.'
        assert actual == expected

        self.driver.refresh()
        excluded_tab.click_profile_display()
        excluded_tab.enter_to_field('1')
        excluded_tab.enter_from_field('5')
        excluded_tab.click_go_button()
        actual = excluded_tab.get_error_text()
        expected = 'To value must be greater than from value.'
        assert actual == expected