Example #1
0
 def test_simple_search(self):
     b = self.browser
     b.get(get_server_base() + 'distros')
     b.find_element_by_name('simplesearch').send_keys(self.distro_one.name)
     b.find_element_by_id('simpleform').submit()
     check_distro_search_results(b, present=[self.distro_one],
                                 absent=[self.distro_two, self.distro_three])
Example #2
0
 def test_simple_search(self):
     b = self.browser
     b.get(get_server_base() + 'distros')
     b.find_element_by_name('simplesearch').send_keys(self.distro_one.name)
     b.find_element_by_id('simpleform').submit()
     check_distro_search_results(b, present=[self.distro_one],
                                 absent=[self.distro_two, self.distro_three])
Example #3
0
    def test_search_by_tag(self):
        with session.begin():
            released_distro = data_setup.create_distro(
                tags=[u'STABLE', u'RELEASED'])
            data_setup.create_distro_tree(distro=released_distro)
            unreleased_distro = data_setup.create_distro(tags=[u'STABLE'])
            data_setup.create_distro_tree(distro=unreleased_distro)

        b = self.browser
        b.get(get_server_base() + 'distros')
        b.find_element_by_link_text('Show Search Options').click()
        wait_for_animation(b, '#searchform')
        Select(b.find_element_by_name(
            'distrosearch-0.table')).select_by_visible_text('Tag')
        Select(b.find_element_by_name(
            'distrosearch-0.operation')).select_by_visible_text('is')
        Select(b.find_element_by_name(
            'distrosearch-0.value')).select_by_visible_text('RELEASED')
        b.find_element_by_name('distrosearch').submit()
        check_distro_search_results(b,
                                    present=[released_distro],
                                    absent=[unreleased_distro])

        Select(b.find_element_by_name(
            'distrosearch-0.operation')).select_by_visible_text('is not')
        b.find_element_by_name('distrosearch').submit()
        check_distro_search_results(b,
                                    present=[unreleased_distro],
                                    absent=[released_distro])
Example #4
0
 def test_search_by_osminor(self):
     b = self.browser
     b.get(get_server_base() + 'distros')
     b.find_element_by_link_text('Show Search Options').click()
     wait_for_animation(b, '#searchform')
     b.find_element_by_xpath("//select[@id='distrosearch_0_table']/option[@value='OSMinor']").click()
     b.find_element_by_xpath("//select[@id='distrosearch_0_operation']/option[@value='is']").click()
     b.find_element_by_xpath('//input[@id="distrosearch_0_value"]').clear()
     b.find_element_by_xpath('//input[@id="distrosearch_0_value"]').send_keys('1')
     b.find_element_by_id('searchform').submit()
     check_distro_search_results(b, present=[self.distro_one],
                                 absent=[self.distro_two, self.distro_three])
Example #5
0
 def test_search_by_osminor(self):
     b = self.browser
     b.get(get_server_base() + 'distros')
     b.find_element_by_link_text('Show Search Options').click()
     wait_for_animation(b, '#searchform')
     b.find_element_by_xpath("//select[@id='distrosearch_0_table']/option[@value='OSMinor']").click()
     b.find_element_by_xpath("//select[@id='distrosearch_0_operation']/option[@value='is']").click()
     b.find_element_by_xpath('//input[@id="distrosearch_0_value"]').clear()
     b.find_element_by_xpath('//input[@id="distrosearch_0_value"]').send_keys('1')
     b.find_element_by_id('searchform').submit()
     check_distro_search_results(b, present=[self.distro_one],
                                 absent=[self.distro_two, self.distro_three])
Example #6
0
 def test_search_by_name(self):
     b = self.browser
     b.get(get_server_base() + 'distros')
     b.find_element_by_link_text('Show Search Options').click()
     wait_for_animation(b, '#searchform')
     b.find_element_by_xpath("//select[@id='distrosearch_0_table']/option[@value='Name']").click()
     b.find_element_by_xpath('//input[@id="distrosearch_0_value" and '
                         'not(contains(@title, "date in YYYY-MM-DD format"))]')
     b.find_element_by_xpath('//input[@id="distrosearch_0_value"]').clear()
     b.find_element_by_xpath('//input[@id="distrosearch_0_value"]').send_keys(self.distro_one.name)
     b.find_element_by_id('searchform').submit()
     check_distro_search_results(b, present=[self.distro_one],
                 absent=[self.distro_two, self.distro_three])
