Closed lidaobing closed 2 weeks ago
This pull request introduces a mechanism to toggle the opening of URLs in tests. It adds a new atomic boolean flag open_url_enabled
to control whether URLs should be opened or just logged. This change is implemented in the iptux_open_path
and iptux_open_url
functions. Additionally, a new function _ForTestToggleOpenUrl
is added to enable or disable this feature. The test file ApplicationTest.cpp
is updated to use this new function.
Files | Changes |
---|---|
src/iptux/UiHelper.cpp src/iptux/UiHelper.h |
Introduced a new mechanism to toggle URL opening using an atomic boolean and a helper function. |
src/iptux/ApplicationTest.cpp |
Updated tests to use the new URL opening toggle function. |
Attention: Patch coverage is 77.77778%
with 2 lines
in your changes missing coverage. Please review.
Project coverage is 51.45%. Comparing base (
02958ea
) to head (38d009b
).
Files | Patch % | Lines |
---|---|---|
src/iptux/UiHelper.cpp | 77.77% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Summary by Sourcery
Introduced a mechanism to disable URL opening in tests by adding a toggle function and updating the test cases to use this function.