Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions src/wirecloud/platform/static/js/wirecloud/ui/WiringEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -525,18 +525,7 @@ Wirecloud.ui = Wirecloud.ui || {};
});

if (!found) {
source = findEndpointById.call(this, 'source', v.sourcename);
target = findEndpointById.call(this, 'target', v.targetname);

list2.push({
source: source,
target: target,
meta: this.workspace.wiring.createConnection(false, source._endpoint, target._endpoint),
options: {
sourceHandle: v.sourcehandle,
targetHandle: v.targethandle
}
});
// The connection does not have business info.
}
} catch (e) {
this.errorMessages.push(e);
Expand Down
18 changes: 17 additions & 1 deletion src/wirecloud/platform/wiring/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ def test_operators_are_not_usable_after_being_deleted(self):


@wirecloud_selenium_test_case
class ConnectionReadOnlyTestCase(WirecloudSeleniumTestCase):
class ConnectionManagementTestCase(WirecloudSeleniumTestCase):

fixtures = ('initial_data', 'selenium_test_data', 'user_with_workspaces')
tags = ('wirecloud-selenium', 'wirecloud-wiring', 'wirecloud-wiring-selenium')
Expand Down Expand Up @@ -1013,6 +1013,22 @@ def test_component_with_readonly_connections_cannot_be_deleted(self):
self.assertTrue(wiring.find_component_by_title('operator', "TestOperator").btn_remove.disabled)
self.assertTrue(wiring.find_component_by_title('widget', "Test 2").btn_remove.disabled)

def test_connection_valid_with_only_visual_info(self):
# Change the output-endpoint of two connections from the business
# description and keep those previous connections into visual
# description.

workspace = Workspace.objects.get(id=2)
workspace.wiringStatus['connections'][0]['target']['endpoint'] = 'nothandled'
workspace.wiringStatus['connections'][1]['target']['endpoint'] = 'nothandled'
workspace.save()

self.login(username='user_with_workspaces')

with self.wiring_view as wiring:
self.assertEqual(len(wiring.find_connections()), 3)
self.assertEqual(len(wiring.filter_connections_by_properties('missing')), 0)


@wirecloud_selenium_test_case
class EndpointBasicRecommendationTestCase(WirecloudSeleniumTestCase):
Expand Down