Example #7
0
 def test_search_by_variant(self):
     b = self.browser
     b.get(get_server_base() + "distrotrees")
     b.find_element_by_link_text("Show Search Options").click()
     wait_for_animation(b, "#searchform")
     b.find_element_by_xpath("//select[@id='search_0_table']/" "option[@value='Variant']").click()
     b.find_element_by_xpath("//select[@id='search_0_operation']/" "option[@value='is']").click()
     b.find_element_by_xpath('//input[@id="search_0_value"]').clear()
     b.find_element_by_xpath('//input[@id="search_0_value"]').send_keys("%s" % self.distro_one_variant)
     b.find_element_by_id("searchform").submit()
     check_distro_search_results(
         b, present=[self.distro_tree_one], absent=[self.distro_tree_two, self.distro_tree_three]
     )
Example #8
0
 def test_search_by_name(self):
     b = self.browser
     b.get(get_server_base() + 'distros')
     b.find_element_by_link_text('Show Search Options').click()
     wait_for_animation(b, '#searchform')
     b.find_element_by_xpath("//select[@id='distrosearch_0_table']/option[@value='Name']").click()
     b.find_element_by_xpath('//input[@id="distrosearch_0_value" and '
                         'not(contains(@title, "date in YYYY-MM-DD format"))]')
     b.find_element_by_xpath('//input[@id="distrosearch_0_value"]').clear()
     b.find_element_by_xpath('//input[@id="distrosearch_0_value"]').send_keys(self.distro_one.name)
     b.find_element_by_id('searchform').submit()
     check_distro_search_results(b, present=[self.distro_one],
                 absent=[self.distro_two, self.distro_three])
Example #9
0
 def test_search_by_created(self):
     b = self.browser
     b.get(get_server_base() + 'distros')
     b.find_element_by_link_text('Show Search Options').click()
     wait_for_animation(b, '#searchform')
     b.find_element_by_xpath("//select[@id='distrosearch_0_table']/option[@value='Created']").click()
     b.find_element_by_xpath("//select[@id='distrosearch_0_operation']/option[@value='after']").click()
     b.find_element_by_xpath('//input[@id="distrosearch_0_value"]').clear()
     now_and_1 = datetime.utcnow() + timedelta(days=1)
     now_and_1_string = now_and_1.strftime('%Y-%m-%d')
     b.find_element_by_xpath('//input[@id="distrosearch_0_value"]').send_keys(now_and_1_string)
     b.find_element_by_id('searchform').submit()
     check_distro_search_results(b, present=[self.distro_one],
                                 absent=[self.distro_two, self.distro_three])
 def test_search_by_tag(self):
     b = self.browser
     b.get(get_server_base() + 'distrotrees')
     b.find_element_by_link_text('Show Search Options').click()
     wait_for_animation(b, '#searchform')
     b.find_element_by_xpath("//select[@id='search_0_table']/"
         "option[@value='Tag']").click()
     b.find_element_by_xpath("//select[@id='search_0_operation']/"
         "option[@value='is']").click()
     b.find_element_by_xpath("//select[@id='search_0_value']/"
         "option[@value='%s']" % self.distro_one_tag[0]).click()
     b.find_element_by_id('searchform').submit()
     check_distro_search_results(b, present=[self.distro_tree_one],
                                 absent=[self.distro_tree_two, self.distro_tree_three])
Example #11
0
 def test_search_by_tag(self):
     b = self.browser
     b.get(get_server_base() + 'distrotrees')
     b.find_element_by_link_text('Show Search Options').click()
     wait_for_animation(b, '#searchform')
     b.find_element_by_xpath("//select[@id='search_0_table']/"
         "option[@value='Tag']").click()
     b.find_element_by_xpath("//select[@id='search_0_operation']/"
         "option[@value='is']").click()
     b.find_element_by_xpath("//select[@id='search_0_value']/"
         "option[@value='%s']" % self.distro_one_tag[0]).click()
     b.find_element_by_id('searchform').submit()
     check_distro_search_results(b, present=[self.distro_tree_one],
                                 absent=[self.distro_tree_two, self.distro_tree_three])
