)]}'
{"openstack_dashboard/test/integration_tests/pages/project/compute/volumes/volumespage.py":[{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"7357f75a5673c9f6aacd6a291b3f8ead9e4deb15","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        snapshot_form.submit()"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def attach_volume_to_instance(self, volume, instance):"},{"line_number":163,"context_line":"        attach_to_instance_selector \u003d (By.CSS_SELECTOR,"},{"line_number":164,"context_line":"                                       \u0027select[name\u003d\"instance\"]\u0027)"},{"line_number":165,"context_line":"        row \u003d self._get_row_with_volume_name(volume)"},{"line_number":166,"context_line":"        attach_form \u003d self.volumes_table.manage_attachments(row)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a57f1b5_8fb02145","line":163,"updated":"2016-02-10 17:52:51.000000000","message":"That neglects the idea of incapsulating layout details within Page Objects. Better approach is to define a subclass of BaseFormRegion that contains volumes attachments, dropdown and to buttons and return it from manage_attachments. Here and below you\u0027re mixing logic and locators definitions and also imply that attach_volume_to_instance / detach_volume_to_instance are always available, while in reality they\u0027re available only while the modal form (invoked by manage_attachments()) is shown. We need to capture that relation in page objects structure.","commit_id":"6bfc2bcd7d30bcb799b8fa45ea70505ddc4e8321"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"f2b06abbc93cbf1f5381d1097fc4f2719c8a2162","unresolved":false,"context_lines":[{"line_number":162,"context_line":"    def attach_volume_to_instance(self, volume, instance):"},{"line_number":163,"context_line":"        row \u003d self._get_row_with_volume_name(volume)"},{"line_number":164,"context_line":"        attach_form \u003d self.volumes_table.manage_attachments(row)"},{"line_number":165,"context_line":"        instances \u003d self._get_dropdown_options(attach_form.instance_selector())"},{"line_number":166,"context_line":"        instance_to_select \u003d [option.text for option in instances if"},{"line_number":167,"context_line":"                              option.text.startswith(instance)][0]"},{"line_number":168,"context_line":"        self._select_dropdown(instance_to_select,"}],"source_content_type":"text/x-python","patch_set":14,"id":"dae33548_eba7544d","line":165,"updated":"2016-02-17 15:17:58.000000000","message":"I see here another possibility to use more incapsulation: providing an attach() method at VolumeAttachForm class, do not expose this logic to VolumesPage.","commit_id":"a5f5c1afd0f59a1484ee9aee9b1e652fe270d86b"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"f2b06abbc93cbf1f5381d1097fc4f2719c8a2162","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        return VolumeDetachForm(self.driver, self.conf)"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    def instance_selector(self):"},{"line_number":201,"context_line":"        return self._get_element(*self._attach_to_instance_selector)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"class VolumeDetachForm(forms.BaseFormRegion):"}],"source_content_type":"text/x-python","patch_set":14,"id":"dae33548_ab86ecb6","line":201,"updated":"2016-02-17 15:17:58.000000000","message":"What if we made it to be a @property and then wrap it within SelectFormFildRegion? Feel free to take my patch https://review.openstack.org/#/c/261576/ and reuse it here.","commit_id":"a5f5c1afd0f59a1484ee9aee9b1e652fe270d86b"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"f2b06abbc93cbf1f5381d1097fc4f2719c8a2162","unresolved":false,"context_lines":[{"line_number":202,"context_line":""},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"class VolumeDetachForm(forms.BaseFormRegion):"},{"line_number":205,"context_line":"    _default_form_locator \u003d (By.CSS_SELECTOR, \u0027div.modal.in div.modal-dialog\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"dae33548_41534e6b","line":205,"updated":"2016-02-17 15:17:58.000000000","message":"I don\u0027t think we need to override default locator for this form. The only problem with the default locator specified at BaseFormRegion is that it isn\u0027t able to bind to the top form in a modal stack. that could be easily fixed by changing https://github.com/openstack/horizon/blob/9.0.0.0b2/openstack_dashboard/test/integration_tests/regions/forms.py#L238 to \n\n  src_elem \u003d self._get_elements(*self._default_form_locator)[-1]\n\n(same effect as \u0027div.modal-dialog:last\u0027, but w/o :last which doesn\u0027t work in Selenium).","commit_id":"a5f5c1afd0f59a1484ee9aee9b1e652fe270d86b"}],"openstack_dashboard/test/integration_tests/regions/forms.py":[{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"ccc2ddc99446d077ba98e90f9ac005ac1966fc2b","unresolved":false,"context_lines":[{"line_number":230,"context_line":"        if src_elem is None:"},{"line_number":231,"context_line":"            # fake self.src_elem must be set up in order self._get_element work"},{"line_number":232,"context_line":"            self.src_elem \u003d driver"},{"line_number":233,"context_line":"            src_elem \u003d self._get_elements(*self._default_form_locator)[-1]"},{"line_number":234,"context_line":"        super(BaseFormRegion, self).__init__(driver, conf, src_elem)"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":16,"id":"7af24918_880078ac","line":233,"updated":"2016-03-01 13:01:50.000000000","message":"Sorry, didn\u0027t say it before, but could you please add here a comment saying something like \u0027Bind the topmost modal form in a modal stack\u0027?","commit_id":"0c9f4331512870e0412843bcc1bb83610c5da8bb"}]}
