manager: Delay UI Call removal and adjust to changes

This was handled explicitly in the Call window.
By changing the logic to delay the emission of "ui-call-removed" we make sure
that the Call UI and the exported DBus object is consistent.

We also need to change the test cases to use run a GMainLoop because we now have
to wait until signal comes in.
This commit is contained in:
Evangelos Ribeiro Tzaras
2022-02-03 07:49:55 +01:00
parent cde517096b
commit 3fe976505c
4 changed files with 141 additions and 98 deletions

View File

@@ -24,6 +24,11 @@ test_link_args = [
'-fPIC',
]
mock_link_args = [ test_link_args,
'-Wl,--wrap=calls_contacts_provider_new',
]
tests = [
[ 'provider', [] ],
[ 'origin', [ 'provider' ] ],
@@ -63,7 +68,7 @@ test_sources = [ 'test-manager.c' ]
t = executable('manager', test_sources,
c_args : test_cflags,
link_args: test_link_args,
link_args: mock_link_args,
pie: true,
link_with : [calls_vala, libcalls],
dependencies: calls_deps,
@@ -115,10 +120,6 @@ t = executable('util', test_sources,
)
test('util', t, env: test_env)
mock_link_args = [ test_link_args,
'-Wl,--wrap=calls_contacts_provider_new',
]
test_sources = [ 'test-ui-call.c', 'mock-call.c', 'mock-call.h' ]
t = executable('ui-call', test_sources,
c_args : test_cflags,