Example #12
0
 def test_search_by_created(self):
     b = self.browser
     b.get(get_server_base() + 'distros')
     b.find_element_by_link_text('Show Search Options').click()
     wait_for_animation(b, '#searchform')
     b.find_element_by_xpath("//select[@id='distrosearch_0_table']/option[@value='Created']").click()
     b.find_element_by_xpath("//select[@id='distrosearch_0_operation']/option[@value='after']").click()
     b.find_element_by_xpath('//input[@id="distrosearch_0_value"]').clear()
     now_and_1 = datetime.utcnow() + timedelta(days=1)
     now_and_1_string = now_and_1.strftime('%Y-%m-%d')
     b.find_element_by_xpath('//input[@id="distrosearch_0_value"]').send_keys(now_and_1_string)
     b.find_element_by_id('searchform').submit()
     check_distro_search_results(b, present=[self.distro_one],
                                 absent=[self.distro_two, self.distro_three])
 def test_search_by_name(self):
     b = self.browser
     b.get(get_server_base() + 'distrotrees')
     b.find_element_by_link_text('Show Search Options').click()
     wait_for_animation(b, '#searchform')
     b.find_element_by_xpath("//select[@id='search_0_table']/"
         "option[@value='Name']").click()
     b.find_element_by_xpath("//select[@id='search_0_operation']/"
         "option[@value='is']").click()
     b.find_element_by_xpath('//input[@id="search_0_value"]').clear()
     b.find_element_by_xpath('//input[@id="search_0_value"]'). \
         send_keys('%s' % self.distro_three_name)
     b.find_element_by_id('searchform').submit()
     check_distro_search_results(b, present=[self.distro_tree_three],
                                 absent=[self.distro_tree_one, self.distro_tree_two])
Example #14
0
 def test_search_by_name(self):
     b = self.browser
     b.get(get_server_base() + 'distrotrees')
     b.find_element_by_link_text('Show Search Options').click()
     wait_for_animation(b, '#searchform')
     b.find_element_by_xpath("//select[@id='search_0_table']/"
         "option[@value='Name']").click()
     b.find_element_by_xpath("//select[@id='search_0_operation']/"
         "option[@value='is']").click()
     b.find_element_by_xpath('//input[@id="search_0_value"]').clear()
     b.find_element_by_xpath('//input[@id="search_0_value"]'). \
         send_keys('%s' % self.distro_three_name)
     b.find_element_by_id('searchform').submit()
     check_distro_search_results(b, present=[self.distro_tree_three],
                                 absent=[self.distro_tree_one, self.distro_tree_two])
    def test_search_by_tag(self):
        with session.begin():
            released_distro = data_setup.create_distro(tags=[u'STABLE', u'RELEASED'])
            data_setup.create_distro_tree(distro=released_distro)
            unreleased_distro = data_setup.create_distro(tags=[u'STABLE'])
            data_setup.create_distro_tree(distro=unreleased_distro)

        b = self.browser
        b.get(get_server_base() + 'distros')
        b.find_element_by_link_text('Show Search Options').click()
        wait_for_animation(b, '#searchform')
        Select(b.find_element_by_name('distrosearch-0.table')).select_by_visible_text('Tag')
        Select(b.find_element_by_name('distrosearch-0.operation')).select_by_visible_text('is')
        Select(b.find_element_by_name('distrosearch-0.value')).select_by_visible_text('RELEASED')
        b.find_element_by_name('distrosearch').submit()
        check_distro_search_results(b, present=[released_distro], absent=[unreleased_distro])

        Select(b.find_element_by_name('distrosearch-0.operation')).select_by_visible_text('is not')
        b.find_element_by_name('distrosearch').submit()
        check_distro_search_results(b, present=[unreleased_distro], absent=[released_distro])