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_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