)]}'
{"openstack_dashboard/test/integration_tests/regions/forms.py":[{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"b1e5bf5474d58bfef7189a6e7f097dec2f66a39e","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"class CheckBoxMixin(object):"},{"line_number":86,"context_line":"    def is_marked(self):"},{"line_number":87,"context_line":"        return self._input_element.is_selected()"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def mark(self):"},{"line_number":90,"context_line":"        if not self.is_marked():"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_a848ba2e","line":87,"updated":"2016-03-25 14:59:35.000000000","message":"Is it possible to return 2 different implementations of CheckboxRegion (themable and not themable) and handle is_selected differently in these 2 classes, while leaving the mixin intact?","commit_id":"a0e0c3a0bf8b4d7f22316fafb75c9b26f234e30e"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"d0608d73b0309fcf6c2ff03fa76b2b78fd1ea48c","unresolved":false,"context_lines":[{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    @property"},{"line_number":98,"context_line":"    def _input_element(self):"},{"line_number":99,"context_line":"        element \u003d self.element"},{"line_number":100,"context_line":"        if element.tag_name \u003d\u003d \u0027label\u0027:"},{"line_number":101,"context_line":"            for_attribute \u003d element.get_attribute(\u0027for\u0027)"},{"line_number":102,"context_line":"            element \u003d self.driver.find_element(by.By.ID, for_attribute)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_dab138e3","line":99,"updated":"2016-03-28 13:32:32.000000000","message":"Instead of constantly recalculating input/label element based on current self.element state, you could assign them in __init__ method.","commit_id":"a0e0c3a0bf8b4d7f22316fafb75c9b26f234e30e"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"d0608d73b0309fcf6c2ff03fa76b2b78fd1ea48c","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        element \u003d self.element"},{"line_number":100,"context_line":"        if element.tag_name \u003d\u003d \u0027label\u0027:"},{"line_number":101,"context_line":"            for_attribute \u003d element.get_attribute(\u0027for\u0027)"},{"line_number":102,"context_line":"            element \u003d self.driver.find_element(by.By.ID, for_attribute)"},{"line_number":103,"context_line":"        return element"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_dae818b7","line":102,"updated":"2016-03-28 13:32:32.000000000","message":"Looks unreliable. Are you sure that self.driver is not an entire screen? If it is, you could find not the element you really wanted.","commit_id":"a0e0c3a0bf8b4d7f22316fafb75c9b26f234e30e"},{"author":{"_account_id":19265,"name":"Georgy Dyuldin","email":"gdyuldin@mirantis.com","username":"1tush"},"change_message_id":"6bc7140c74df28d555f4f83311431a2ec7eabbd6","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        element \u003d self.element"},{"line_number":100,"context_line":"        if element.tag_name \u003d\u003d \u0027label\u0027:"},{"line_number":101,"context_line":"            for_attribute \u003d element.get_attribute(\u0027for\u0027)"},{"line_number":102,"context_line":"            element \u003d self.driver.find_element(by.By.ID, for_attribute)"},{"line_number":103,"context_line":"        return element"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_ee42793d","line":102,"in_reply_to":"da0c15f0_dae818b7","updated":"2016-03-29 07:08:58.000000000","message":"Id of element should be unique across all page elements","commit_id":"a0e0c3a0bf8b4d7f22316fafb75c9b26f234e30e"},{"author":{"_account_id":20772,"name":"Sergei Chipiga","email":"schipiga@mirantis.com","username":"schipiga"},"change_message_id":"46f9aeffc6b48ed17f2c0735c749b7fef9b8d36f","unresolved":false,"context_lines":[{"line_number":85,"context_line":"class CheckBoxMixin(object):"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    @property"},{"line_number":88,"context_line":"    def label(self):"},{"line_number":89,"context_line":"        id_attribute \u003d self.element.get_attribute(\u0027id\u0027)"},{"line_number":90,"context_line":"        return self.driver.find_element(by.By.CSS_SELECTOR,"},{"line_number":91,"context_line":"                                        \u0027label[for\u003d{}]\u0027.format(id_attribute))"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0121b8_91d887f1","line":88,"updated":"2016-03-29 11:16:01.000000000","message":"I\u0027m not sure, that `label` should be defined here. Label is another element, it\u0027s not a part of checkbox. But it can be a part of `CheckBoxFormField`. So, my opinion, `def label` must be inside `class CheckBoxFormFieldRegion`, must less it\u0027s present inside `class BaseFormFieldRegion`. You should override this property inside `class CheckBoxFormFieldRegion`","commit_id":"e774e0a0d91e71e87721e8cedcea468dc3422f25"},{"author":{"_account_id":20772,"name":"Sergei Chipiga","email":"schipiga@mirantis.com","username":"schipiga"},"change_message_id":"86a6cd6a57f099c4b8cc5df98648ffa59429bf0e","unresolved":false,"context_lines":[{"line_number":85,"context_line":"class CheckBoxMixin(object):"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    @property"},{"line_number":88,"context_line":"    def label(self):"},{"line_number":89,"context_line":"        id_attribute \u003d self.element.get_attribute(\u0027id\u0027)"},{"line_number":90,"context_line":"        return self.driver.find_element(by.By.CSS_SELECTOR,"},{"line_number":91,"context_line":"                                        \u0027label[for\u003d{}]\u0027.format(id_attribute))"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0121b8_cf3a5acd","line":88,"in_reply_to":"ba0121b8_91d887f1","updated":"2016-03-29 11:39:16.000000000","message":"After discussion with @tsufiev, I see, that I\u0027m wrong","commit_id":"e774e0a0d91e71e87721e8cedcea468dc3422f25"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"eec6bcd50b0a0dca86bc259ab08891baec9aa2da","unresolved":false,"context_lines":[{"line_number":87,"context_line":"    @property"},{"line_number":88,"context_line":"    def label(self):"},{"line_number":89,"context_line":"        id_attribute \u003d self.element.get_attribute(\u0027id\u0027)"},{"line_number":90,"context_line":"        return self.driver.find_element(by.By.CSS_SELECTOR,"},{"line_number":91,"context_line":"                                        \u0027label[for\u003d{}]\u0027.format(id_attribute))"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def is_marked(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0121b8_65140df5","line":90,"updated":"2016-03-29 12:15:55.000000000","message":"Theoretically, #id should be unique per page, while in reality that\u0027s not always the case. For example, \u0027id_protected\u0027 and \u0027id_public\u0027 are quite usual examples of ids, which were produced by \u0027id_\u0027 + element.get_attribute(\u0027name\u0027). These ids could be easily met in some other part of the page, making the result of query unstable (it\u0027s not specified which of actual elements with the same id will be returned).\n\nTo solve this possible ambiguity, we should confine the area where we\u0027re looking for an element (more local that self.driver).","commit_id":"e774e0a0d91e71e87721e8cedcea468dc3422f25"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"546ff673c93b38fb76d0adf19fc16b285b47cf90","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    @property"},{"line_number":91,"context_line":"    def label(self):"},{"line_number":92,"context_line":"        id_attribute \u003d self.element.get_attribute(\u0027id\u0027)"},{"line_number":93,"context_line":"        return self._factory_src_elem.find_element("},{"line_number":94,"context_line":"            by.By.CSS_SELECTOR, \u0027label[for\u003d{}]\u0027.format(id_attribute))"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def is_marked(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba0121b8_1257f926","line":93,"updated":"2016-03-30 17:43:34.000000000","message":"I\u0027m not very fond of wiring into field class an attribute that is needed only for checkbox wrapper. On the other hand, I like that your solution works both for old checkboxes and new (themable) ones.\n\nWhat do you think of using an XPATH_SELECTOR to retrieve a label handle related to the current input[type\u003d\u0027checkbox\u0027]? I tested the selector \u0027//input[@id\u003d\u0027id_is_public\u0027]/../..//label\u0027 (for Create Image form) on both stable/liberty and current master, it finds \u0027Public\u0027 label reference on both branches.\n\nCertainly, it needs to be slightly modified to be relative to current checkbox (something like `self.element.find_element(by.By.XPATH_SELECTOR, \u0027../..//label\u0027)`.","commit_id":"73903417920a3aec51c54e5d73c48cb9dca3d7f9"}]}
