Beispiel #1
0
    def __create_html_element(self, html_element):
        '''
            Creates all test cases for the given html_element
        '''
        test_cases = []
        test_cases.append(
            create_unittest_tag_name(html_element.element_id,
                                     html_element.element_name))
        test_cases.append(
            create_unittest_parent(html_element.element_id,
                                   html_element.parent_id))
        test_cases.append(create_unittest_siblings(html_element.element_id,\
                                                    html_element.predecessor_id,\
                                                    html_element.successor_id))
        test_cases.append(create_unittest_attribute(html_element.element_id,\
                                                     html_element.attributes))
        test_cases.append(create_unittest_css_rule(html_element.element_id,\
                                                    html_element.css_rules))

        return test_cases
Beispiel #2
0
 def test_create_unit_test_siblings(self):
     actual = create_unittest_siblings('login_password',
                                       'login_error_message', 'login_name')
     self.maxDiff = None
     self.assertEqual(SIBLING_EXPECTED_RESULT, actual)
Beispiel #3
0
 def test_create_unit_test_siblings_no_preceding(self):
     actual = create_unittest_siblings('login_password', '', 'login_name')
     self.maxDiff = None
     self.assertEqual(NO_PRECIDING_SIBLING_EXPECTED_RESULT, actual)
Beispiel #4
0
 def test_create_unit_test_siblings_no_following(self):
     actual = create_unittest_siblings('login_password',
                                       'login_error_message', '')
     self.maxDiff = None
     self.assertEqual(NO_FOLLOWING_SIBLING_EXPECTED_RESULT, actual)
Beispiel #5
0
 def test_create_unit_test_no_siblings(self):
     actual = create_unittest_siblings('login_password', '', '')
     self.maxDiff = None
     self.assertEqual(NO_SIBLING_EXPECTED_RESULT, actual)