Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove widget references before removing it #249

Merged
merged 2 commits into from
Nov 10, 2016

Conversation

jpajuelo
Copy link
Collaborator

@jpajuelo jpajuelo commented Oct 27, 2016

The following commits fix #248 and #250

@@ -115,6 +115,20 @@ def test_remove_widget_from_workspace(self):
self.login(username="user_with_workspaces", next="/user_with_workspaces/Workspace")
self.find_widget(title="Test 1").remove()

def test_remove_widget_from_workspace_with_behaviours(self):
Copy link
Member

@aarranz aarranz Oct 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this selenium test and provide a unit test based on the current test_iwidget_removed test provided by the WiringTestCase class (wirecloud/platform/wiring/tests.py).

@@ -22,7 +22,7 @@
from django.utils.translation import ugettext as _

from wirecloud.commons.fields import JSONField
from wirecloud.platform.wiring.utils import remove_related_iwidget_connections
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take into account that this function is not used from a class, please, provide a more descriptive name (e.g. remove_widget_from_wiring_status or remove_related_widget_connections)

@@ -29,38 +29,43 @@
from wirecloud.platform.plugins import get_operator_api_extensions


def has_component(endpoint, component_id, component_type):
c_type, c_id, e_name = tuple(endpoint.split('/'))
def remove_component(component_type, component_id, wiring_status):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are implementing a generic remove_component if we are not removing operators?

@aarranz aarranz changed the base branch from develop to 1.0.x-dev October 28, 2016 15:59
@aarranz aarranz changed the base branch from 1.0.x-dev to develop October 28, 2016 16:00
@aarranz aarranz merged commit b1d9c0f into Wirecloud:develop Nov 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Garbage in the behaviours descriptions after removing widgets from workspace view
2 participants